{"id":19637034,"url":"https://github.com/caiocarneloz/masksemi","last_synced_at":"2026-07-19T08:35:37.937Z","repository":{"id":57439881,"uuid":"241366734","full_name":"caiocarneloz/masksemi","owner":"caiocarneloz","description":"Code for converting a label list in a scikit-like semi-supervised label list.","archived":false,"fork":false,"pushed_at":"2021-03-20T02:45:30.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-01T15:06:47.945Z","etag":null,"topics":["machine-learning","semi-supervised","semi-supervised-learning"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caiocarneloz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-18T13:23:58.000Z","updated_at":"2021-03-20T02:45:32.000Z","dependencies_parsed_at":"2022-09-26T17:20:39.958Z","dependency_job_id":null,"html_url":"https://github.com/caiocarneloz/masksemi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/caiocarneloz/masksemi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fmasksemi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fmasksemi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fmasksemi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fmasksemi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caiocarneloz","download_url":"https://codeload.github.com/caiocarneloz/masksemi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fmasksemi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35647761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-19T02:00:06.923Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","semi-supervised","semi-supervised-learning"],"created_at":"2024-11-11T12:32:55.693Z","updated_at":"2026-07-19T08:35:37.916Z","avatar_url":"https://github.com/caiocarneloz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# masksemi\nCode for converting a list of labels in a scikit-like semi-supervised labels.\n\n## Getting Started\n#### Dependencies\nYou need Python 3.7 or later to use **masksemi**. You can find it at [python.org](https://www.python.org/).\n\nYou also need numpy package, which is available from [PyPI](https://pypi.org). If you have pip, just run:\n```\npip install numpy\n```\n#### Installation\nClone this repo to your local machine using:\n```\ngit clone https://github.com/caiocarneloz/masksemi.git\n```\nOr install it using pip:\n```\npip install masksemi\n```\n\n#### Features\nGiven the label list and a certain percentage, mask the amount of unlabeled data based on percentage and also encode the data for scikit usage with semi-supervised models. The percentage split is considered by class. This way, all classes will have the given percentage as labeled data.\n\n#### Usage\nConsidering iris dataset labels:\n```\narray(['Iris-setosa', 'Iris-setosa', 'Iris-setosa', 'Iris-setosa',\n       'Iris-setosa', 'Iris-setosa', 'Iris-setosa', 'Iris-setosa',\n       'Iris-setosa', 'Iris-setosa', 'Iris-setosa', 'Iris-setosa',\n        ...,\n       'Iris-versicolor', 'Iris-versicolor', 'Iris-versicolor',\n       'Iris-versicolor', 'Iris-versicolor', 'Iris-versicolor',\n       'Iris-versicolor', 'Iris-versicolor', 'Iris-versicolor',\n        ...,\n       'Iris-virginica', 'Iris-virginica', 'Iris-virginica',\n       'Iris-virginica', 'Iris-virginica', 'Iris-virginica',\n       'Iris-virginica', 'Iris-virginica', ...], dtype=object)\n```\nThe maskData function is called by passing labels and the percentage of labeled data:\n```\nmasked_labels = maskData(labels, 0.1)\n```\nThe labels are encoded and masked:\n```\narray([-1, -1, -1,  0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  0, -1, -1, -1,\n       -1,  0,  0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1, -1,  1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1,  1, -1,  1, -1, -1, -1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1,  2, -1, -1, -1, -1,  2, -1, -1, -1, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  2,  2, -1, -1,\n       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  2])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaiocarneloz%2Fmasksemi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaiocarneloz%2Fmasksemi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaiocarneloz%2Fmasksemi/lists"}