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
0c6e26da
Commit
0c6e26da
authored
Oct 15, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改参数默认值
parent
87ef417e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tool.py
eda/smart_rank/tool.py
+5
-5
No files found.
eda/smart_rank/tool.py
View file @
0c6e26da
...
@@ -174,7 +174,7 @@ def get_tag2_from_tag3(tag3, all_3tag_2tag, user_log_df_tag2_list):
...
@@ -174,7 +174,7 @@ def get_tag2_from_tag3(tag3, all_3tag_2tag, user_log_df_tag2_list):
print
(
e
)
print
(
e
)
def
compute_henqiang
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
1
):
def
compute_henqiang
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
0
):
if
exponential
:
if
exponential
:
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
score
=
15
-
2
**
alpha
*
((
15
-
0.5
)
/
decay_days
)
score
=
15
-
2
**
alpha
*
((
15
-
0.5
)
/
decay_days
)
...
@@ -184,7 +184,7 @@ def compute_henqiang(x, decay_days=180, normalization_size=7, exponential=1):
...
@@ -184,7 +184,7 @@ def compute_henqiang(x, decay_days=180, normalization_size=7, exponential=1):
return
score
return
score
else
:
else
:
return
0.5
return
0.5
def
compute_jiaoqiang
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
1
):
def
compute_jiaoqiang
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
0
):
if
exponential
:
if
exponential
:
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
score
=
12
-
2
**
alpha
*
((
12
-
0.5
)
/
decay_days
)
score
=
12
-
2
**
alpha
*
((
12
-
0.5
)
/
decay_days
)
...
@@ -194,7 +194,7 @@ def compute_jiaoqiang(x, decay_days=180, normalization_size=7, exponential=1):
...
@@ -194,7 +194,7 @@ def compute_jiaoqiang(x, decay_days=180, normalization_size=7, exponential=1):
return
score
return
score
else
:
else
:
return
0.5
return
0.5
def
compute_ruoyixiang
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
1
):
def
compute_ruoyixiang
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
0
):
if
exponential
:
if
exponential
:
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
score
=
5
-
2
**
alpha
*
((
5
-
0.5
)
/
decay_days
)
score
=
5
-
2
**
alpha
*
((
5
-
0.5
)
/
decay_days
)
...
@@ -204,7 +204,7 @@ def compute_ruoyixiang(x, decay_days=180, normalization_size=7, exponential=1):
...
@@ -204,7 +204,7 @@ def compute_ruoyixiang(x, decay_days=180, normalization_size=7, exponential=1):
return
score
return
score
else
:
else
:
return
0.5
return
0.5
def
compute_validate
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
1
):
def
compute_validate
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
0
):
if
exponential
:
if
exponential
:
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
score
=
10
-
2
**
alpha
*
((
10
-
0.5
)
/
decay_days
)
score
=
10
-
2
**
alpha
*
((
10
-
0.5
)
/
decay_days
)
...
@@ -214,7 +214,7 @@ def compute_validate(x, decay_days=180, normalization_size=7, exponential=1):
...
@@ -214,7 +214,7 @@ def compute_validate(x, decay_days=180, normalization_size=7, exponential=1):
return
score
return
score
else
:
else
:
return
0.5
return
0.5
def
compute_ai_scan
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
1
):
def
compute_ai_scan
(
x
,
decay_days
=
180
,
normalization_size
=
7
,
exponential
=
0
):
if
exponential
:
if
exponential
:
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
alpha
=
exponential_decay
(
x
,
decay_days
,
normalization_size
)
score
=
2
-
2
**
alpha
*
((
2
-
0.5
)
/
decay_days
)
score
=
2
-
2
**
alpha
*
((
2
-
0.5
)
/
decay_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