Commit bc513ec5 authored by lucas_miranda's avatar lucas_miranda
Browse files

Implemented shuffle parameter in preprocessing; shuffled validation data in model_training.py

parent d05538b2
......@@ -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
......@@ -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,
),
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment