OutlierClipper<T>
Models & Types · AiDotNet.Preprocessing.OutlierHandling
Clips outliers to specified percentile bounds.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → OutlierClipper<T>
For Beginners
Outliers are extreme values that are far from most of your data. They can distort your model’s learning. Clipping replaces extreme values with more reasonable bounds:
- Values below the 1st percentile → replaced with 1st percentile value
- Values above the 99th percentile → replaced with 99th percentile value
Example: Income data where most people earn $30K-$200K but a few billionaires would be clipped to prevent the model from being skewed by extreme wealth.
How It Works
OutlierClipper clips values below a lower percentile and above an upper percentile to those percentile values. This reduces the impact of extreme outliers while preserving the overall data distribution.
Constructors
| Constructor | Summary |
|---|---|
OutlierClipper(double lowerPercentile, double upperPercentile, int[] columnIndices) |
Creates a new instance of OutlierClipper. |
Properties
| Property | Summary |
|---|---|
Vector<T> LowerBounds { get; } |
Gets the computed lower bounds for each feature. |
Vector<T> UpperBounds { get; } |
Gets the computed upper bounds for each feature. |
bool SupportsInverseTransform { get; } |
Gets whether this transformer supports inverse transformation. |
double LowerPercentile { get; } |
Gets the lower percentile (values below this are clipped). |
double UpperPercentile { get; } |
Gets the upper percentile (values above this are clipped). |
Methods
| Method | Summary |
|---|---|
string[] GetFeatureNamesOut(string[] inputFeatureNames) |
Gets the output feature names after transformation. |