Minimal Learning Machine implementation using the scikit-learn API
Project description
scikit-mlm
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
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
- original regression (MLMR)
- original classification (MLMC)
- nearest neighbor MLM (NN_MLM)
- opposite neighborhood MLM (ON_MLM)
- fuzzy C-means MLM (FCM_MLM)
- optimally selected MLM (OS_MLM)
- ℓ1/2-norm regularization MLM (L12_MLM)
- weighted MLM (w_MLM)
- ranking MLM (R-MLM) (WIP)
future improvements
list of methods that will be implemented in the next releases:
- cubic equation MLM (C-MLM)
- expected squared distance MLM (ESD-MLM)
- voting based MLM (V-MLM)
- weighted voting based MLM (WV-MLM)
- random sampling voting based MLM (RSV-MLM)
- random sampling weighted voting based MLM (RSWV-MLM)
- reject option MLM (renjo-MLM)
- reject option weighted MLM (renjo-wMLM)
contributors
acknowledgement
- thanks for @JamesRitchie, the initial idea of this project is inspired on the scikit-rvm repo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for scikit_mlm-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8e0bef9fad7766ca130403e42984524db33e58183cc9e0bd2241ff3382946b0 |
|
MD5 | 811b2ff77f30ee2e114ab0487fc81f18 |
|
BLAKE2b-256 | d833e01214e7a3187b79c8f747f92a1ff9981d38a4affc30cfb6f5e4376a0f10 |