Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Zizhuo Meng
DeltaLSTM_RMTPP
Commits
08b35be0
Commit
08b35be0
authored
Nov 23, 2020
by
蒙律师
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
捅娄子了
parent
5b4bf347
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
import_RMTPP_dataset.py
import_RMTPP_dataset.py
+24
-0
No files found.
import_RMTPP_dataset.py
0 → 100644
View file @
08b35be0
import
pandas
as
pd
import
numpy
as
np
def
import_Dataset
(
Dataset
):
if
Dataset
is
'exp'
:
time
=
pd
.
read_csv
(
'./exp/time-train.txt'
,
header
=
None
).
to_numpy
()
event
=
pd
.
read_csv
(
'./exp/event-train.txt'
,
header
=
None
).
to_numpy
()
time_lst
=
time
[
0
][
0
].
split
(
' '
)
time_lst
=
time_lst
[:
30
]
# because the presentation of ''
time_seq
=
np
.
array
(
list
(
map
(
float
,
time_lst
)))
event_lst
=
event
[
0
][
0
].
split
(
' '
)
event_lst
=
event_lst
[:
30
]
# because the presentation of ''
event_seq
=
np
.
array
(
list
(
map
(
float
,
event_lst
)))
return
time_seq
,
event_seq
else
:
print
(
'Cannot find specified Dataset.'
)
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