https://github.com/cmccomb/rust-automl
Automated Machine Learning in Rust π¦
https://github.com/cmccomb/rust-automl
automl machine-learning ml rust rust-crate smartcore
Last synced: about 2 months ago
JSON representation
Automated Machine Learning in Rust π¦
- Host: GitHub
- URL: https://github.com/cmccomb/rust-automl
- Owner: cmccomb
- License: mit
- Created: 2021-11-11T15:28:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-01-02T17:34:05.000Z (5 months ago)
- Last Synced: 2025-03-31T09:03:52.366Z (2 months ago)
- Topics: automl, machine-learning, ml, rust, rust-crate, smartcore
- Language: Rust
- Homepage: https://crates.io/crates/automl
- Size: 813 KB
- Stars: 34
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/cmccomb/automl/actions)
[](https://crates.io/crates/automl)
[](https://docs.rs/automl)# AutoML with SmartCore
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`](https://docs.rs/smartcore/) machine learning framework, providing utilities to
quickly train, compare, and deploy models.# Install
Add AutoML to your `Cargo.toml` to get started:
**Stable Version**
```toml
automl = "0.2.9"
```
**Latest Development Version**
```toml
automl = { git = "https://github.com/cmccomb/rust-automl" }
```# Example Usage
Hereβs a quick example to illustrate how AutoML can simplify model training and comparison:
```rust
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:
```text
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββ
β 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.
## Features
This crate has several features that add some additional methods.
| Feature | Description |
| :------ | :------------------------------------------------------------------------------------------------------ |
| `nd` | Adds methods for predicting/reading data using [`ndarray`](https://crates.io/crates/ndarray). |
| `csv` | Adds methods for predicting/reading data from a .csv using [`polars`](https://crates.io/crates/polars). |## Capabilities
- Feature Engineering
- PCA
- SVD
- Interaction terms
- Polynomial terms
- 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
- Gaussian Naive Bayes
- Meta-learning
- Blending
- Save and load settings
- Save and load models