{"id":13486969,"url":"https://github.com/scikit-multilearn/scikit-multilearn","last_synced_at":"2025-05-14T21:11:13.575Z","repository":{"id":16560006,"uuid":"19313806","full_name":"scikit-multilearn/scikit-multilearn","owner":"scikit-multilearn","description":"A scikit-learn based module for multi-label et. al. classification","archived":false,"fork":false,"pushed_at":"2024-02-01T04:40:03.000Z","size":46335,"stargazers_count":931,"open_issues_count":91,"forks_count":180,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-13T17:46:57.280Z","etag":null,"topics":["classification","clustering","label-prediction","machine-learning","multi-label","partitioning","scikit","scikit-learn","scikit-multilearn"],"latest_commit_sha":null,"homepage":"http://scikit.ml","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scikit-multilearn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-30T13:05:44.000Z","updated_at":"2025-03-31T09:58:45.000Z","dependencies_parsed_at":"2024-06-18T12:33:21.928Z","dependency_job_id":"2a385b32-4c07-4f69-9b94-d53aa60feb4c","html_url":"https://github.com/scikit-multilearn/scikit-multilearn","commit_stats":{"total_commits":504,"total_committers":28,"mean_commits":18.0,"dds":"0.19246031746031744","last_synced_commit":"2ea8c414d6e11ab2b5b5d03cceb3f56ce8fe4215"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-multilearn%2Fscikit-multilearn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-multilearn%2Fscikit-multilearn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-multilearn%2Fscikit-multilearn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-multilearn%2Fscikit-multilearn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scikit-multilearn","download_url":"https://codeload.github.com/scikit-multilearn/scikit-multilearn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227631,"owners_count":22035671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["classification","clustering","label-prediction","machine-learning","multi-label","partitioning","scikit","scikit-learn","scikit-multilearn"],"created_at":"2024-07-31T18:00:53.919Z","updated_at":"2025-05-14T21:11:08.549Z","avatar_url":"https://github.com/scikit-multilearn.png","language":"Python","readme":"# scikit-multilearn\n\n[![PyPI version](https://badge.fury.io/py/scikit-multilearn.svg)](https://badge.fury.io/py/scikit-multilearn)\n[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n\n__scikit-multilearn__ is a Python module capable of performing multi-label\nlearning tasks. It is built on-top of various scientific Python packages\n([numpy](http://www.numpy.org/), [scipy](https://www.scipy.org/)) and\nfollows a similar API to that of [scikit-learn](http://scikit-learn.org/).\n\n- __Website:__ [scikit.ml](http://scikit.ml)\n- __Documentation:__ [scikit-multilearn Documentation](http://scikit.ml/api/skmultilearn.html)\n\n\n## Features\n\n- __Native Python implementation.__ A native Python implementation for a variety of multi-label classification algorithms. To see the list of all supported classifiers, check this [link](http://scikit.ml/#classifiers).\n\n- __Interface to Meka.__ A Meka wrapper class is implemented for reference purposes and integration. This provides access to all methods available in MEKA, MULAN, and WEKA \u0026mdash; the reference standard in the field.\n\n- __Builds upon giants!__ Team-up with the power of numpy and scikit. You can use scikit-learn's base classifiers as scikit-multilearn's classifiers. In addition, the two packages follow a similar API.\n\n## Installation \u0026 Dependencies\n\nTo install scikit-multilearn, simply type the following command:\n\n```bash\n$ pip install scikit-multilearn\n```\n\nThis will install the latest release from the Python package index. If you\nwish to install the bleeding-edge version, then clone this repository and\nrun `setup.py`:\n\n```bash\n$ git clone https://github.com/scikit-multilearn/scikit-multilearn.git\n$ cd scikit-multilearn\n$ python setup.py\n```\n\nIn most cases requirements are installed when you install using `pip install scikit-multilearn` or run `python setup.py install`. There are also optional dependencies `pip install scikit-multilearn[gpl,keras,meka]` installs the GPL-incurring igraph for for igraph library based clusterers, keras for the keras classifiers and requirements for the meka bridge respectively.\n\nTo install `openNE`, run:\n\n```bash\npip install 'openne @ git+https://github.com/thunlp/OpenNE.git@master#subdirectory=src'\n```\n\nNote that installing the GPL licensed graphtool, for graphtool based clusters, is complicated, and must be done manually, please see: [graphtool install instructions](https://git.skewed.de/count0/graph-tool/wikis/installation-instructions)\n\n## Basic Usage\n\nBefore proceeding to classification,  this library assumes that you have\na dataset with the following matrices:\n\n- `x_train`, `x_test`: training and test feature matrices of size `(n_samples, n_features)`\n- `y_train`, `y_test`: training and test label matrices of size `(n_samples, n_labels)`\n\nSuppose we wanted to use a problem-transformation method called Binary\nRelevance, which treats each label as a separate single-label classification\nproblem, to a Support-vector machine (SVM) classifier, we simply perform\nthe following tasks:\n\n```python\n# Import BinaryRelevance from skmultilearn\nfrom skmultilearn.problem_transform import BinaryRelevance\n\n# Import SVC classifier from sklearn\nfrom sklearn.svm import SVC\n\n# Setup the classifier\nclassifier = BinaryRelevance(classifier=SVC(), require_dense=[False,True])\n\n# Train\nclassifier.fit(X_train, y_train)\n\n# Predict\ny_pred = classifier.predict(X_test)\n```\n\nMore examples and use-cases can be seen in the \n[documentation](http://scikit.ml/api/classify.html). For using the MEKA\nwrapper, check this [link](http://scikit.ml/api/meka.html#mekawrapper).\n\n## Contributing\n\nThis project is open for contributions. Here are some of the ways for\nyou to contribute:\n\n- Bug reports/fix\n- Features requests\n- Use-case demonstrations\n- Documentation updates\n\nIn case you want to implement your own multi-label classifier, please \nread our [Developer's Guide](http://scikit.ml/api/base.html) to help\nyou integrate your implementation in our API.\n\nTo make a contribution, just fork this repository, push the changes\nin your fork, open up an issue, and make a Pull Request!\n\nWe're also available in Slack! Just go to our [slack group](https://scikit-ml.slack.com/).\n\n## Cite\n\nIf you used scikit-multilearn in your research or project, please\ncite [our work](https://arxiv.org/abs/1702.01460):\n\n```bibtex\n@ARTICLE{2017arXiv170201460S,\n   author = {{Szyma{\\'n}ski}, P. and {Kajdanowicz}, T.},\n   title = \"{A scikit-based Python environment for performing multi-label classification}\",\n   journal = {ArXiv e-prints},\n   archivePrefix = \"arXiv\",\n   eprint = {1702.01460},\n   year = 2017,\n   month = feb\n}\n```\n","funding_links":[],"categories":["The Data Science Toolbox","Python","Machine Learning","Machine Learning Framework","Sklearn实用程序","Uncategorized"],"sub_categories":["General Machine Learning Packages","General Purpose Machine Learning","General Purpose Framework","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-multilearn%2Fscikit-multilearn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscikit-multilearn%2Fscikit-multilearn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-multilearn%2Fscikit-multilearn/lists"}