Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_strategy_cvr
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
gm_strategy_cvr
Commits
94e26179
Commit
94e26179
authored
Aug 14, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
predict diary
parent
47e126d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
16 deletions
+11
-16
diary_model.py
src/models/esmm/diary_model.py
+7
-12
diary_fe.py
src/models/esmm/fe/diary_fe.py
+4
-4
No files found.
src/models/esmm/diary_model.py
View file @
94e26179
...
@@ -87,17 +87,13 @@ _float_columns = [
...
@@ -87,17 +87,13 @@ _float_columns = [
"seven_vote_pure_rate"
,
"seven_vote_pure_rate"
,
"fifteen_vote_pure_rate"
,
"fifteen_vote_pure_rate"
,
"thirty_vote_pure_rate"
,
"thirty_vote_pure_rate"
,
"sixty_vote_pure_rate"
,
# "sixty_vote_pure_rate",
"ninety_vote_pure_rate"
,
# "ninety_vote_pure_rate",
"history_vote_pure_rate"
,
# "history_vote_pure_rate",
"one_reply_pure_rate"
,
# "one_reply_pure_rate",
"three_reply_pure_rate"
,
# "three_reply_pure_rate",
"seven_reply_pure_rate"
,
# "seven_reply_pure_rate",
"fifteen_reply_pure_rate"
,
# "fifteen_reply_pure_rate",
"thirty_reply_pure_rate"
,
"sixty_reply_pure_rate"
,
"ninety_reply_pure_rate"
,
"history_reply_pure_rate"
,
]
]
_categorical_columns
=
[
_categorical_columns
=
[
"device_id"
,
"past_consume_ability_history"
,
"potential_consume_ability_history"
,
"price_sensitive_history"
,
"device_fd"
,
"device_id"
,
"past_consume_ability_history"
,
"potential_consume_ability_history"
,
"price_sensitive_history"
,
"device_fd"
,
...
@@ -123,7 +119,6 @@ def model_predict_diary(device_id, diary_ids, device_dict, diary_dict, predict_f
...
@@ -123,7 +119,6 @@ def model_predict_diary(device_id, diary_ids, device_dict, diary_dict, predict_f
tmp
.
update
(
diary_info
)
tmp
.
update
(
diary_info
)
features
=
{}
features
=
{}
for
col
in
_int_columns
:
for
col
in
_int_columns
:
print
(
col
)
features
[
col
]
=
_int64_feature
(
int
(
tmp
[
col
]))
features
[
col
]
=
_int64_feature
(
int
(
tmp
[
col
]))
for
col
in
_float_columns
:
for
col
in
_float_columns
:
features
[
col
]
=
_float_feature
(
float
(
tmp
[
col
]))
features
[
col
]
=
_float_feature
(
float
(
tmp
[
col
]))
...
...
src/models/esmm/fe/diary_fe.py
View file @
94e26179
...
@@ -185,10 +185,10 @@ FLOAT_COLUMNS = [
...
@@ -185,10 +185,10 @@ FLOAT_COLUMNS = [
"three_reply_pure_rate"
,
"three_reply_pure_rate"
,
"seven_reply_pure_rate"
,
"seven_reply_pure_rate"
,
"fifteen_reply_pure_rate"
,
"fifteen_reply_pure_rate"
,
"thirty_reply_pure_rate"
,
#
"thirty_reply_pure_rate",
"sixty_reply_pure_rate"
,
#
"sixty_reply_pure_rate",
"ninety_reply_pure_rate"
,
#
"ninety_reply_pure_rate",
"history_reply_pure_rate"
,
#
"history_reply_pure_rate",
]
]
CATEGORICAL_COLUMNS
=
[
CATEGORICAL_COLUMNS
=
[
"device_id"
,
"active_type"
,
"past_consume_ability_history"
,
"potential_consume_ability_history"
,
"price_sensitive_history"
,
"device_id"
,
"active_type"
,
"past_consume_ability_history"
,
"potential_consume_ability_history"
,
"price_sensitive_history"
,
...
...
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