RobustScaler
chronax.robust_scaler.RobustScaler · inherits Scaler
Computes a scaling factor by removing the median and scaling by the interquartile range (IQR).
__init__(self, dim: int = -1, keepdim: bool = False, minimum_scale: float = 1e-10)
Initializes the RobustScaler.
| Parameter | Type | Default | Description |
|---|---|---|---|
dim |
int |
-1 |
dimension along which to compute the scale |
keepdim |
bool |
False |
controls whether to retain dimension dim (of length 1) in the scale tensor, or suppress it. |
minimum_scale |
float |
1e-10 |
minimum possible scale that is used for any item. |
__call__(self, data: torch.Tensor, weights: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]
Applies scaling based on median and IQR.
| Parameter | Type | Default | Description |
|---|---|---|---|
data |
torch.Tensor |
- | (undocumented) |
weights |
torch.Tensor |
- | (undocumented) |