# scikit-multilearn-ng
[![PyPI version](https://badge.fury.io/py/scikit-multilearn-ng.svg)](https://badge.fury.io/py/scikit-multilearn-ng)
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
__scikit-multilearn-ng__ is a Python module capable of performing multi-label
learning tasks and is the follow-up to [scikit-multilearn](https://github.com/scikit-multilearn/scikit-multilearn).
It is built on-top of various scientific Python packages
([numpy](http://www.numpy.org/), [scipy](https://www.scipy.org/)) and
follows a similar API to that of [scikit-learn](http://scikit-learn.org/).
More documentation:
- __Website:__ [https://scikit-multilearn-ng.github.io/scikit-multilearn-ng/](https://scikit-multilearn-ng.github.io/scikit-multilearn-ng/)
## Features
- __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).
- __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 — the reference standard in the field.
- __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.
## Installation & Dependencies
To install scikit-multilearn, simply type the following command:
```bash
$ pip install scikit-multilearn-ng
```
This will install the latest release from the Python package index. If you
wish to install the bleeding-edge version, then clone this repository and
run `setup.py`:
```bash
$ git clone https://github.com/scikit-multilearn-ng/scikit-multilearn-ng.git
$ cd scikit-multilearn-ng
$ python setup.py
```
In most cases requirements are installed when you install using `pip install scikit-multilearn-ng` or run `python setup.py install`. There are also optional dependencies `pip install scikit-multilearn-ng[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.
To install `openNE`, run:
```bash
pip install 'openne @ git+https://github.com/thunlp/OpenNE.git@master#subdirectory=src'
```
Note 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)
## Basic Usage
**Note: You should use the same import statement as previously with scikit-multilearn (`import skmultilearn`), after installation. This allows for quicker switching to this follow-up version.**
Before proceeding to classification, this library assumes that you have
a dataset with the following matrices:
- `x_train`, `x_test`: training and test feature matrices of size `(n_samples, n_features)`
- `y_train`, `y_test`: training and test label matrices of size `(n_samples, n_labels)`
Suppose we wanted to use a problem-transformation method called Binary
Relevance, which treats each label as a separate single-label classification
problem, to a Support-vector machine (SVM) classifier, we simply perform
the following tasks:
```python
# Import BinaryRelevance from skmultilearn
from skmultilearn.problem_transform import BinaryRelevance
# Import SVC classifier from sklearn
from sklearn.svm import SVC
# Setup the classifier
classifier = BinaryRelevance(classifier=SVC(), require_dense=[False,True])
# Train
classifier.fit(X_train, y_train)
# Predict
y_pred = classifier.predict(X_test)
```
More examples and use-cases can be seen in the
[documentation](https://scikit-multilearn-ng.github.io/scikit-multilearn-ng/_static/example_usage.html).
## Contributing
This project is open for contributions. Here are some of the ways for
you to contribute:
- Bug reports/fix
- Features requests
- Use-case demonstrations
- Documentation updates
In case you want to implement your own multi-label classifier, please
read our [Developer's Guide](http://scikit.ml/api/base.html) to help
you integrate your implementation in our API.
To make a contribution, just fork this repository, push the changes
in your fork, open up an issue, and make a Pull Request!
## Cite
If you used scikit-multilearn-ng in your research or project, please
cite [the original package scikit-multilearn](https://arxiv.org/abs/1702.01460):
```bibtex
@ARTICLE{2017arXiv170201460S,
author = {{Szyma{\'n}ski}, P. and {Kajdanowicz}, T.},
title = "{A scikit-based Python environment for performing multi-label classification}",
journal = {ArXiv e-prints},
archivePrefix = "arXiv",
eprint = {1702.01460},
year = 2017,
month = feb
}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/scikit-multilearn-ng/scikit-multilearn-ng/",
"name": "scikit-multilearn-ng",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Piotr Szyma\u0144ski",
"author_email": "niedakh@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/2d/63/f36cde21bbce21e6ff3991f94f5bb184dc72ad8f9b601a6bcb04d01ddb2c/scikit-multilearn-ng-0.0.8.tar.gz",
"platform": null,
"description": "# scikit-multilearn-ng\n\n[![PyPI version](https://badge.fury.io/py/scikit-multilearn-ng.svg)](https://badge.fury.io/py/scikit-multilearn-ng)\n[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n\n__scikit-multilearn-ng__ is a Python module capable of performing multi-label\nlearning tasks and is the follow-up to [scikit-multilearn](https://github.com/scikit-multilearn/scikit-multilearn).\nIt 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\nMore documentation:\n\n- __Website:__ [https://scikit-multilearn-ng.github.io/scikit-multilearn-ng/](https://scikit-multilearn-ng.github.io/scikit-multilearn-ng/)\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 — 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 & Dependencies\n\nTo install scikit-multilearn, simply type the following command:\n\n```bash\n$ pip install scikit-multilearn-ng\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-ng/scikit-multilearn-ng.git\n$ cd scikit-multilearn-ng\n$ python setup.py\n```\n\nIn most cases requirements are installed when you install using `pip install scikit-multilearn-ng` or run `python setup.py install`. There are also optional dependencies `pip install scikit-multilearn-ng[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\n**Note: You should use the same import statement as previously with scikit-multilearn (`import skmultilearn`), after installation. This allows for quicker switching to this follow-up version.**\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](https://scikit-multilearn-ng.github.io/scikit-multilearn-ng/_static/example_usage.html).\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\n## Cite\n\nIf you used scikit-multilearn-ng in your research or project, please\ncite [the original package scikit-multilearn](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",
"bugtrack_url": null,
"license": "BSD",
"summary": "Scikit-multilearn-ng is the follow up to scikit-multilearn, a BSD-licensed library for multi-label classification that is built on top of the well-known scikit-learn ecosystem.",
"version": "0.0.8",
"project_urls": {
"Homepage": "https://github.com/scikit-multilearn-ng/scikit-multilearn-ng/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0adb22a867ef696b074231b7cf1c33181ebc5da2eb43b7024e84f57986b713a4",
"md5": "3821e01ea57571aafc27c6f8a85359ee",
"sha256": "23ffffcba8fd0ef791c35f893e0dbfbc9d7e49412b75583af1e01e181908ebb4"
},
"downloads": -1,
"filename": "scikit_multilearn_ng-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3821e01ea57571aafc27c6f8a85359ee",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 109612,
"upload_time": "2024-09-05T06:27:08",
"upload_time_iso_8601": "2024-09-05T06:27:08.276604Z",
"url": "https://files.pythonhosted.org/packages/0a/db/22a867ef696b074231b7cf1c33181ebc5da2eb43b7024e84f57986b713a4/scikit_multilearn_ng-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d63f36cde21bbce21e6ff3991f94f5bb184dc72ad8f9b601a6bcb04d01ddb2c",
"md5": "a713201b0b77cafa708d7f85faff0f7a",
"sha256": "c93791e94832f4ff07dee1d81593373c967fd82d167a775b41a2c222ddce6a64"
},
"downloads": -1,
"filename": "scikit-multilearn-ng-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "a713201b0b77cafa708d7f85faff0f7a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 70938,
"upload_time": "2024-09-05T06:27:09",
"upload_time_iso_8601": "2024-09-05T06:27:09.724975Z",
"url": "https://files.pythonhosted.org/packages/2d/63/f36cde21bbce21e6ff3991f94f5bb184dc72ad8f9b601a6bcb04d01ddb2c/scikit-multilearn-ng-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-05 06:27:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "scikit-multilearn-ng",
"github_project": "scikit-multilearn-ng",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "scikit-multilearn-ng"
}