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
5991bc3b
Commit
5991bc3b
authored
Jul 30, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
predict tractate
parent
32d47eb6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
main_portrait.py
src/main_portrait.py
+5
-5
No files found.
src/main_portrait.py
View file @
5991bc3b
...
...
@@ -32,8 +32,8 @@ def user_portrait_scan_info(device_dict, diary_dict, tractate_dict, diary_predic
if
(
user_portrait_tag3_get_candidate_dict
(
device_id
,
"diary"
)):
all_count
+=
1
print
(
str
(
all_count
)
+
": "
+
device_id
)
offline_predict_diary
(
device_id
,
device_dict
,
diary_dict
,
diary_predict_fn
)
#
offline_predict_tractate(device_dict, device_dict, tractate_dict, tractate_predict_fn)
#
offline_predict_diary(device_id, device_dict, diary_dict, diary_predict_fn)
offline_predict_tractate
(
device_dict
,
device_dict
,
tractate_dict
,
tractate_predict_fn
)
print
(
"all count: "
+
str
(
all_count
))
print
(
"scan done "
+
str
(
datetime
.
datetime
.
now
()))
...
...
@@ -52,7 +52,7 @@ def offline_predict_diary(device_id, device_dict, diary_dict, predict_fn):
user_portrait_tag3_write_ctcvr_data
(
device_id
,
"diary"
,
res
[:
500
])
total_time
=
(
time
.
time
()
-
time_begin
)
print
(
"total cost {:.5f}s
\n
"
.
format
(
total_time
))
print
(
"total cost {:.5f}s"
.
format
(
total_time
))
def
offline_predict_tractate
(
device_id
,
device_dict
,
tractate_dict
,
predict_fn
):
...
...
@@ -62,8 +62,8 @@ def offline_predict_tractate(device_id, device_dict, tractate_dict, predict_fn):
print
(
"tractate_ids: "
+
str
(
len
(
tractate_ids
)))
res
=
model_predict_tractate
(
device_id
,
tractate_ids
,
device_dict
,
tractate_dict
,
predict_fn
)
print
(
"res: "
+
str
(
len
(
res
)))
#
print(res[:10])
user_portrait_tag3_write_ctcvr_data
(
device_id
,
"tractate"
,
res
[:
500
])
print
(
res
[:
10
])
#
user_portrait_tag3_write_ctcvr_data(device_id, "tractate", res[:500])
total_time
=
(
time
.
time
()
-
time_begin
)
print
(
"total cost {:.5f}s
\n
"
.
format
(
total_time
))
...
...
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