sklears-kernel-approximation

Crates.iosklears-kernel-approximation
lib.rssklears-kernel-approximation
version0.1.0-beta.1
created_at2025-10-13 15:23:06.600463+00
updated_at2026-01-01 21:38:04.382624+00
descriptionKernel approximation methods
homepagehttps://github.com/cool-japan/sklears
repositoryhttps://github.com/cool-japan/sklears
max_upload_size
id1880665
size1,971,098
KitaSan (cool-japan)

documentation

README

sklears-kernel-approximation

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-kernel-approximation houses fast kernel feature map transformers, enabling scalable kernel methods for large datasets. The implementations track the scikit-learn 1.5 API while exploiting Rust's parallelism and SIMD acceleration.

Key Features

  • Random Feature Maps: RBFSampler, Nystroem, AdditiveChi2Sampler, SkewedChi2Sampler, and more.
  • GPU Acceleration: Optional CUDA/WebGPU backends for massive random feature expansions.
  • Pipeline Ready: Builders integrate with sklears pipelines, grid search, and calibration stages.
  • Deterministic Testing: Extensive property-based and integration tests ensure reproducible embeddings.

Quick Start

use sklears_kernel_approximation::RBFSampler;
use scirs2_core::ndarray::Array2;

let features: Array2<f64> = // load your data
    Array2::zeros((1024, 32));

let transformer = RBFSampler::builder()
    .gamma(0.5)
    .n_components(4096)
    .random_state(Some(42))
    .build();

let mapped = transformer.fit_transform(&features)?;

Status

  • Verified by the workspace-wide 11,292 passing tests in 0.1.0-beta.1.
  • Benchmarked against scikit-learn to provide 10–30× faster random feature generation.
  • Further roadmap tasks (e.g., online updates, streaming sampling) tracked in TODO.md.
Commit count: 0

cargo fmt