StandardScaler<T>

Models & Types ยท AiDotNet.Preprocessing.Scalers

Standardizes features by removing the mean and scaling to unit variance.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ†’ StandardScaler<T>

For Beginners

This scaler converts your data to a standard scale:

  • The center of your data (mean) becomes 0
  • The spread of your data (standard deviation) becomes 1

This is like converting different currencies to a common one - it makes different features comparable and helps many ML algorithms work better.

How It Works

Standard scaling (Z-score normalization) transforms data to have a mean of 0 and a standard deviation of 1. This is important for many machine learning algorithms as it puts different features on comparable scales.

Constructors

Constructor Summary
StandardScaler(bool withMean, bool withStd, int[] columnIndices) Creates a new instance of StandardScaler.

Properties

Property Summary
Vector<T> Mean { get; } Gets the mean of each feature computed during fitting.
Vector<T> StandardDeviation { get; } Gets the standard deviation of each feature computed during fitting.
bool SupportsInverseTransform { get; } Gets whether this transformer supports inverse transformation.
bool WithMean { get; } Gets whether this scaler centers the data (subtracts mean).
bool WithStd { get; } Gets whether this scaler scales the data (divides by std).

Methods

Method Summary
string[] GetFeatureNamesOut(string[] inputFeatureNames) Gets the output feature names after transformation.