sklears-feature-extraction
Latest release:
0.2.0(July 14, 2026). See the workspace release notes for highlights and upgrade guidance.
Overview
sklears-feature-extraction contains text, signal, and image feature transformers designed to mirror scikit-learn’s feature extraction API with Rust-first performance.
Key Features
- Text Processing: CountVectorizer, TfidfVectorizer, HashingVectorizer, N-gram analyzers, character models.
- Image Features: Patch extraction, HOG descriptors, a full SIFT keypoint pipeline, and SIMD-accelerated pixel/statistical operations;
image::simd_acceleratedgenuinely delegates toscirs2_core::simd_ops::SimdUnifiedOpsfor vectorized execution (previously several of its functions were plain scalar loops mislabeled as SIMD). There is no GPU backend in this crate. - Signal Features: Windowed statistics, spectrograms, wavelet transforms, and FFT-based descriptors.
- Pipeline Support: Integrates with sklears preprocessing, selection, and model selection crates.
Quick Start
use TfidfVectorizer;
let docs = vec!;
let mut vectorizer = new
.ngram_range
.min_df
.max_features;
let tfidf = vectorizer.fit_transform?;
Status
- Extensively tested; 416 passing crate tests in
0.2.0. - Offers >99% parity with scikit-learn’s feature extraction module, with SIMD-accelerated hot paths (no GPU backend).
- This session fixed
image::simd_accelerated: 7 of its 9 public functions were labeled "SIMD-accelerated" (with fabricated speedup figures up to "8.7x" in their own doc comments) despite being plain scalar loops — e.g.simd_array_subtractionwas literallya - b; all 7 now genuinely delegate toscirs2_core::simd_ops::SimdUnifiedOps, verified numerically equivalent to the prior behavior to 1e-9 tolerance. This audit was scoped to that one module — otherimage::files (patch_extraction,wavelet_features,surf_features) still carry legacy "SIMD-accelerated"/speedup doc comments that were not verified against their implementations in this pass. - Additional work (streaming text ingestion, audio-specific transforms) documented in
TODO.md.