Welcome to scikit-multilearn-ng’s documentation!¶
scikit-multilearn-ng is a Python module capable of performing multi-label learning tasks, building on the legacy of scikit-multilearn. It integrates seamlessly with scientific Python packages like numpy and scipy and follows a familiar API akin to scikit-learn.
Features¶
Native Python Implementation: Variety of multi-label classification algorithms implemented natively in Python.
Interface to Meka: Provides access to all methods available in MEKA, MULAN, and WEKA via a Meka wrapper class.
Integration with numpy and scikit: Use scikit-learn’s base classifiers and benefit from numpy’s computational efficiency.
Installation & Dependencies¶
To install scikit-multilearn-ng:
$ pip install scikit-multilearn-ng
For the latest development version:
$ git clone https://github.com/scikit-multilearn-ng/scikit-multilearn-ng.git
$ cd scikit-multilearn-ng
$ python setup.py install
Optional dependencies can be installed as follows:
$ pip install scikit-multilearn-ng[gpl,keras,meka]
For installing openNE:
$ pip install 'openne @ git+https://github.com/thunlp/OpenNE.git@master#subdirectory=src'
Note: Installing GPL licensed graphtool is more complex. Please refer to the graphtool install instructions.
Basic Usage¶
# Import BinaryRelevance from skmultilearn
from skmultilearn.problem_transform import BinaryRelevance
from sklearn.svm import SVC
# Setup the classifier
classifier = BinaryRelevance(classifier=SVC(), require_dense=[False, True])
# Train
classifier.fit(X_train, y_train)
# Predict
predictions = classifier.predict(X_test)
To see more examples, please refer to the example usage page.
More examples and use cases will be added soon.
Contributing¶
Contributions to scikit-multilearn-ng are welcome! Here are some ways to contribute:
Reporting or fixing bugs
Requesting features
Demonstrating use-cases
Updating documentation
Indices and tables¶
Cite us
If you use scikit-multilearn-ng in your research and publish it, please consider citing scikit-multilearn:
@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},
primaryClass = "cs.LG",
keywords = {Computer Science - Learning, Computer Science - Mathematical Software},
year = 2017,
month = feb,
}