Commit 006a3281 authored by 张彦钊's avatar 张彦钊

add note for test

parent 7ce29060
......@@ -178,14 +178,14 @@ def predict_save_to_local(user_profile, instance):
def predict(user_profile):
instance = feature_en(user_profile)
instance_file_path = transform_ffm_format(instance, user_profile["device_id"])
#
# ffm_model = xl.create_ffm()
# ffm_model.setTest(instance_file_path)
# ffm_model.setSigmoid()
# ffm_model.predict(DIRECTORY_PATH + "model_{0}-{1}_lr{2}_lambda{3}.out".format(DATA_START_DATE,
# DATA_END_DATE, lr, l2_lambda),
# DIRECTORY_PATH + "result/{0}_output.txt".format(user_profile['device_id']))
# print("预测结束")
ffm_model = xl.create_ffm()
ffm_model.setTest(instance_file_path)
ffm_model.setSigmoid()
ffm_model.predict(DIRECTORY_PATH + "model_{0}-{1}_lr{2}_lambda{3}.out".format(DATA_START_DATE,
DATA_END_DATE, lr, l2_lambda),
DIRECTORY_PATH + "result/{0}_output.txt".format(user_profile['device_id']))
print("预测结束")
# predict_save_to_local(user_profile, instance)
def router(device_id):
user_profile, not_exist = fetch_user_profile(device_id)
......
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