Commit 73f0d91f authored by 张彦钊's avatar 张彦钊

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

change sql for test
parents 42f49bf4 80acbf27
This diff is collapsed.
......@@ -4,3 +4,4 @@ date,answer_imp_all,answer_imp_ios,answer_imp_android,diary_imp_all,diary_imp_io
20180819,0.0393,0.0538,0.0337,0.7211,0.8763,0.6605,0.0468,0.0726,0.0293,51.29,73.27,0.0175,0.0212,0.0136,0.1115,0.1442,0.085,0.1283,0.1598,0.1027
20180820,0.0374,0.0504,0.032,0.7443,0.8829,0.6866,0.0449,0.068,0.0281,55.88,84.81,0.0157,0.0192,0.0118,0.1142,0.149,0.0846,0.1284,0.1641,0.0981
20180821,0.0376,0.0509,0.0322,0.7392,0.8783,0.6831,0.0429,0.0658,0.0274,58.85,90.43,0.0174,0.0185,0.0162,0.1162,0.1551,0.0846,0.1316,0.1709,0.0998
20180822,0.028,0.0391,0.0226,0.7481,0.8792,0.6837,0.0426,0.0614,0.0267,59.29,80.53,0.0155,0.0151,0.0162,0.1212,0.1513,0.0899,0.1363,0.1659,0.1056,0.0223,0.0267,0.0201,0.0714,0.1077,0.0459
......@@ -81,6 +81,7 @@ try:
click_zero_uid_detail_result = [click_zero_uid_detail_all,click_zero_uid_detail_ios,click_zero_uid_detail_android]
print("已获取无点击用户数激活日期分布")
except:
click_zero_uid_detail_result = []
print("GC life time is shorter than transaction duration")
......@@ -175,19 +176,19 @@ def result2file():
f.write(line)
f.write('\n')
f.write("#1.5点击answer用户占比(=点击answer用户数/曝光answer用户数)\n")
f.write(tplt.format("平台","点击answer用户数","曝光answer用户数","击answer用户占比"))
f.write(tplt.format("平台","点击answer用户数","曝光answer用户数","击answer用户占比"))
for i in click_answer_result:
line = tplt.format(i[0],i[1],i[2],"{}%".format(round(i[3]*100,2)))
f.write(line)
f.write('\n')
f.write("#1.6点击question用户占比(=点击question用户数/曝光question用户数)\n")
f.write(tplt.format("平台","点击question用户数","曝光question用户数","击question用户占比"))
f.write(tplt.format("平台","点击question用户数","曝光question用户数","击question用户占比"))
for i in click_question_result:
line = tplt.format(i[0],i[1],i[2],"{}%".format(round(i[3]*100,2)))
f.write(line)
f.write('\n')
f.write("#1.7点击diary用户占比(=点击diary用户数/曝光diary用户数)\n")
f.write(tplt.format("平台","点击diary用户数","曝光diary用户数","击diary用户占比"))
f.write(tplt.format("平台","点击diary用户数","曝光diary用户数","击diary用户占比"))
for i in click_diary_result:
line = tplt.format(i[0],i[1],i[2],"{}%".format(round(i[3]*100,2)))
f.write(line)
......@@ -198,7 +199,7 @@ def result2file():
line = tplt.format(i[0],i[1],i[2],"{}%".format(round(i[3]*100,2)))
f.write(line)
f.write('\n')
if "click_zero_uid_detail_result" in dir():
if click_zero_uid_detail_result != []:
f.write("#1.9无点击用户数分布(=无点击用户∩激活用户 / 激活用户数) #注意:(]里面的数字指的是距离当前时间的天数\n")
f.write("平台"+'\t\t'+"0-7"+'\t\t'+"7-14"+'\t\t'+ \
"14-30"+'\t\t'+"30-60"+'\t\t'+"60-90"+'\t\t'+"90+"+'\n')
......
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