ecal.calculators.preprocessing¶
Classes
|
Data preprocessing class that calculates the FLOPs for various data preprocessing tasks |
- class ecal.calculators.preprocessing.DataPreprocessing(preprocessing_type='normalization', processor_flops_per_second=1000000000000.0, processor_max_power=100, time_steps=1)[source]¶
Bases:
objectData preprocessing class that calculates the FLOPs for various data preprocessing tasks
- Parameters:
- __init__(preprocessing_type='normalization', processor_flops_per_second=1000000000000.0, processor_max_power=100, time_steps=1)[source]¶
Initialize DataPreprocessing class
- Parameters:
preprocessing_type (str) – Type of preprocessing to perform (“normalization”, “min_max_scaling”, or “GADF”).
processor_flops_per_second (float) – Processor throughput in FLOPS, used to convert FLOP counts into elapsed time for energy estimation.
processor_max_power (int) – Processor power draw in watts, used to convert elapsed time into energy.
time_steps (int) – Number of time steps per sample (only relevant for the “GADF” preprocessing type).
- calculate_energy(data_bits, time_steps)[source]¶
Calculate the energy usage of the current preprocessing step
- Parameters:
- Returns:
Dictionary with “total_energy” (Joules) and “total_bits” (data_bits * time_steps, the total number of scalar values processed)
- Return type: