Skip to content

Preprocessing Lodestar.Preprocessing

github-actions[bot] edited this page Sep 24, 2026 · 1 revision

Development build. This page describes main, not a released package. The latest published Lodestar.Preprocessing is 0.2.0 — read its documentation.

Home › Preprocessing

Lodestar.Preprocessing

Feature preprocessing with scikit-learn's semantics: the standard, min-max, max-abs and robust scalers, the quantile and power transformers, one-hot encoding, binning, imputation (simple and k-nearest-neighbour), polynomial features and the cross-validation splitters. Each is fitted on arrays or a CsrMatrix and applied to spans, with its fitted statistics readable.

Install

dotnet add package Lodestar.Preprocessing

Example

using Lodestar.Preprocessing;

// Row-major: two features per row, three rows. The second is constant.
double[] samples = [1.0, 10.0, 2.0, 10.0, 4.0, 10.0];

StandardScaler scaler = StandardScaler.Fit(samples, featureCount: 2);
double[] standardised = scaler.Transform(samples);
double first = standardised[0];   // -1.069…

Parity

Replayed against sklearn.preprocessing and sklearn.model_selection. docs/equivalence.md maps each Python call to its C# counterpart, with every deliberate divergence.

Dependencies

A core package (decision 0003), built for net10.0 and netstandard2.0:

  • Lodestar.Stats 0.5.0 or later
  • Lodestar.Abstractions 0.2.0 or later
  • Lodestar.Cluster 0.2.0 or later

Documentation

Clone this wiki locally