Commit ee6555f3 authored by 张彦钊's avatar 张彦钊

change main function for test

parent 11c1c9b8
...@@ -98,7 +98,7 @@ if __name__ == "__main__": ...@@ -98,7 +98,7 @@ if __name__ == "__main__":
start = time.time() start = time.time()
empty,device_id_list = get_active_users() empty,device_id_list = get_active_users()
if empty: if empty:
time.sleep(10) time.sleep(60)
else: else:
old_device_id_list = pd.read_csv(DIRECTORY_PATH + "data_set_device_id.csv")["device_id"].values.tolist() old_device_id_list = pd.read_csv(DIRECTORY_PATH + "data_set_device_id.csv")["device_id"].values.tolist()
for device_id in device_id_list: for device_id in device_id_list:
......
...@@ -60,7 +60,7 @@ def feature_en(): ...@@ -60,7 +60,7 @@ def feature_en():
print(cid_df.head(2)) print(cid_df.head(2))
cid_df.to_csv(DIRECTORY_PATH + "data_set_cid.csv", index=False) cid_df.to_csv(DIRECTORY_PATH + "data_set_cid.csv", index=False)
# 将device_id 保存目的是为了判断预测的device_id是否在这个集合里,如果不在,不需要预测 # 将device_id 保存,目的是为了判断预测的device_id是否在这个集合里,如果不在,不需要预测
data_set_device_id = data["device_id"].unique() data_set_device_id = data["device_id"].unique()
device_id_df = pd.DataFrame() device_id_df = pd.DataFrame()
device_id_df['device_id'] = data_set_device_id device_id_df['device_id'] = data_set_device_id
......
...@@ -8,7 +8,7 @@ if __name__ == "__main__": ...@@ -8,7 +8,7 @@ if __name__ == "__main__":
data, test_number, validation_number = feature_en() data, test_number, validation_number = feature_en()
ffm_transform(data, test_number, validation_number) ffm_transform(data, test_number, validation_number)
train() train()
print("end")
# print('---------------prepare candidates--------------')
# get_eachCityDiaryTop3000()
print('---------------prepare candidates--------------')
get_eachCityDiaryTop3000()
print("end")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment