phlower.services.preprocessing.PhlowerScalingService

class phlower.services.preprocessing.PhlowerScalingService(scaling_setting)[source]

Bases: object

This is Facade Class for scaling process

Methods

__init__(scaling_setting)

fit_transform_all(interim_data_directories, ...)

This function is consisted of these three process.

from_setting(setting)

inverse_transform(dict_data[, ...])

lazy_fit_all(data_directories, *[, ...])

save(output_directory, file_base_name[, ...])

Save Parameters of scaling converters

transform_file(variable_name, file_path[, ...])

transform_interim_all(data_directories, ...)

Apply scaling process to data in interim directory and save results in preprocessed directory.

Parameters:

scaling_setting (PhlowerScalingSetting)

fit_transform_all(interim_data_directories, output_base_directory, decrypt_key=None, encrypt_key=None)[source]

This function is consisted of these three process. - Determine parameters of scalers by reading data files lazily - Transform interim data and save result - Save file of parameters

Return type:

None

Parameters:
  • interim_data_directories (list[Path])

  • output_base_directory (Path)

  • decrypt_key (bytes | None)

  • encrypt_key (bytes | None)

save(output_directory, file_base_name, encrypt_key=None)[source]

Save Parameters of scaling converters

Parameters:
  • output_directory (Path)

  • file_base_name (str)

  • encrypt_key (bytes | None)

Return type:

None

transform_interim_all(data_directories, output_base_directory, *, max_process=None, allow_missing=False, allow_overwrite=False, decrypt_key=None, encrypt_key=None)[source]

Apply scaling process to data in interim directory and save results in preprocessed directory.

Return type:

None

Parameters:
  • data_directories (list[Path])

  • output_base_directory (Path)

  • max_process (int | None)

  • allow_missing (bool)

  • allow_overwrite (bool)

  • decrypt_key (bytes | None)

  • encrypt_key (bytes | None)