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
a6cba4eb
Commit
a6cba4eb
authored
Nov 16, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get data from file
parent
c7d5572c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
35 deletions
+2
-35
dssm_model.py
personas_vector/dssm_model.py
+1
-1
personas_dssm_model.py
personas_vector/personas_dssm_model.py
+0
-34
files.py
utils/files.py
+1
-0
No files found.
personas_vector/dssm_model.py
View file @
a6cba4eb
import
pandas
as
pd
from
utils.defs
import
nth_element
from
utils.files
import
get_df
from
utils.utils
import
nth_element
DEVICE_COLUMNS
=
[
"device_id"
,
...
...
personas_vector/personas_dssm_model.py
deleted
100644 → 0
View file @
c7d5572c
import
pandas
as
pd
from
utils.defs
import
nth_element
from
utils.files
import
get_df
DEVICE_COLUMNS
=
[
"device_id"
,
]
TRACTATE_COLUMNS
=
[
"card_id"
,
]
def
device_tractae_fe
():
click_df
=
get_df
(
"personas_tractate_click.csv"
)
exposure_df
=
get_df
(
"personas_tractate_exposure.csv"
)
device_fe_df
=
get_df
(
"personas_device_feature.csv"
)
tractate_tags_df
=
get_df
(
"personas_tractate_tags.csv"
)
print
(
click_df
.
shape
)
print
(
exposure_df
.
shape
)
print
(
device_fe_df
.
shape
)
print
(
tractate_tags_df
.
shape
)
if
__name__
==
"__main__"
:
click_df
=
get_df
(
"personas_tractate_click.csv"
)
exposure_df
=
get_df
(
"personas_tractate_exposure.csv"
)
device_fe_df
=
get_df
(
"personas_device_feature.csv"
)
tractate_tags_df
=
get_df
(
"personas_tractate_tags.csv"
)
print
(
click_df
.
shape
)
print
(
exposure_df
.
shape
)
print
(
device_fe_df
.
shape
)
print
(
tractate_tags_df
.
shape
)
print
(
tractate_tags_df
.
head
(
3
))
utils/files.py
View file @
a6cba4eb
...
...
@@ -34,5 +34,6 @@ def save_dict_to_csv(d, file):
def
get_df
(
file
):
full_path
=
os
.
path
.
join
(
DATA_PATH
,
file
)
print
(
full_path
)
df
=
pd
.
read_csv
(
full_path
,
sep
=
"|"
)
return
df
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