Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
4bffdd40
Commit
4bffdd40
authored
Feb 21, 2020
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
5bc958d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
make_data.py
make_data.py
+4
-2
No files found.
make_data.py
View file @
4bffdd40
...
...
@@ -61,7 +61,6 @@ def doctor():
df
[
"commission"
]
=
(
df
[
"doctor_discount_30_days"
]
+
df
[
"budan_payment_30_days"
])
/
df
[
"tmp"
]
df
[
"pv_ad"
]
=
df
[
"expand_rechange_amount_30"
]
/
df
[
"tmp"
]
df
[
"score"
]
=
df
[
"ctr"
]
**
0.5
*
(
df
[
"commission"
]
+
df
[
"pv_ad"
])
df
.
loc
[
df
[
"all_exposure"
]
<=
1500
,
[
"ctr"
]]
=
0.01
df
.
loc
[
df
[
"ctr"
]
<
0.01
,
[
"ctr"
]]
=
0.01
...
...
@@ -71,6 +70,8 @@ def doctor():
df
.
loc
[
df
[
"pv_ad"
]
>
20
,
[
"pv_ad"
]]
=
20
df
.
loc
[
df
[
"pv_ad"
]
<
0.01
,
[
"pv_ad"
]]
=
0.01
df
[
"score"
]
=
df
[
"ctr"
]
**
0.5
*
(
df
[
"commission"
]
+
df
[
"pv_ad"
])
columns
=
[
"doctor_id"
,
"score"
,
"ctr"
,
"commission"
,
"pv_ad"
,
"service_exposure_pv_30"
,
"service_ctr_30"
,
"expert_exposure_pv_30"
,
"expert_pv_30"
,
"merchant_id"
,
"doctor_discount_30_days"
,
"expand_rechange_amount_30"
,
"service_pv_30"
,
...
...
@@ -146,7 +147,6 @@ def hospital():
df
[
"commission"
]
=
(
df
[
"doctor_discount_30_days"
]
+
df
[
"budan_payment_30_days"
])
/
df
[
"tmp"
]
df
[
"cpt"
]
=
df
[
"expand_rechange_amount_30"
]
/
df
[
"tmp"
]
df
[
"score"
]
=
df
[
"ctr"
]
**
0.5
*
(
df
[
"commission"
]
+
df
[
"cpt"
])
df
.
loc
[
df
[
"all_exposure"
]
<=
1500
,
[
"ctr"
]]
=
0.01
df
.
loc
[
df
[
"ctr"
]
<
0.01
,
[
"ctr"
]]
=
0.01
...
...
@@ -156,6 +156,8 @@ def hospital():
df
.
loc
[
df
[
"commission"
]
>
20
,
[
"commission"
]]
=
20
df
.
loc
[
df
[
"commission"
]
<
0.01
,
[
"commission"
]]
=
0.01
df
[
"score"
]
=
df
[
"ctr"
]
**
0.5
*
(
df
[
"commission"
]
+
df
[
"cpt"
])
columns
=
[
"doctor_id"
,
"score"
,
"ctr"
,
"commission"
,
"cpt"
,
"hospital_id"
,
"hospital_exposure_pv_30"
,
"service_exposure_pv_30"
,
"expert_exposure_pv_30"
,
"service_ctr_30"
,
"hospital_ctr_30"
,
"expert_ctr_30"
,
"merchant_id"
,
"budan_payment_30_days"
,
...
...
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