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
8dd00094
Commit
8dd00094
authored
Oct 16, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5f59177f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
evaluation_metrics.py
eda/smart_rank/evaluation_metrics.py
+3
-0
No files found.
eda/smart_rank/evaluation_metrics.py
View file @
8dd00094
...
...
@@ -307,6 +307,7 @@ if __name__ == '__main__':
help
=
"天数差归一化的区间"
)
parser
.
add_argument
(
"-d"
,
"--decay_days"
,
type
=
int
,
dest
=
"decay_days"
,
default
=
180
,
help
=
"分数衰减的天数"
)
parser
.
add_argument
(
"-a"
,
"--action_type"
,
dest
=
"action_type"
,
nargs
=
'+'
,
help
=
"计算匹配度的行为"
)
parser
.
add_argument
(
"-s"
,
"--save_tidb"
,
type
=
int
,
dest
=
"save_tidb"
,
default
=
1
,
help
=
"统计结果是否存tidb"
)
args
=
parser
.
parse_args
()
order_date
=
args
.
order_date
order_date_tomorrow
=
str
(
datetime
.
datetime
.
strptime
(
order_date
,
'
%
Y-
%
m-
%
d'
)
+
datetime
.
timedelta
(
days
=
1
))
...
...
@@ -319,6 +320,7 @@ if __name__ == '__main__':
normalization_size
=
args
.
normalization_size
decay_days
=
args
.
decay_days
action_type
=
args
.
action_type
save_tidb
=
args
.
save_tidb
LOG_DIR
=
"/home/gmuser/gyz/log/"
my_today
=
str
(
datetime
.
date
.
today
())
...
...
@@ -435,6 +437,7 @@ if __name__ == '__main__':
log1
.
info
(
"="
*
66
)
# 统计数据进tidb
if
save_tidb
:
tplt
=
"insert into user_portrait_tags_evalution values(null,'{0}','{1}','{2}',{3},{4},{5},{6},{7})"
stat_date
=
order_date
.
replace
(
"-"
,
""
)
insert_sql
=
tplt
.
format
(
stat_date
,
"英赫版"
if
version
==
1
else
"翔宇版"
,
action_type_detail
,
...
...
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