Skip to content

Minimal Learning Machine implementation using the scikit-learn API.

License

Notifications You must be signed in to change notification settings

omadson/scikit-mlm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scikit-mlm

GitHub PyPI GitHub commit activity GitHub last commit Downloads DOI

scikit-mlm is a Python module implementing the Minimal Learning Machine (MLM) machine learning technique using the scikit-learn API.

instalation

the scikit-mlm package is available in PyPI. to install, simply type the following command:

pip install scikit-mlm

Having problems?

  • you may need to use the --user flag for the commands above to install in a non-system location (depends on your environment). alternatively, you can execute the pip commands with sudo (not recommended).
  • you may need to add the --use-wheel option if you have an older pip version (wheels are now the default binary package format for pip).

basic usage

example of classification with the nearest neighbor MLM classifier:

from skmlm import NN_MLM
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_selection import cross_val_score
from sklearn.pipeline import make_pipeline
from sklearn.datasets import load_iris

# load dataset
dataset = load_iris()

clf = make_pipeline(MinMaxScaler(), NN_MLM(rp_number=20))
scores = cross_val_score(clf, dataset.data, dataset.target, cv=10, scoring='accuracy')

print('AVG = %.3f, STD = %.3f' % (scores.mean(), scores.std()))

how to cite scikit-mlm

if you use scikit-mlm in your paper, please cite it in your publication.

@misc{scikit-mlm,
    author       = "Madson Luiz Dantas Dias",
    year         = "2019",
    title        = "scikit-mlm: An implementation of {MLM} for scikit-learn framework",
    url          = "https://github.com/omadson/scikit-mlm",
    doi          = "10.5281/zenodo.2875802",
    institution  = "Federal University of Cear\'{a}, Department of Computer Science" 
}

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

to make a contribution, just fork this repository, push the changes in your fork, open up an issue, and make a pull request!

list of implemented technics

future improvements

list of methods that will be implemented in the next releases:

contributors

acknowledgement