Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
strategy_embedding
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
strategy_embedding
Commits
1a4e0fff
Commit
1a4e0fff
authored
Oct 29, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ids
parent
21aaf34f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tests.py
word_vector/tests.py
+2
-2
word_to_vec.py
word_vector/word_to_vec.py
+1
-1
No files found.
word_vector/tests.py
View file @
1a4e0fff
...
...
@@ -9,8 +9,8 @@ model_dir = os.path.join(base_dir, "_models")
data_dir
=
os
.
path
.
join
(
base_dir
,
"_data"
)
if
__name__
==
"__main__"
:
id1
=
[
"
366825"
,
"203194"
]
# 下颚角
id2
=
[
"87874"
,
"84198"
]
# 双眼皮
id1
=
[
"
202647"
,
"386735"
]
# 下颚角 5/1252645
id2
=
[
"87874"
,
"84198"
]
# 双眼皮
95
with
open
(
os
.
path
.
join
(
data_dir
,
"click_tractate_ids.csv"
),
"r"
)
as
f
:
data
=
f
.
readlines
()
...
...
word_vector/word_to_vec.py
View file @
1a4e0fff
...
...
@@ -90,7 +90,7 @@ def save_clicked_tractate_ids_item2vec():
data
=
f
.
readlines
()
for
i
in
data
:
tmp
=
i
.
split
(
"|"
)
#
device
_id = tmp[0]
#
app_session
_id = tmp[0]
ids
=
tmp
[
1
]
.
rstrip
(
"
\n
"
)
.
split
(
","
)
click_ids
.
append
(
ids
)
model
=
Word2Vec
(
click_ids
,
hs
=
0
,
min_count
=
3
,
workers
=
multiprocessing
.
cpu_count
(),
iter
=
10
)
...
...
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