energy_analysis_toolbox.load_profiles.thresholds.relative module#
Module for computing threshold profiles based on relative deviations.
This module provides tools to calculate profiles that deviate from the mean profile by a user-defined relative offset. The profiles are designed to scale proportionally with the baseline consumption pattern derived from historical data.
- class energy_analysis_toolbox.timeseries.profiles.thresholds.relative.RelativeThreshold(offset_relative: float = 0.5, **kwargs)[source]#
Bases:
MeanProfileA class which implements a relative deviation from the mean profile.
- compute(history: Series, time: Timestamp, **kwargs) Series[source]#
Return a threshold profile.
The threshold profile is obtained using a user-defined relative variation from the mean profile built from history.
- Parameters:
history (pd.Series) – Consumption history used to computed the reference profile.
time (pd.Timestamp) – The time at which the profile is of interest. Only the information about the date is used in the passed timestamp.
- Returns:
profile (pd.Series) – Profile threshold with same resolution as the history data.
Notes
The profile threshold is obtained as
(1 + tshd) *the mean profile obtained from history.