gluonts.torch.scaler module#
- class gluonts.torch.scaler.MeanScaler(dim: int = - 1, keepdim: bool = False, default_scale: Optional[float] = None, minimum_scale: float = 1e-10)[source]#
Bases:
gluonts.torch.scaler.Scaler
Computes a scaling factor as the weighted average absolute value along dimension
dim
, and scales the data accordingly.- Parameters
dim – dimension along which to compute the scale
keepdim – controls whether to retain dimension
dim
(of length 1) in the scale tensor, or suppress it.default_scale – default scale that is used for elements that are constantly zero
minimum_scale – minimum possible scale that is used for any item.
- class gluonts.torch.scaler.NOPScaler(dim: int = - 1, keepdim: bool = False)[source]#
Bases:
gluonts.torch.scaler.Scaler
Assigns a scaling factor equal to 1 along dimension
dim
, and therefore applies no scaling to the input data.- Parameters
dim – dimension along which to compute the scale
keepdim – controls whether to retain dimension
dim
(of length 1) in the scale tensor, or suppress it.
- class gluonts.torch.scaler.StdScaler(dim: int = - 1, keepdim: bool = False, minimum_scale: float = 1e-05)[source]#
Bases:
gluonts.torch.scaler.Scaler
Computes a std scaling value along dimension
dim
, and scales the data accordingly.- Parameters
dim – dimension along which to compute the scale
keepdim – controls whether to retain dimension
dim
(of length 1) in the scale tensor, or suppress it.minimum_scale – default scale that is used for elements that are constantly zero along dimension
dim
.