Commit 5207411c authored by 张彦钊's avatar 张彦钊

修改ctr参数指标

parent 2187db02
......@@ -39,7 +39,7 @@ def ctr_all():
cover = len(set(device_id) & set(tail56))
print("当天尾号5或6活跃用户覆盖数:")
print(cover)
cover_percent = cover / len(set(device_id))
cover_percent = cover / len(set(tail56))
print("当天尾号5或6活跃用户覆盖率:")
print(cover_percent)
sql_click = "select count(cid) from data_feed_click " \
......@@ -79,7 +79,7 @@ def ctr():
def rate2file():
output_path = DIRECTORY_PATH + "56tail.csv"
output_path = DIRECTORY_PATH + "56ctr.csv"
with open(output_path,'a+') as f:
line = date.replace('-', '')+','+str(temp_data[0])+','+str(temp_data[1])+','+str(temp_data[2])+\
","+str(data[0])+","+str(data[1])+","+str(data[2])+","+str(data[3])+","+str(data[4])\
......
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