Changes:完整窗口均值计算以及对应测试代码完成
This commit is contained in:
@@ -3,6 +3,8 @@ from average import average
|
||||
import ray
|
||||
|
||||
ray.init()
|
||||
|
||||
ray.RAY_DISABLE_MEMORY_MONITOR=1
|
||||
filepath = "D:/python_project_data/1.csv"
|
||||
origin_data = pd.read_csv(filepath)
|
||||
row_len = origin_data.shape[0]
|
||||
@@ -17,9 +19,9 @@ algorithm_average.set_config.remote('{"AVERAGE_NUMBER": 5 }')
|
||||
# algorithm_step.set_config('{"CYCLE_TIME_BASE": 5 }')
|
||||
for i in range(0,row_len):
|
||||
futures=algorithm_average.eval.remote(origin_data.loc[i,cow_name])
|
||||
average_data.loc[i,cow_name]=ray.get(futures)
|
||||
average_data.loc[i, cow_name]=ray.get(futures)
|
||||
|
||||
print(average_data.loc[:,cow_name])
|
||||
print(average_data.loc[:, cow_name])
|
||||
contrast_data[cow_name+'_average'] = average_data[cow_name]
|
||||
# average_data.to_csv("D:/python_project_data/1_disturb.csv", index=False)
|
||||
contrast_data.to_csv("D:/python_project_data/average_data.csv", index=False)
|
||||
|
||||
Reference in New Issue
Block a user