sklears-ensemble

Crates.iosklears-ensemble
lib.rssklears-ensemble
version0.1.0-beta.1
created_at2025-10-13 15:52:58.225611+00
updated_at2026-01-01 21:39:08.454418+00
descriptionEnsemble methods for sklears: Random Forest, Gradient Boosting, AdaBoost
homepagehttps://github.com/cool-japan/sklears
repositoryhttps://github.com/cool-japan/sklears
max_upload_size
id1880699
size1,080,642
KitaSan (cool-japan)

documentation

README

sklears-ensemble

Crates.io Documentation License Minimum Rust Version

Latest release: 0.1.0-beta.1 (January 1, 2026). See the workspace release notes for highlights and upgrade guidance.

Overview

sklears-ensemble delivers bagging, boosting, stacking, voting, and random forest implementations with scikit-learn parity and Rust-first performance.

Key Features

  • Tree Ensembles: RandomForest, ExtraTrees, GradientBoosting, Histogram-based boosting, IsolationForest.
  • Linear/Stochastic Ensembles: Bagging, AdaBoost, Stacking, Voting, Snapshot ensembles, warm-starting.
  • GPU + SIMD: Accelerated split finding, batched inference, and quantized histograms.
  • AutoML Integration: Works with feature selection, model selection, and inspection crates for end-to-end workflows.

Quick Start

use sklears_ensemble::RandomForestClassifier;
use scirs2_core::ndarray::{array, Array1};

let x = array![
    [0.0, 1.0, 2.0],
    [1.0, 0.5, 2.1],
    [0.5, 2.0, 1.5],
];
let y = Array1::from(vec![0, 1, 0]);

let forest = RandomForestClassifier::builder()
    .n_estimators(500)
    .max_depth(Some(10))
    .n_jobs(-1)
    .bootstrap(true)
    .build();

let fitted = forest.fit(&x, &y)?;
let predictions = fitted.predict(&x)?;

Status

  • Included in the 11,292 passing workspace tests for 0.1.0-beta.1.
  • Benchmarks demonstrate 5–30× faster training versus scikit-learn on medium to large datasets.
  • Roadmap items (GPU GradientBoosting, federated ensembles) live in this crate’s TODO.md.
Commit count: 0

cargo fmt