| Crates.io | automl |
| lib.rs | automl |
| version | 0.2.9 |
| created_at | 2021-11-12 00:00:27.317242+00 |
| updated_at | 2025-01-02 17:34:15.441233+00 |
| description | Automated machine learning for classification and regression |
| homepage | https://github.com/cmccomb/rust-automl |
| repository | https://github.com/cmccomb/rust-automl |
| max_upload_size | |
| id | 480716 |
| size | 592,442 |
AutoML (Automated Machine Learning) streamlines machine learning workflows, making them more accessible and efficient
for users of all experience levels. This crate extends the smartcore machine learning framework, providing utilities to
quickly train, compare, and deploy models.
Add AutoML to your Cargo.toml to get started:
Stable Version
automl = "0.2.9"
Latest Development Version
automl = { git = "https://github.com/cmccomb/rust-automl" }
Here’s a quick example to illustrate how AutoML can simplify model training and comparison:
let dataset = smartcore::dataset::breast_cancer::load_dataset();
let settings = automl::Settings::default_classification();
let mut classifier = automl::SupervisedModel::new(dataset, settings);
classifier.train();
will perform a comparison of classifier models using cross-validation. Printing the classifier object will yield:
┌────────────────────────────────┬─────────────────────┬───────────────────┬──────────────────┐
│ Model │ Time │ Training Accuracy │ Testing Accuracy │
╞════════════════════════════════╪═════════════════════╪═══════════════════╪══════════════════╡
│ Random Forest Classifier │ 835ms 393us 583ns │ 1.00 │ 0.96 │
├────────────────────────────────┼─────────────────────┼───────────────────┼──────────────────┤
│ Logistic Regression Classifier │ 620ms 714us 583ns │ 0.97 │ 0.95 │
├────────────────────────────────┼─────────────────────┼───────────────────┼──────────────────┤
│ Gaussian Naive Bayes │ 6ms 529us │ 0.94 │ 0.93 │
├────────────────────────────────┼─────────────────────┼───────────────────┼──────────────────┤
│ Categorical Naive Bayes │ 2ms 922us 250ns │ 0.96 │ 0.93 │
├────────────────────────────────┼─────────────────────┼───────────────────┼──────────────────┤
│ Decision Tree Classifier │ 15ms 404us 750ns │ 1.00 │ 0.93 │
├────────────────────────────────┼─────────────────────┼───────────────────┼──────────────────┤
│ KNN Classifier │ 28ms 874us 208ns │ 0.96 │ 0.92 │
├────────────────────────────────┼─────────────────────┼───────────────────┼──────────────────┤
│ Support Vector Classifier │ 4s 187ms 61us 708ns │ 0.57 │ 0.57 │
└────────────────────────────────┴─────────────────────┴───────────────────┴──────────────────┘
You can then perform inference using the best model with the predict method.
This crate has several features that add some additional methods.
| Feature | Description |
|---|---|
nd |
Adds methods for predicting/reading data using ndarray. |
csv |
Adds methods for predicting/reading data from a .csv using polars. |