Implementation of perturbation-based classifiers
Project description
Perturbation Classifiers
Perturbation Classifiers is an easy-to-use library focused on the implementation of the Perturbation-based Classifier (PerC) [1]_ and subconcept Perturbation-based Classifier (sPerC). The library is is based on scikit-learn_, using the same method signatures: fit, predict, predict_proba and score.
Installation:
The package can be installed using the following command:
.. code-block:: bash
# Clone repository
git clone https://github.com/rjos/perturbation-classifiers.git
cd perturbation-classifiers/
# Installation lib
python setup.py install
Dependencies:
perturbation_classifiers is tested to work with Python 3.7. The dependencies requirements are:
- scikit-learn(>=0.24.2)
- numpy(>=1.21.2)
- scipy(>=1.7.1)
- matplotlib(>=3.4.3)
- pandas(>=1.3.2)
- gap-stat(>=2.0.1)
- gapstat-rs(>=2.0.1)
These dependencies are automatically installed using the command above.
Examples:
Here we show an example using the PerC method:
.. code-block:: python
from perturbation_classifiers import PerC
# Train a PerC model
perc = PerC()
perc.fit(X_train, y_train)
# Predict new examples
perc.predict(X_test)
and here we show an example using the sPerC method:
.. code-block:: python
from perturbation_classifiers.subconcept import sPerC
# Train a sPerC model
sperc = sPerC()
sperc.fit(X_train, y_train)
# Predict new examples
sperc.predict(X_test)
References:
.. [1] : Araújo, E.L., Cavalcanti, G.D.C. & Ren, T.I. Perturbation-based classifier. Soft Comput (2020).
.. _scikit-learn: http://scikit-learn.org/stable/
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 perturbation_classifiers-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66a49da3023a38310bd832f5e629a9908220a7858ef0ba8f7ec6ed2d0cc571e4 |
|
MD5 | af528487543c9d6b360efd9c5733cd52 |
|
BLAKE2b-256 | 316a56740b093090f545cb62e6295e7ab0c3f9ea6d10bb8a0b9aa978fe9bb506 |
Hashes for perturbation_classifiers-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c78ba000a3133fc310fe860b530435d364abadf60d75113187e8d830e091dc3 |
|
MD5 | 742d2f435416d615d442c33ce465e7bc |
|
BLAKE2b-256 | 76529fb1e8ba4a307db838814ed346a5263949e7efe08d9866f4e35183e0f4e5 |