sup3r.preprocessing.data_handling.mixin.TrainingPrepMixIn

class TrainingPrepMixIn[source]

Bases: object

Collection of training related methods. e.g. Training + Validation splitting, normalization

Initialize common attributes

Methods

normalize([means, stds, features, max_workers])

Normalize all data features.

Attributes

means

Get the mean values for each feature.

norm_workers

Get upper bound on workers used for normalization.

stds

Get the standard deviation values for each feature.

property means

Get the mean values for each feature.

Returns:

dict

property stds

Get the standard deviation values for each feature.

Returns:

dict

normalize(means=None, stds=None, features=None, max_workers=None)[source]

Normalize all data features.

Parameters:
  • means (dict | none) – Dictionary of means for all features with keys: feature names and values: mean values. If this is None, the self.means attribute will be used. If this is not None, this DataHandler object means attribute will be updated.

  • stds (dict | none) – dictionary of standard deviation values for all features with keys: feature names and values: standard deviations. If this is None, the self.stds attribute will be used. If this is not None, this DataHandler object stds attribute will be updated.

  • features (list | None) – List of features used for indexing data array during normalization.

  • max_workers (None | int) – Max workers to perform normalization. if None, self.norm_workers will be used

property norm_workers

Get upper bound on workers used for normalization.