https://github.com/yupbank/multi-mutli-multi-sationary
https://github.com/yupbank/multi-mutli-multi-sationary
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yupbank/multi-mutli-multi-sationary
- Owner: yupbank
- License: gpl-2.0
- Created: 2017-06-16T21:20:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-16T21:23:15.000Z (about 8 years ago)
- Last Synced: 2025-02-08T15:34:06.865Z (4 months ago)
- Language: Python
- Size: 179 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MOLearn
Methods for Multiple-Output Learning in python
## About
This package provides multi-output methods in python, using [scikit-learn](http://scikit-learn.org/stable/) for base classifiers. Classifiers are written in the style of `scikit-learn` classifiers.
For a maturing Java-based framework for multi-label multi-output learning, see the [MEKA](http://meka.sourceforge.net/) framework. But sometimes, it's nice to work in python, hence this project. The basic problem transformation methods are implemented, as in MEKA, except using [scikit-learn](http://scikit-learn.org/stable/) for base classifiers. I have also come across the [scikit-multilearn](http://scikit-multilearn.github.io/) with similar goals which also in fact has a wrapper to MEKA classifiers.
## Installation
Installation requires `numpy` and `scikit-learn`. To install:
```
$ python setup.py install
```Or, if you will be developing, then
```
git clone https://github.com/jmread/molearn
cd molearn
python setup.py develop
```If you install locally, then use the `--prefix` option, e.g.,
```
python setup.py develop --prefix=$HOME/.local/
```## Running
To check that it is working, run the demo:
```
$ python runDemo.py
```## Examples
Data is represented in two-dimensional numpy arrays, similarly to sklearn.
For example, to run *Classifier Chains* with a *Random Forest* base classifier:```python
from molearn.classifiers.CC import CC
from sklearn.ensemble import RandomForestClassifierh = CC(h=RandomForestClassifier(n_estimators=100))
h.fit(X_train,Y_train)
Y_pred = h.predict_proba(X_test)print "Exact Match: ", Exact_match(Y_test,Y_pred > 0.5)
```For further examples, have a look at `runDemo.py`.