Commit 0e4f7330 authored by mengxiangxuan's avatar mengxiangxuan

00

parent ae9e1e99
......@@ -122,7 +122,7 @@ cvr_roc_data=pd.DataFrame(cursor.fetchall(),
alg=['alg-4.0','alg-4.0.1',
'alg-4.0.2','alg-4.0.4','alg-4.1','alg-4.2.1',
'alg-610','alg-act-tab','alg-online-learn223',
'alg-act-tab','alg-online-learn223',
'alg-online-learn224','alg-online-weight',
'alg-app-optimize', 'alg-act-count',
'alg-fm-backend','BTM_AND_PC_31','Material_reform',
......
......@@ -230,7 +230,7 @@ stat_slotad_cvr_merge.ix[stat_slotad_cvr_merge['cvr_bias1']<=1.5].shape[0]/stat_
stat_slotad_cvr_merge.ix[(stat_slotad_cvr_merge['stat_cvr1_x']<=0.05) & (stat_slotad_cvr_merge['cvr_bias1']<=1.5)].shape[0]/stat_slotad_cvr_merge.ix[(stat_slotad_cvr_merge['stat_cvr1_x']<=0.05) & (stat_slotad_cvr_merge['cvr_bias1']>0)].shape[0]
stat_slotad_cvr_merge.ix[(stat_slotad_cvr_merge['stat_cvr1_x']>0.05) & (stat_slotad_cvr_merge['cvr_bias1']<=1.5)].shape[0]/stat_slotad_cvr_merge.ix[(stat_slotad_cvr_merge['stat_cvr1_x']>0.05) & (stat_slotad_cvr_merge['cvr_bias1']>0)].shape[0]
#低出价
stat_slotad_cvr_merge['cvr_bias0']=stat_slotad_cvr_merge['stat_cvr2_x']/stat_slotad_cvr_merge['stat_cvr0_y']
stat_slotad_cvr_merge['cvr_bias0']=stat_slotad_cvr_merge['stat_cvr0_x']/stat_slotad_cvr_merge['stat_cvr0_y']
#综合0.86.5 高cvr时0.86 低cvr时0.85 按cvr=0.05分割 0.86.2
stat_slotad_cvr_merge.ix[stat_slotad_cvr_merge['cvr_bias0']<=1.5].shape[0]/stat_slotad_cvr_merge.ix[stat_slotad_cvr_merge['cvr_bias0']>0].shape[0]
stat_slotad_cvr_merge.ix[(stat_slotad_cvr_merge['stat_cvr0_x']<=0.05) & (stat_slotad_cvr_merge['cvr_bias0']<=1.5)].shape[0]/stat_slotad_cvr_merge.ix[(stat_slotad_cvr_merge['stat_cvr0_x']<=0.05) & (stat_slotad_cvr_merge['cvr_bias0']>0)].shape[0]
......
......@@ -106,7 +106,7 @@ ad_pre_cvr_eva['ad_pre_diff']=ad_pre_cvr_eva['cvr']/ad_pre_cvr_eva['ad_cvr']
#综合80% 高cvr 81% 低cvr<0.02 35% cvr<0.01 10%
ad_pre_cvr_eva.ix[ad_pre_cvr_eva['ad_pre_diff']<1.5].shape[0]/ad_pre_cvr_eva.ix[ad_pre_cvr_eva['ad_pre_diff']>0].shape[0]#26%的准确率
ad_pre_cvr_eva.ix[ad_pre_cvr_eva['ad_pre_diff']<1.5].shape[0]/ad_pre_cvr_eva.ix[ad_pre_cvr_eva['ad_pre_diff']>0].shape[0]
ad_pre_cvr_eva.ix[(ad_pre_cvr_eva['ad_pre_diff']<1.5) & (ad_pre_cvr_eva['ad_cvr']>0.05)].shape[0]/ad_pre_cvr_eva.ix[(ad_pre_cvr_eva['ad_pre_diff']>0) & (ad_pre_cvr_eva['ad_cvr']>0.05)].shape[0]
ad_pre_cvr_eva.ix[(ad_pre_cvr_eva['ad_pre_diff']<1.5) & (ad_pre_cvr_eva['ad_cvr']<=0.02)].shape[0]/ad_pre_cvr_eva.ix[(ad_pre_cvr_eva['ad_pre_diff']>0) & (ad_pre_cvr_eva['ad_cvr']<=0.02)].shape[0]
......
......@@ -27,11 +27,12 @@ params_dict={
}
}
params_key="NZ_K86_trusteeship_params"
params_value=json.dumps(params_dict)
params_key=params_value=json.dumps(params_dict)
pool = redis.ConnectionPool(host='r-bp18da0abeaddc94285.redis.rds.aliyuncs.com',
password='hteK73Zxx3ji9LGCy2jBAZDJ6', port=6379, db=0)
r = redis.Redis(connection_pool=pool)
r.set(params_key,params_value)
\ No newline at end of file
r.set(params_key,params_value)
print(params_value)
\ No newline at end of file
......@@ -66,7 +66,8 @@ sql2='''CREATE TABLE if not exists advert.dws_not_luanch_create_samples_mxx as
last_charge_status,
last_activity_equal_status,
city_id,
activity_use_type
activity_use_type,
day_last_match_tag_nums_equal_status,
rank_num,ROW_NUMBER() OVER(PARTITION BY slotid ORDER BY rank_num) rnb
from
(select *,cast(rand()*100000000 as double) rank_num from advert.dws_advert_order_wide_v4_level_6_di
......
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