Skip to main content

Crate scry_learn

Crate scry_learn 

Source
Expand description

§scry-learn

Machine learning toolkit in pure Rust.

§Quick Start

use scry_learn::prelude::*;

let data = Dataset::from_csv("iris.csv", "species")?;
let (train, test) = train_test_split(&data, 0.2, 42);

let mut model = RandomForestClassifier::new()
    .n_estimators(100)
    .max_depth(10);
model.fit(&train)?;

let preds = model.predict(&test)?;
let report = classification_report(&test.target, &preds);
println!("{report}");

Modules§

anomaly
Anomaly detection algorithms.
calibration
Probability calibration for classifiers.
cluster
Clustering algorithms: K-Means, Mini-Batch K-Means, DBSCAN, HDBSCAN, Agglomerative Clustering, and silhouette scoring.
dataset
Tabular dataset container for ML workflows.
distance
Shared distance functions.
ensemble
Ensemble meta-learning methods.
error
Error types for scry-learn.
explain
Model explainability: permutation importance and TreeSHAP.
feature_selection
Feature selection transformers.
linear
Linear models: OLS, Ridge, Logistic, Lasso, and ElasticNet.
metrics
Classification, regression, and clustering metrics.
naive_bayes
Naive Bayes classifiers: Gaussian, Bernoulli, and Multinomial.
neighbors
K-Nearest Neighbors classifier and regressor.
neural
Neural network module — MLP and CNN layers.
partial_fit
Incremental (online) learning trait.
pipeline
Composable ML pipeline.
prelude
Convenience re-exports for common usage.
preprocess
Data preprocessing transformers.
search
Hyperparameter search via cross-validation.
sparse
Sparse matrix types: CSR (Compressed Sparse Row) and CSC (Compressed Sparse Column).
split
Train/test splitting and cross-validation utilities.
svm
Support Vector Machine classifiers and regressors.
text
Text processing and feature extraction for NLP tasks.
tree
Tree-based models: Decision Tree, Random Forest, Gradient Boosting, and Histogram-based Gradient Boosting.
weights
Class weighting for imbalanced datasets.