Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
6a060a56
Commit
6a060a56
authored
Jun 11, 2021
by
lucas_miranda
Browse files
Improved table_dict projections
parent
94b4e521
Pipeline
#103427
failed with stages
in 26 minutes and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
deepof/data.py
View file @
6a060a56
...
@@ -1328,7 +1328,12 @@ class table_dict(dict):
...
@@ -1328,7 +1328,12 @@ class table_dict(dict):
return
X
,
labels
return
X
,
labels
def
projection
(
def
projection
(
self
,
proj
,
n_components
:
int
=
2
,
sample
:
int
=
1000
,
kernel
:
str
=
None
,
perplexity
:
int
=
None
,
self
,
proj
,
n_components
:
int
=
2
,
sample
:
int
=
1000
,
kernel
:
str
=
None
,
perplexity
:
int
=
None
,
)
->
deepof
.
utils
.
Tuple
[
deepof
.
utils
.
Any
,
deepof
.
utils
.
Any
]:
)
->
deepof
.
utils
.
Tuple
[
deepof
.
utils
.
Any
,
deepof
.
utils
.
Any
]:
"""Returns a training set generated from the 2D original data (time x features) and a specified projection
"""Returns a training set generated from the 2D original data (time x features) and a specified projection
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
...
@@ -1369,7 +1374,9 @@ class table_dict(dict):
...
@@ -1369,7 +1374,9 @@ class table_dict(dict):
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
performance or visualization reasons"""
performance or visualization reasons"""
return
self
.
projection
(
"random"
,
n_components
=
n_components
,
sample
=
sample
,
kernel
=
kernel
)
return
self
.
projection
(
"random"
,
n_components
=
n_components
,
sample
=
sample
,
kernel
=
kernel
)
def
pca
(
def
pca
(
self
,
n_components
:
int
=
2
,
sample
:
int
=
1000
,
kernel
:
str
=
"linear"
self
,
n_components
:
int
=
2
,
sample
:
int
=
1000
,
kernel
:
str
=
"linear"
...
@@ -1378,7 +1385,9 @@ class table_dict(dict):
...
@@ -1378,7 +1385,9 @@ class table_dict(dict):
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
performance or visualization reasons"""
performance or visualization reasons"""
return
self
.
projection
(
"pca"
,
n_components
=
n_components
,
sample
=
sample
,
kernel
=
kernel
)
return
self
.
projection
(
"pca"
,
n_components
=
n_components
,
sample
=
sample
,
kernel
=
kernel
)
def
tsne
(
def
tsne
(
self
,
n_components
:
int
=
2
,
sample
:
int
=
1000
,
perplexity
:
int
=
30
self
,
n_components
:
int
=
2
,
sample
:
int
=
1000
,
perplexity
:
int
=
30
...
@@ -1387,7 +1396,9 @@ class table_dict(dict):
...
@@ -1387,7 +1396,9 @@ class table_dict(dict):
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
to a n_components space. The sample parameter allows the user to randomly pick a subset of the data for
performance or visualization reasons"""
performance or visualization reasons"""
return
self
.
projection
(
"tsne"
,
n_components
=
n_components
,
sample
=
sample
,
perplexity
=
perplexity
)
return
self
.
projection
(
"tsne"
,
n_components
=
n_components
,
sample
=
sample
,
perplexity
=
perplexity
)
def
merge_tables
(
*
args
):
def
merge_tables
(
*
args
):
...
...
deepof/train_utils.py
View file @
6a060a56
...
@@ -552,13 +552,17 @@ def tune_search(
...
@@ -552,13 +552,17 @@ def tune_search(
),
),
)
)
tuner_objective
=
(
"val_mae"
if
not
next_sequence_prediction
else
"val_reconstruction_mae"
)
hpt_params
=
{
hpt_params
=
{
"hypermodel"
:
hypermodel
,
"hypermodel"
:
hypermodel
,
"executions_per_trial"
:
n_replicas
,
"executions_per_trial"
:
n_replicas
,
"logger"
:
TensorBoardLogger
(
"logger"
:
TensorBoardLogger
(
metrics
=
[
"val_mae"
],
logdir
=
os
.
path
.
join
(
outpath
,
"logged_hparams"
)
metrics
=
[
tuner_objective
],
logdir
=
os
.
path
.
join
(
outpath
,
"logged_hparams"
)
),
),
"objective"
:
"val_mae"
,
"objective"
:
tuner_objective
,
"project_name"
:
project_name
,
"project_name"
:
project_name
,
"tune_new_entries"
:
True
,
"tune_new_entries"
:
True
,
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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