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

Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline

change sql for test
parents df3f5c33 33194fdf
......@@ -113,22 +113,22 @@ class TopFeatures(object):
def main():
top_answer_all = TopFeatures(1, "all", "answer", 100)
clk_answer_times_all = top_answer.get_click_times()
imp_answer_times_all = top_answer.get_impression_times()
clk_answer_ctr_all = top_answer.get_result(clk_answer_times_all, imp_answer_times_all, 4, "ctr")
top_answer_all = TopFeatures(1, "ios", "answer", 100)
clk_answer_times_ios = top_answer.get_click_times()
imp_answer_times_ios = top_answer.get_impression_times()
clk_answer_ctr_ios = top_answer.get_result(clk_answer_times_ios, imp_answer_times_ios, 4, "ctr")
top_answer_all = TopFeatures(1, "android", "answer", 100)
clk_answer_times_android = top_answer.get_click_times()
imp_answer_times_android = top_answer.get_impression_times()
clk_answer_ctr_android = top_answer.get_result(clk_answer_times_android, imp_answer_times_android, 4, "ctr")
result_lst = [clk_diary_ctr_all, clk_diary_ctr_ios, clk_diary_ctr_android]
output_path = DIRECTORY_PATH + "top100_ctr_diary_%s.txt".format(get_yesterday_date())
clk_answer_times_all = top_answer_all.get_click_times()
imp_answer_times_all = top_answer_all.get_impression_times()
clk_answer_ctr_all = top_answer_all.get_result(clk_answer_times_all, imp_answer_times_all, 4, "ctr")
top_answer_ios = TopFeatures(1, "ios", "answer", 100)
clk_answer_times_ios = top_answer_ios.get_click_times()
imp_answer_times_ios = top_answer_ios.get_impression_times()
clk_answer_ctr_ios = top_answer_ios.get_result(clk_answer_times_ios, imp_answer_times_ios, 4, "ctr")
top_answer_android = TopFeatures(1, "android", "answer", 100)
clk_answer_times_android = top_answer_android.get_click_times()
imp_answer_times_android = top_answer_android.get_impression_times()
clk_answer_ctr_android = top_answer_android.get_result(clk_answer_times_android, imp_answer_times_android, 4, "ctr")
result_lst = [clk_answer_ctr_all, clk_answer_ctr_ios, clk_answer_ctr_android]
output_path = DIRECTORY_PATH + "top100_ctr_answer_{}.txt".format(get_yesterday_date())
top_answer_all.result2file(result_lst, output_path)
......
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