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
e24c91d9
Commit
e24c91d9
authored
Aug 27, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update layers
parent
c8b30d12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
click_fe.py
src/models/esmm/fe/click_fe.py
+1
-1
train_tractate.py
src/train_tractate.py
+1
-1
No files found.
src/models/esmm/fe/click_fe.py
View file @
e24c91d9
...
...
@@ -6,7 +6,7 @@ def click_feature_engineering(click_df, conversion_df):
# conversion_df = conversion_df.copy()
click_df
.
rename
(
columns
=
{
"label"
:
"click_label"
},
inplace
=
True
)
click_df
=
click_df
.
sample
(
conversion_df
.
shape
[
0
]
*
10
)
#
click_df = click_df.sample(conversion_df.shape[0] * 10)
print
(
"click_df: "
+
str
(
click_df
.
shape
))
conversion_df
.
rename
(
columns
=
{
"label"
:
"conversion_label"
},
inplace
=
True
)
print
(
"conversion_df: "
+
str
(
conversion_df
.
shape
))
...
...
src/train_tractate.py
View file @
e24c91d9
...
...
@@ -47,7 +47,7 @@ def main():
train_df
,
val_df
=
train_test_split
(
train_df
,
test_size
=
0.2
)
all_features
=
fe
.
build_features
(
df
,
tractate_fe
.
INT_COLUMNS
,
tractate_fe
.
FLOAT_COLUMNS
,
tractate_fe
.
CATEGORICAL_COLUMNS
)
params
=
{
"feature_columns"
:
all_features
,
"hidden_units"
:
[
128
,
64
,
32
],
"learning_rate"
:
0.1
}
params
=
{
"feature_columns"
:
all_features
,
"hidden_units"
:
[
360
,
200
,
80
,
2
],
"learning_rate"
:
0.2
}
model_path
=
str
(
Path
(
"/data/files/model_tmp/tractate/"
)
.
expanduser
())
if
os
.
path
.
exists
(
model_path
):
shutil
.
rmtree
(
model_path
)
...
...
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