Standardization

class hdnnpy.preprocess.standardization.Standardization[source]

Bases: hdnnpy.preprocess.preprocess_base.PreprocessBase

Scale all feature values to be zero-mean and unit-variance.

apply(dataset, elemental_composition, verbose=True)[source]

Apply the same pre-processing for each element to dataset.

It accepts 1 or 2 for length of dataset, each element of which is regarded as 0th-order, 1st-order, …

Parameters:
  • dataset (list [ndarray]) – Input dataset to be scaled.
  • elemental_composition (list [str]) – Element symbols corresponding to 1st dimension of dataset.
  • verbose (bool, optional) – Print log to stdout.
Returns:

Processed dataset to be zero-mean and unit-variance.

Return type:

list [ndarray]

dump_params()[source]

Dump its own parameters as str.

Returns:Formed parameters.
Return type:str
load(file_path, verbose=True)[source]

Load internal parameters for each element.

Only root MPI process loads parameters.

Parameters:
  • file_path (Path) – File path to load parameters.
  • verbose (bool, optional) – Print log to stdout.
save(file_path, verbose=True)[source]

Save internal parameters for each element.

Only root MPI process saves parameters.

Parameters:
  • file_path (Path) – File path to save parameters.
  • verbose (bool, optional) – Print log to stdout.
elements

List of elements whose parameters have already been initialized.

Type:list [str]
mean

Initialized mean values in each feature dimension and each element.

Type:dict [ndarray]
name = 'standardization'

Name of this class.

Type:str
std

Initialized standard deviation values in each feature dimension and each element.

Type:dict [ndarray]