Algorithms
The catalog mirrors the complete scikit-learn taxonomy. Every item enters the roadmap with a mandatory four-stage evolution — naive → tests → performance → out-of-core — and receives a Python binding as soon as it is validated on CPU.
43+
algorithms
- Preprocessing5
- Imputation3
- Linear models7
- Nearest neighbors4
- SVM3
- Trees2
- Ensembles4
- Clustering3
- Decomposition3
- Outliers1+
- Model selection6
- Metrics2+
Preprocessing · sciencekit_preprocessing
| Estimator | Description | Status |
|---|---|---|
SKStandardScaler | Standardizes by removing the mean and scaling to unit variance (dense · incremental · streaming) | Implemented |
SKMinMaxScaler | Affine scaling of each column onto a configurable range with optional clipping (exact dense fit · sparse-aware incremental and streaming) | Implemented |
SKRobustScaler | Median / interquartile-range scaling with optional unit-variance normalization (exact dense fit · quantile-sketch incremental and streaming) | Implemented |
SKOneHotEncoder | One-hot encoding of categorical columns into dense or CSR indicators, with a configurable unknown-category policy (dense and streaming categorical fit) | Implemented |
SKPolynomialFeatures | Polynomial and interaction expansion with configurable degree, bias and dense/CSR output (dense · sparse · streaming) | Implemented |
Imputation · sciencekit_impute
| Estimator | Description | Status |
|---|---|---|
SKSimpleImputer | Mean, median, most frequent and constant imputation (dense · sparse · incremental · streaming) | Implemented |
SKMissingIndicator | 0.0/1.0 mask of the features missing at fit time (dense · sparse) | Implemented |
SKKNNImputer | Multivariate imputation from the nearest complete donors, with uniform or distance weights and an optional missing indicator (dense only; sparse views rejected) | Implemented |
Linear models · sciencekit_linear_model
| Estimator | Description | Status |
|---|---|---|
SKLinearRegression | Ordinary least squares (dense · incremental · streaming) | Implemented |
SKRidge | Regression with L2 regularization (dense · sparse · incremental · streaming) | Implemented |
SKLasso | Regression with L1 regularization (dense · sparse · incremental · streaming) | Implemented |
SKElasticNet | Combined L1 + L2 regularization (dense · sparse · incremental · streaming) | Implemented |
SKLogisticRegression | Regularized logistic classification (binary · multinomial · one-vs-rest · dense · sparse · incremental · streaming) | Implemented |
SKSGDClassifier | Stochastic-gradient linear classification (5 losses · one-vs-rest · dense · sparse · incremental · streaming) | Implemented |
SKSGDRegressor | Stochastic-gradient linear regression (4 losses · Huber / epsilon-insensitive · dense · sparse · incremental · streaming) | Implemented |
SKLoraAdapter | Low-rank adaptation of a frozen linear or logistic coefficient block (fit · predict · merge/unmerge · export/import · dense and sparse) | Implemented |
Nearest neighbors · sciencekit_neighbors
| Structure/Estimator | Description | Status |
|---|---|---|
SKKNeighborsClassifier | k-NN classification (dense trees · sparse brute force) | Implemented |
SKKNeighborsRegressor | k-NN regression (dense trees · sparse brute force) | Implemented |
SKKDTree | Immutable, exact k-d tree over dense features (median split on the widest-spread axis; sparse views rejected with UnsupportedRepresentation) | Implemented |
SKBallTree | Immutable, exact ball tree over dense features (farthest-pivot split; sparse views rejected with UnsupportedRepresentation) | Implemented |
Support vector machines · sciencekit_svm
| Estimator | Description | Status |
|---|---|---|
SKSVC | Kernel-based C-support-vector classification (SMO, OvO, Platt + coupling, dense and sparse) | Implemented |
SKSVR | $\varepsilon$-insensitive support-vector regression (SMO, dense and sparse) | Implemented |
SKLinearSVC | Scalable linear SVM (dual coordinate descent, hinge and squared hinge, one-vs-rest, class weights, dense and sparse) | Implemented |
Trees and ensembles · sciencekit_tree + sciencekit_ensemble
| Estimator | Description | Status |
|---|---|---|
SKDecisionTreeClassifier | CART for classification (dense and sparse, deterministic) | Implemented |
SKDecisionTreeRegressor | CART for regression (dense and sparse, deterministic) | Implemented |
SKRandomForestClassifier | Random-forest classification (bootstrap, OOB accuracy, dense and sparse) | Implemented |
SKRandomForestRegressor | Random-forest regression (bootstrap, OOB $R^2$, dense and sparse) | Implemented |
SKBaggingClassifier / SKBaggingRegressor | Generic parallel bootstrap and feature-subspace aggregation over any supervised base estimator (OOB accuracy / $R^2$, dense and sparse) | Implemented |
SKGradientBoostingClassifier / SKGradientBoostingRegressor | Sequential gradient boosting over negative gradients with Newton leaves, shrinkage, subsampling and early stopping (binary, multiclass, squared/absolute/Huber, dense and sparse) | Implemented |
SKHistGradientBoostingClassifier / SKHistGradientBoostingRegressor | LightGBM-style histogram boosting: quantile binning with a missing bin, parallel gradient/Hessian histograms, parent subtraction, leaf-wise growth, bitvec categorical partitions, learned missing routing, subsampling and early stopping (binary, multiclass, squared/absolute, dense and non-densified CSR) | Implemented |
Unsupervised · sciencekit_cluster, sciencekit_decomposition, sciencekit_outlier
| Estimator | Description | Status |
|---|---|---|
SKKMeans | Lloyd + Elkan k-means with seeded k-means++ (memmap indexes remain Phase 7) | Implemented |
SKMiniBatchKMeans | Mini-batch k-means with per-center learning rates, deterministic reassignment, partial_fit and multi-epoch streaming (SKSourceProvider) | Implemented |
SKDBSCAN | Density-based clustering over KD-tree / ball-tree and sparse brute-force region queries with explicit SKClusterLabel::Noise and nearest-core prediction | Implemented |
SKPCA | Principal component analysis (full SVD · covariance eigh · sparse randomized SVD) | Implemented |
SKTruncatedSVD | Uncentered randomized low-rank SVD for latent semantic analysis and sparse dimensionality reduction (dense · sparse CSR) | Implemented |
SKIncrementalPCA | Out-of-core incremental PCA (Chan-Golub-LeVeque scatter merge · CSR Gram accumulation · partial_fit & fit_streaming) | Implemented |
SKIsolationForest | Non-parametric anomaly detection via random isolation trees, harmonic path-length scoring, Auto/quantile contamination offsets and non-densifying CSR parity | Implemented |
| Anomaly detection (LOF, One-Class SVM) | Remaining outlier estimators from the scikit-learn family | Planned |
Model selection, pipelines and metrics
| Item | Crate | Description | Status |
|---|---|---|---|
sk_train_test_split | sciencekit_model_selection | Seeded train/test partition by fraction or explicit count, with optional stratification, gathering rows without densifying sparse input | Implemented |
SKKFold | sciencekit_model_selection | Plain K-fold with an optional seeded shuffle; disjoint test folds together cover every row exactly once | Implemented |
SKStratifiedKFold | sciencekit_model_selection | K-fold preserving per-class proportions; rejects a class with fewer examples than folds | Implemented |
SKGroupKFold | sciencekit_model_selection | K-fold that keeps every group entirely on one side of each split | Implemented |
SKGridSearchCVClassifier / SKGridSearchCVRegressor | sciencekit_model_selection | Typed grid search over configured candidates with shared folds | Implemented |
SKHalvingGridSearchClassifier / SKHalvingGridSearchRegressor | sciencekit_model_selection | Successive-halving search: geometric resource schedule, seeded and stratified round subsamples, deterministic elimination trace, aggressive early pruning and winner refit | Implemented |
| Halving resource axes beyond sample counts | sciencekit_model_selection | Additional SKHalvingResource variants (trees, epochs) | Planned |
SKPipeline | sciencekit_pipeline | Type-safe linear pipeline (compiler-checked composition) | Implemented |
SKPipelineGraph | sciencekit_pipeline | Validated runtime DAG pipeline: topological fit and predict, deterministic level order, edge-order merges without densifying CSR, node-attributed errors and classifier/regressor wrappers | Implemented |
SKStreamingPipeline | sciencekit_pipeline | Out-of-core linear pipeline over an SKSourceProvider: chained SKStreamingTransformer fitting through the shared prefetch executor, one-shot materialization within a byte budget, multi-epoch replay, CSR-preserving per-batch transform and a bounded batch finalizer | Implemented |
| Classification, regression and clustering metrics | sciencekit_metrics | Accuracy, precision/recall/F1 with macro/micro/weighted/binary averaging, confusion matrix, MSE/RMSE/MAE, $R^2$, silhouette, Calinski-Harabasz, Davies-Bouldin, homogeneity/completeness/V-measure, adjusted Rand and mutual information, plus scorer adapters and streaming accumulators | Implemented |
| Ranking metrics | sciencekit_metrics | ROC/AUC (binary and multiclass one-vs-rest), ROC and precision-recall curves, average precision, log loss, Matthews correlation and balanced accuracy, with a streaming AUC accumulator and scorer adapters | Implemented |
| Calibration and multilabel metrics | sciencekit_metrics | Calibration curves, Brier score and multilabel losses (e.g. Hamming and Jaccard) | Planned |
SKTabularDataset / SKTabularSourceConfig | sciencekit_interop | Engine-neutral tabular sources: column kinds, dense/sparse feature blocks, owned categorical codes and label tables, numeric/categorical missing mapping | Implemented |
| Polars sources | sciencekit_interop | DataFrame and reopenable LazyFrame batches behind the optional polars feature (Polars 0.46, Rust 1.85 pin) | Implemented |
| DataFusion, Arrow and Parquet sources | sciencekit_interop | DataFusion 46 DataFrame/RecordBatch conversion, true record-batch streaming and Parquet-through-DataFusion behind the optional datafusion feature, alongside the Arrow 58 adapter | Implemented |
| ONNX export | sciencekit_onnx | SKToOnnx translation of the neutral model state into opset-17 ONNX graphs with ONNX-ML tree ensembles, SVM kernel expansions, per-family parity tests and an onnxruntime comparison harness; unsupported families return UnsupportedOperation and are listed in sk_onnx_coverage | Implemented |
| ONNX import | sciencekit_onnx | SKOnnxModel over the shared serde-onnx IR, SKOnnxPredictor<F> implementing both prediction traits, a documented interpreter for the emitted operator subset (including ONNX-ML tree ensembles), typed validation errors, export/import round-trip tests and a three-way onnxruntime harness (36/36 import fixtures) | Implemented |
| Model export/import coverage | every model crate | SKExportable / SKImportable state for scalers, encoders, imputers, linear and SGD models, neighbours, SVMs, decision trees, forests, gradient boosting and bagging, with stable dotted tensor names, metadata versioning, dense/CSR parity and prediction round-trip tests | Implemented |
| Native model import & retraining | sciencekit_interop, sciencekit_onnx | SKNativeImport<F> rebuilds linear/logistic, SGD, tree, forest, scaler and k-means models from Safetensors, JSON or a documented ONNX subset, with structural format detection, exact tensor-set and class-table validation, typed rejections, continued fitting where the algorithm keeps its state, and a concurrency-safe conversion surface | Implemented |
| Extended Safetensors & JSON debug | sciencekit_interop | Binary Safetensors persistence (metadata header, SKShardPlan sharding, in-place header/payload padding, optional Gzip/Brotli/Snappy compression) and deterministic JSON debug inspection over SKModelState | Implemented |
Memory-mapped sources (memmap feature) | sciencekit_interop | Zero-copy SKMappableSource/SKLazySource over raw binary, NumPy .npy and footer-indexed Arrow IPC files, with descriptor, length, endianness, alignment and truncation validation | Implemented |
OpenCL backend (opencl feature) | sciencekit_gpu, sciencekit_gpu_opencl | First real device backend behind SKComputeBackend: ICD-loader device discovery, builder-only construction, device buffers with memory/capacity validation, explicit accounted transfers, runtime-compiled pairwise/GEMM/elementwise/tree kernels with CPU parity, concurrent dispatch and honest CPU fallback | Implemented |
SKTelemetry / SKTelemetryPipeline | sciencekit_telemetry | Opt-in OTLP trace, log and metric export pipelines, resource attributes, sampling and bounded lifecycle (silent no-op default) | Implemented |
sciencekit CLI (workflows-cli) | sciencekit_cli | fit, predict, transform, evaluate, export, inspect and run; versioned JSON/TOML/YAML workflow records, flags > environment > file > defaults resolution, dry-run, CSV/Parquet datasets, Safetensors/JSON/ONNX models and stable exit codes | Implemented |
One entry point · sciencekit
Every crate below stays independently consumable, but applications normally add the umbrella package. It re-exports the stable public surface under family modules and gives docs.rs and crates.io a single front page; it adds no logic.
| Module | Owning crate(s) | Contents |
|---|---|---|
sciencekit::prelude | curated across families | builder/fit/predict traits, data views, SKError, SKFloat and the headline estimators |
sciencekit::math | sciencekit_math | kernels, pairwise distances, solvers and the math backend |
sciencekit::preprocessing | sciencekit_preprocessing | scalers, one-hot, polynomial features |
sciencekit::impute | sciencekit_impute | simple, indicator and KNN imputers |
sciencekit::linear_model | sciencekit_linear_model | linear, regularized, logistic and SGD models |
sciencekit::neighbors, sciencekit::svm | sciencekit_neighbors, sciencekit_svm | nearest neighbors and support-vector machines |
sciencekit::tree, sciencekit::ensemble, sciencekit::outlier | sciencekit_tree, sciencekit_ensemble, sciencekit_outlier | trees, forests, boosting and isolation forests |
sciencekit::cluster, sciencekit::decomposition | sciencekit_cluster, sciencekit_decomposition | clustering, PCA and SVD |
sciencekit::model_selection, sciencekit::pipeline, sciencekit::metrics | sciencekit_model_selection, sciencekit_pipeline, sciencekit_metrics | splitting, search, composition and evaluation |
sciencekit::interop | sciencekit_interop, sciencekit_onnx | tabular sources, model formats and ONNX |
sciencekit::accelerators, sciencekit::telemetry, sciencekit::ffi | sciencekit_gpu, sciencekit_gpu_opencl, sciencekit_telemetry, sciencekit_ffi | device contracts, OTLP export and the C ABI |
Integration features (opencl, telemetry, onnx, polars, datafusion, memmap,
parquet) are off by default and forward to the owning crate.
Continuous acceleration: every completed algorithm receives, in separate changes,
a Python binding (
sciencekit_python) and GPU backends (OpenCL → CUDA → ROCm) behind
SKComputeBackend. The CPU is the default backend, always present.