Behavior (Implementation)#
- class EquidistantTimeUniformBehavior(change_interval, lower_value, upper_value, start_time, stop_time)[source]#
Bases:
DataBehavior
DescriptionChanges data behaviour in regular intervals by a uniformly random value between lower_value and upper_value- Parameters:
change_interval (float) – Amount of time steps between behaviour changes (default=5.0)
lower_value (float) – Lower extent of data value changes, inclusive (default=-1.0)
upper_value (float) – Upper extent of data value changes, exclusive (default=1.0)
start_time (float) – Start of affected time (default=0.0)
stop_time (float) – Stop of affected time (default=600.0)
- class RandomTimeBrownBehavior(change_interval, lower_value, upper_value, start_time, stop_time)[source]#
Bases:
DataBehavior
DescriptionChanges data behaviour in random intervals by a uniformly random value between lower_value and upper_value- Parameters:
change_interval (float) – Indicator [2] of time steps between behaviour changes (default=5.0)
lower_value (float) – Indicator of lower extent of data value changes, inclusive (default=-1.0)
upper_value (float) – Indicator of upper extent of data value changes, exclusive (default=1.0)
start_time (float) – Start of affected time (default=0.0)
stop_time (float) – Stop of affected time (default=600.0)
[2] The effect of the parameter is too complex to be simply described, | see behavior for the exact effect of the parameter.
- behavior(self) change_times, change_values [source]#
- DescriptionCalculates how many times the data changes
=n
.Calculates an the average between lower_value and upper_Value=offset
.Draws n/4 random values in [-offset, offset)=observation_values
.Interpolates the observation_values through Gaussian Regression with Brownian Motion=interpolated_values
.Draws n*4 random times in [start_time, stop_time)=change_times
.Reads the values from interpolated_values at the change_times and adds the offset=change_values
- Returns:
change_times, change_values
- Return type:
- class RandomTimeUniformBehavior(change_interval, lower_value, upper_value, start_time, stop_time)[source]#
Bases:
DataBehavior
DescriptionChanges data behaviour in random intervals by a uniformly random value between lower_value and upper_value- Parameters:
change_interval (float) – Average amount of time steps between behaviour changes (default=5.0)
lower_value (float) – Lower extent of data value changes, inclusive (default=-1.0)
upper_value (float) – Upper extent of data value changes, exclusive (default=1.0)
start_time (float) – Start of affected time (default=0.0)
stop_time (float) – Stop of affected time (default=600.0)
- behavior(self) change_times, change_values [source]#
- DescriptionFirst calculates how many times the data changes
=n
.Finally draws then+1
random times in [start_time, stop_time)=change_times
- Returns:
change_times, change_values
- Return type:
[3] It is n+1 as the first behaviour change sets in at start_time.