MinMaxScaleTransform<T>
Models & Types · AiDotNet.Data.Transforms.Numeric
Scales values to a target range using min-max normalization.
Implements: ITransform<T[], T[]>
For Beginners
Min-max scaling squeezes your data into a specific range (default [0, 1]). This is commonly used for pixel values or when your algorithm requires bounded inputs.
How It Works
The formula is: x_scaled = (x - min) / (max - min) * (targetMax - targetMin) + targetMin
Constructors
| Constructor | Summary |
|---|---|
MinMaxScaleTransform(T[] min, T[] max) |
Creates a min-max scaler from pre-computed statistics that maps to the range [0, 1]. |
MinMaxScaleTransform(T[] min, T[] max, double targetMin, double targetMax) |
Creates a min-max scaler from pre-computed statistics. |
MinMaxScaleTransform(T[][] referenceData) |
Creates a min-max scaler from a reference dataset that maps to the range [0, 1]. |
MinMaxScaleTransform(T[][] referenceData, double targetMin, double targetMax) |
Creates a min-max scaler from a reference dataset. |
Methods
| Method | Summary |
|---|---|
T[] Apply(T[] input) |