Skip to content

Commit

Permalink
upload large csv file
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinhe-Chen committed Jun 27, 2022
1 parent 24b6904 commit a6f5b81
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit a6f5b81

Please sign in to comment.