finol.data_layer.ScalerSelector

class finol.data_layer.ScalerSelector[source]

Class to select different types of scalers and performs partial data standardization depending on the configuration.

Methods

select_scaler()

Select the data scaler based on the configuration.

window_normalize(data)

Normalize the input tensor data along the window dimension based on different methods.

window_normalize_via_MaxAbsScaler(data)

Normalize the input tensor data along the window dimension via MaxAbsScaler.

window_normalize_via_MinMaxScaler(data)

Normalize the input tensor data along the window dimension via MinMaxScaler.

window_normalize_via_RobustScaler(data)

Normalize the input tensor data along the window dimension via RobustScaler.

window_normalize_via_StandardScaler(data)

Normalize the input tensor data along the window dimension via StandardScaler.

select_scaler()[source]

Select the data scaler based on the configuration.

Returns:

The selected scaler object, or None if no scaler is specified.

Return type:

Optional[object]

window_normalize(data)[source]

Normalize the input tensor data along the window dimension based on different methods.

Parameters:

data (Tensor) – Input data tensor of shape (…, window_size, feature_dim).

Returns:

Standardized data tensor of the same shape.

Return type:

Tensor

window_normalize_via_MaxAbsScaler(data)[source]

Normalize the input tensor data along the window dimension via MaxAbsScaler.

Parameters:

data (Tensor) – Input data tensor of shape (…, window_size, feature_dim).

Returns:

Standardized data tensor of the same shape.

Return type:

Tensor

window_normalize_via_MinMaxScaler(data)[source]

Normalize the input tensor data along the window dimension via MinMaxScaler.

Parameters:

data (Tensor) – Input data tensor of shape (…, window_size, feature_dim).

Returns:

Standardized data tensor of the same shape.

Return type:

Tensor

window_normalize_via_RobustScaler(data)[source]

Normalize the input tensor data along the window dimension via RobustScaler.

Parameters:

data (Tensor) – Input data tensor of shape (…, window_size, feature_dim).

Returns:

Standardized data tensor of the same shape.

Return type:

Tensor

window_normalize_via_StandardScaler(data)[source]

Normalize the input tensor data along the window dimension via StandardScaler.

Parameters:

data (Tensor) – Input data tensor of shape (…, window_size, feature_dim).

Returns:

Standardized data tensor of the same shape.

Return type:

Tensor