Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tsc-pdm-event-log
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
lifo
Antoine Guillaume
tsc-pdm-event-log
Commits
e242f16d
Commit
e242f16d
authored
Feb 18, 2021
by
Antoine Guillaume
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pushing last server version
parent
1cf8d981
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
CV_script.py
CV_script.py
+1
-1
ROCKET interpretability.py
ROCKET interpretability.py
+0
-0
kernel_collection.npy
utils/kernel_collection.npy
+0
-0
representations.py
utils/representations.py
+6
-1
No files found.
CV_script.py
View file @
e242f16d
...
...
@@ -588,7 +588,7 @@ for i_r, dic_func in enumerate([get_R1_dict]):
X
=
np
.
array
([
apply_code_dict
(
x
[
0
],
code_dict
)
.
resample
(
resample_freq
,
on
=
'date'
)
.
mean
()
.
reindex
(
pd
.
date_range
(
start
=
x
[
2
][
0
],
end
=
x
[
2
][
1
],
freq
=
resample_freq
))
.
fillna
(
fill_value
)
.
values
for
x
in
life_cycles
if
x
is
not
None
],
dtype
=
'float'
)
X
=
np
.
array
([
apply_code_dict
(
x
[
0
],
code_dict
)
.
resample
(
resample_freq
,
on
=
'date'
)
.
mean
()
.
reindex
(
pd
.
date_range
(
start
=
x
[
2
][
0
],
end
=
x
[
2
][
1
],
freq
=
resample_freq
))
.
fillna
(
fill_value
)
.
values
for
x
in
life_cycles
if
x
is
not
None
],
dtype
=
'float'
)
y
=
np
.
asarray
([
x
[
1
]
for
x
in
life_cycles
if
x
is
not
None
])
.
astype
(
int
)
print
(
X
.
shape
)
...
...
ROCKET interpretability.py
deleted
100644 → 0
View file @
1cf8d981
utils/kernel_collection.npy
deleted
100644 → 0
View file @
1cf8d981
File deleted
utils/representations.py
View file @
e242f16d
...
...
@@ -170,15 +170,20 @@ class MatrixProfile_transform():
return
self
class
ROCKET_transform
(
BaseEstimator
,
TransformerMixin
):
def
__init__
(
self
,
n_kernels
=
20000
,
kernel_sizes
=
(
5
,
7
,
9
,
11
),
flatten
=
False
,
random_state
=
None
):
def
__init__
(
self
,
n_kernels
=
20000
,
kernel_sizes
=
(
5
,
7
,
9
,
11
),
normalise
=
True
,
flatten
=
False
,
random_state
=
None
):
self
.
flatten
=
flatten
self
.
n_kernels
=
n_kernels
self
.
kernel_sizes
=
kernel_sizes
self
.
random_state
=
random_state
self
.
normalise
=
normalise
self
.
transformer
=
None
def
transform
(
self
,
X
,
y
=
None
):
X
=
X
.
reshape
(
X
.
shape
[
0
],
X
.
shape
[
1
])
if
self
.
normalise
:
X
=
(
X
-
X
.
mean
(
axis
=-
1
,
keepdims
=
True
))
/
(
X
.
std
(
axis
=-
1
,
keepdims
=
True
)
+
1e-8
)
X
=
self
.
transformer
.
transform
(
X
)
if
self
.
flatten
:
X
=
X
.
reshape
(
X
.
shape
[
0
],
X
.
shape
[
1
])
...
...
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