Normal distribution with reference profile approach
The normal distribution with reference profile approach is using the same basic as Normal distribution approach but instead of normally distributing the
complete time series it is doing this with the difference of the reference (
) and original profile (
):

An example code is shown below:
../../examples/example_normal_distribution_with_reference_profile.py
1"""
2example python scripts for the normal distribution method
3"""
4from tssm import TimeSeriesScalingModule as tssm
5
6
7def main() -> None:
8 """
9 main function to show normal distribution scaling examples
10 """
11 # initialize class with a number of buildings of 202 with a simultaneity factor of 0.786
12 scaling_module: tssm = tssm(1, 0.786, one_2_many=False)
13 # read profile from data.csv file and use the Electricity column
14 scaling_module.data.read_profile_from_csv_with_date("./data.csv", "Electricity", "Date")
15 # set scaling profile from Profile_1h_scaling.csv and use H0 column
16 scaling_module.data.read_scaling_profile_from_csv("./Profile_1h_scaling.csv", "H0", separator=",", decimal=".")
17 # calculate normal distribution with the variance for the given simultaneity factor
18 normal_distributed_values = scaling_module.calculate_using_scaling_and_normal_distribution()
19 # print results
20 print(f"normal_distributed_values: {normal_distributed_values}")
21 # calculate normal distribution with a given variance
22 # initialize class with a number of buildings of 202 with a simultaneity factor of 0.786
23 scaling_module = tssm(202)
24 # read profile from data.csv file and use the Electricity column
25 scaling_module.data.read_profile_from_csv_with_date("./data.csv", "Electricity", "Date")
26 # set scaling profile from Profile_1h_scaling.csv and use H0 column
27 scaling_module.data.read_scaling_profile_from_csv("./Profile_1h_scaling.csv", "H0", separator=",", decimal=".")
28 # calculate normal distribution with a given variance
29 normal_distributed_values_with_given_variance = scaling_module.calculate_using_scaling_and_normal_distribution(sigma=1.2)
30 # print results
31 print(f"normal_distributed_values_with_given_variance: {normal_distributed_values_with_given_variance}")
32
33
34if __name__ == "__main__":
35 main()