AutoML with SmartCore
AutoML is Automated Machine Learning, referring to processes and methods to make machine learning more accessible for a general audience. This crate builds on top of the smartcore machine learning framework, and provides some utilities to quickly train and compare models.
Usage
For instance, running the following:
let mut classifier = automl::classification::Classifier::default();
classifier.with_dataset(smartcore::dataset::breast_cancer::load_dataset());
classifier.compare_models();
print!("{}", classifier);
Will output this comparison of models usign cross-validation:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
โ Model โ Training Accuracy โ Testing Accuracy โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโก
โ Random Forest Classifier โ 1.00 โ 0.96 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ Logistic Regression Classifier โ 0.97 โ 0.95 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ Gaussian Naive Bayes โ 0.95 โ 0.93 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ KNN Classifier โ 0.96 โ 0.92 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ Categorical Naive Bayes โ 0.96 โ 0.91 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ Decision Tree Classifier โ 1.00 โ 0.90 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค
โ Support Vector Classifier โ 0.87 โ 0.85 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
You can then train a final model using classifier.train_final_model()
and perform inference using that model with the predict
method.
Features
Currently this crate only has AutoML features for regression and classification. This includes the following models:
- Regression
- Decision Tree Regression
- KNN Regression
- Random Forest Regression
- Linear Regression
- Ridge Regression
- LASSO
- Elastic Net
- Support Vector Regression
- Classification
- Random Forest Classification
- Decision Tree Classification
- Support Vector Classification
- Logistic Regression
- KNN Classification