Expand description
§anofox-ml
A scikit-learn-style machine learning library for Rust.
§Quick Start
use anofox_ml::prelude::*;
use ndarray::array;
// Fit a KNN classifier
let x_train = array![[0.0, 0.0], [1.0, 1.0], [2.0, 2.0], [3.0, 3.0]];
let y_train = array![0.0, 0.0, 1.0, 1.0];
let knn = KnnClassifier { n_neighbors: 3, ..Default::default() };
let model = knn.fit(&x_train, &y_train).unwrap();
let x_test = array![[0.5, 0.5], [2.5, 2.5]];
let predictions = model.predict(&x_test).unwrap();Modules§
- cluster
- Clustering algorithms (KMeans, DBSCAN).
- core
- Core traits and types.
- discriminant
- Linear and Quadratic Discriminant Analysis.
- ensemble
- Ensemble methods (Random Forest, Gradient Boosting, AdaBoost, ExtraTrees).
- io
- Data I/O utilities (CSV reading).
- linear
- SGD-based linear models (SGDClassifier, SGDRegressor).
- metrics
- Evaluation metrics.
- naive_
bayes - Naive Bayes classifiers.
- neighbors
- K-nearest neighbors algorithms.
- neural_
networks - Neural network models (MLP).
- prelude
- Convenient prelude importing the most commonly used items.
- preprocessing
- Feature preprocessing (scalers, PCA).
- regression
- Classical regression models (OLS, Ridge, Elastic Net, GLM).
- svm
- Support Vector Machine classifiers.
- trees
- Decision tree algorithms.