glassbox.cleaner.outliers¶
OutlierCapper — clips values outside IQR bounds.
OutlierCapper
¶
Bases: BaseTransformer
Identifies and caps numerical outliers based on specified bounds.
Source code in glassbox/cleaner/outliers.py
fit
¶
Detect boundaries for outlier capping from the training data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
ndarray
|
Input array of shape (n_samples, n_features). |
required |
Returns:
| Type | Description |
|---|---|
Self
|
Fitted outlier capper instance. |
Source code in glassbox/cleaner/outliers.py
transform
¶
Cap outliers in the input dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
ndarray
|
Input array of shape (n_samples, n_features). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Transformed array with outliers capped. |