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
bc513ec5
Commit
bc513ec5
authored
Jul 04, 2020
by
lucas_miranda
Browse files
Implemented shuffle parameter in preprocessing; shuffled validation data in model_training.py
parent
d05538b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/model_utils.py
View file @
bc513ec5
...
...
@@ -171,7 +171,7 @@ class Latent_space_control(Layer):
# Adds Silhouette score controling overlap between clusters
hard_labels
=
tf
.
math
.
argmax
(
z_cat
,
axis
=
1
)
silhouette
=
tf
.
numpy_function
(
silhouette_score
,
[
z
,
hard_labels
],
tf
.
float32
)
self
.
add_loss
(
-
K
.
mean
(
silhouette
),
inputs
=
[
z
,
hard_labels
])
self
.
add_loss
(
-
K
.
mean
(
silhouette
),
inputs
=
[
z
,
hard_labels
])
self
.
add_metric
(
silhouette
,
aggregation
=
"mean"
,
name
=
"silhouette"
)
return
z
visualizations/train_viz_data_generator.py
View file @
bc513ec5
...
...
@@ -219,22 +219,58 @@ coords_dist_angles1 = merge_tables(coords1, distances1, angles1)
input_dict
=
{
"coords"
:
coords1
.
preprocess
(
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gauss"
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gaussian"
,
sigma
=
55
,
shuffle
=
True
,
),
"dists"
:
distances1
.
preprocess
(
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gauss"
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gaussian"
,
sigma
=
55
,
shuffle
=
True
,
),
"angles"
:
angles1
.
preprocess
(
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gauss"
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gaussian"
,
sigma
=
55
,
shuffle
=
True
,
),
"coords+dist"
:
coords_distances1
.
preprocess
(
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gauss"
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gaussian"
,
sigma
=
55
,
shuffle
=
True
,
),
"coords+angle"
:
coords_angles1
.
preprocess
(
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gauss"
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gaussian"
,
sigma
=
55
,
shuffle
=
True
,
),
"coords+dist+angle"
:
coords_dist_angles1
.
preprocess
(
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gauss"
window_size
=
11
,
window_step
=
1
,
scale
=
True
,
random_state
=
42
,
filter
=
"gaussian"
,
sigma
=
55
,
shuffle
=
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