QuantileTransformer<T>
Models & Types · AiDotNet.Preprocessing.PowerTransforms
Transforms features to follow a uniform or normal distribution using quantile information.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → QuantileTransformer<T>
For Beginners
This transformer redistributes your data to match a desired pattern:
- Uniform: Spreads values evenly across [0, 1]
- Normal: Creates a bell curve distribution
Example with uniform output: [1, 1, 2, 3, 5, 8, 13, 100, 1000] → [0.0, 0.0, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0] (values equal to the fitted minimum map to 0, as in scikit-learn) Notice how extreme values (100, 1000) no longer dominate.
How It Works
QuantileTransformer applies a non-linear transformation that maps the input distribution to either a uniform or normal (Gaussian) distribution. This is effective at reducing the impact of outliers and normalizing non-Gaussian distributions.
Constructors
| Constructor | Summary |
|---|---|
QuantileTransformer(OutputDistributionType outputDistribution, int nQuantiles, int[] columnIndices) |
Creates a new instance of QuantileTransformer. |
Properties
| Property | Summary |
|---|---|
List<T[]> Quantiles { get; } |
Gets the quantiles for each feature computed during fitting. |
OutputDistributionType OutputDistribution { get; } |
Gets the target output distribution. |
bool SupportsInverseTransform { get; } |
Gets whether this transformer supports inverse transformation. |
int NQuantiles { get; } |
Gets the number of quantiles used. |
Methods
| Method | Summary |
|---|---|
string[] GetFeatureNamesOut(string[] inputFeatureNames) |
Gets the output feature names after transformation. |