hookeai.model_architectures.hybrid_base_model.train.training.fit_data_scalers¶
- fit_data_scalers(model, dataset, scaling_type='mean-std', scaling_parameters={}, is_verbose=False)[source]¶
Fit model data scalers.
Data scaler normalization tensors are fitted from given data set, overriding provided data scaling parameters.
- Parameters:
model (torch.nn.Module) – Model.
dataset (torch.utils.data.Dataset) – Time series data set. Each sample is stored as a dictionary where each feature (key, str) data is a torch.Tensor(2d) of shape (sequence_length, n_features).
scaling_type ({'min-max', 'mean-std'}, default='mean-std') – Type of data scaling. Min-Max scaling (‘min-max’) or standardization (‘mean-std’).
scaling_parameters (dict, default={}) – Data scaling parameters (item, dict) for each features type (key, str). For ‘min-max’ data scaling, the parameters are the ‘minimum’ and ‘maximum’ features normalization tensors, as well as the ‘norm_minimum’ and ‘norm_maximum’ normalization bounds. For ‘mean-std’ data scaling, the parameters are the ‘mean’ and ‘std’ features normalization tensors.
is_verbose (bool, default=False) – If True, enable verbose output.