Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tuia-alg-engineering-py
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mengxiangxuan
tuia-alg-engineering-py
Commits
0e4f7330
Commit
0e4f7330
authored
Nov 21, 2018
by
mengxiangxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
00
parent
ae9e1e99
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
roc_ks.py
alg-evaluat-system/model_evaluat/roc_ks.py
+1
-1
effect_eva.py
auto-spread/auto_manage/effect_eva.py
+1
-1
effect_eva2.0.py
auto-spread/auto_manage/effect_eva2.0.py
+1
-1
params.py
auto-spread/auto_manage/params.py
+4
-3
samples_create.py
auto-spread/auto_manage/samples_create.py
+2
-1
No files found.
alg-evaluat-system/model_evaluat/roc_ks.py
View file @
0e4f7330
...
...
@@ -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'
,
...
...
auto-spread/auto_manage/effect_eva.py
View file @
0e4f7330
...
...
@@ -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_cvr
2
_x'
]
/
stat_slotad_cvr_merge
[
'stat_cvr0_y'
]
stat_slotad_cvr_merge
[
'cvr_bias0'
]
=
stat_slotad_cvr_merge
[
'stat_cvr
0
_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
]
...
...
auto-spread/auto_manage/effect_eva2.0.py
View file @
0e4f7330
...
...
@@ -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
]
...
...
auto-spread/auto_manage/params.py
View file @
0e4f7330
...
...
@@ -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
auto-spread/auto_manage/samples_create.py
View file @
0e4f7330
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment