CACP: Classification Algorithms Comparison Pipeline
Project description
Free software: MIT license
Documentation: https://cacp.readthedocs.io.
Installation
To install cacp, run this command in your terminal:
pip install cacp
Usage
An example of this library usage is included in the package https://github.com/sylwekczmil/cacp/tree/main/cacp_examples.
from sklearn.neighbors import KNeighborsClassifier
from skmultiflow.lazy import KNNClassifier
from skmultiflow.meta import LearnPPNSEClassifier
from cacp import all_datasets, run_experiment, ClassificationDataset
from cacp_examples.classifiers import CLASSIFIERS
from cacp_examples.example_custom_classifiers.xgboost import XGBoost
# you can specify datasets by name, all of them will be automatically downloaded
experimental_datasets_example = [
ClassificationDataset('iris'),
ClassificationDataset('wisconsin'),
ClassificationDataset('pima'),
ClassificationDataset('sonar'),
ClassificationDataset('wdbc'),
]
# or use all datasets
experimental_datasets = all_datasets()
# same for classifiers, you can specify list of classifiers
experimental_classifiers_example = [
('KNN_3', lambda n_inputs, n_classes: KNeighborsClassifier(3)),
# you can define classifiers multiple times with different parameters
('KNN_5', lambda n_inputs, n_classes: KNeighborsClassifier(5)),
# you can use classifiers from any lib that
# supports fit/predict methods eg. scikit-learn/scikit-multiflow
('KNNI', lambda n_inputs, n_classes: KNNClassifier(n_neighbors=3)),
# you can also use wrapped algorithms from other libs or custom implementations
('XGB', lambda n_inputs, n_classes: XGBoost()),
('LPPNSEC', lambda n_inputs, n_classes: LearnPPNSEClassifier())
]
# or you can use predefined ones
experimental_classifiers = CLASSIFIERS
# this is how you trigger experiment run
run_experiment(
experimental_datasets,
experimental_classifiers,
results_directory='./example_result'
)
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
cacp-0.1.0.tar.gz
(1.7 MB
view hashes)
Built Distribution
cacp-0.1.0-py2.py3-none-any.whl
(13.8 kB
view hashes)