diff --git a/dispatches/workflow/train_market_surrogates/dynamic/Dispatch_shuffled_data_0.csv b/dispatches/workflow/train_market_surrogates/dynamic/Dispatch_shuffled_data_0.csv new file mode 100644 index 000000000..0d68d68b9 --- /dev/null +++ b/dispatches/workflow/train_market_surrogates/dynamic/Dispatch_shuffled_data_0.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec4dadaad3bd3e02ab0b2e544e6b0182cce1607e6b7935fcfcfc6e68f295318a +size 350505276 diff --git a/dispatches/workflow/train_market_surrogates/dynamic/filter_01_6400_years.py b/dispatches/workflow/train_market_surrogates/dynamic/filter_01_6400_years.py index e9cb9afdf..a5d89cd8d 100644 --- a/dispatches/workflow/train_market_surrogates/dynamic/filter_01_6400_years.py +++ b/dispatches/workflow/train_market_surrogates/dynamic/filter_01_6400_years.py @@ -200,20 +200,20 @@ def cluster_data(self, train_data, clusters, data_num, save_index = False): return labels -# def main(): +def main(): -# metric = 'euclidean' -# years = 6400 -# num_clusters = 50 + metric = 'euclidean' + years = 6400 + num_clusters = 50 -# for i in range(10): -# dispatch_data = f'Dispatch_data_{i}.csv' -# tsa_task = TSA64K(dispatch_data, metric, years) -# dispatch_array = tsa_task.read_data() -# tsa_task.read_input_pmax() -# train_data,day_01 = tsa_task.transform_data(dispatch_array) -# labels = tsa_task.cluster_data(train_data, num_clusters, i, save_index = True) -# print(day_01) - -# if __name__ == '__main__': -# main() + for i in range(10): + dispatch_data = f'Dispatch_data_{i}.csv' + tsa_task = TSA64K(dispatch_data, metric, years) + dispatch_array = tsa_task.read_data() + tsa_task.read_input_pmax() + train_data,day_01 = tsa_task.transform_data(dispatch_array) + labels = tsa_task.cluster_data(train_data, num_clusters, i, save_index = True) + print(day_01) + +if __name__ == '__main__': + main() diff --git a/dispatches/workflow/train_market_surrogates/dynamic/tslearn_test_6400_years.py b/dispatches/workflow/train_market_surrogates/dynamic/tslearn_test_6400_years.py index e2dbf8c2e..eea6d905a 100644 --- a/dispatches/workflow/train_market_surrogates/dynamic/tslearn_test_6400_years.py +++ b/dispatches/workflow/train_market_surrogates/dynamic/tslearn_test_6400_years.py @@ -197,20 +197,20 @@ def plot_origin_data(self, lmp_array, dispatch_array): plt.savefig('lmp.jpg') -# def main(): +def main(): -# metric = 'euclidean' -# years = 6400 -# num_clusters = 50 + metric = 'euclidean' + years = 6400 + num_clusters = 50 -# for i in range(10): -# dispatch_data = f'Dispatch_data_{i}.csv' -# tsa_task = TSA64K(dispatch_data, metric, years) -# dispatch_array = tsa_task.read_data() -# tsa_task.read_input_pmax() -# train_data = tsa_task.transform_data(dispatch_array) -# labels = tsa_task.cluster_data(train_data, num_clusters, i, save_index = True) + for i in range(10): + dispatch_data = f'Dispatch_data_{i}.csv' + tsa_task = TSA64K(dispatch_data, metric, years) + dispatch_array = tsa_task.read_data() + tsa_task.read_input_pmax() + train_data = tsa_task.transform_data(dispatch_array) + labels = tsa_task.cluster_data(train_data, num_clusters, i, save_index = True) -# if __name__ == '__main__': -# main() +if __name__ == '__main__': + main()