From 1af9f3de3fcee9d96a094b84e07ad5d14fa10542 Mon Sep 17 00:00:00 2001
From: lucas_miranda <lucasmiranda42@gmail.com>
Date: Thu, 10 Dec 2020 00:50:32 +0100
Subject: [PATCH] Added phenotype classification to train_model.py

---
 deepof/models.py       |  2 +-
 deepof/train_model.py  | 22 ++++++++++------------
 deepof_experiments.smk |  2 +-
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/deepof/models.py b/deepof/models.py
index dfab0614..e03768a7 100644
--- a/deepof/models.py
+++ b/deepof/models.py
@@ -776,4 +776,4 @@ class SEQ_2_SEQ_GMVAE:
 #       - Check usefulness of stateful sequential layers! (stateful=True in the LSTMs)
 #       - Investigate full covariance matrix approximation for the latent space! (details on tfp course) :)
 #       - Explore expanding the event dims of the final reconstruction layer
-#       - Gaussian Mixture as output layer? One component per bodypart (makes sense?)
\ No newline at end of file
+#       - Gaussian Mixture as output layer? One component per bodypart (makes sense?)
diff --git a/deepof/train_model.py b/deepof/train_model.py
index 8e3b88c7..238de4c7 100644
--- a/deepof/train_model.py
+++ b/deepof/train_model.py
@@ -405,18 +405,16 @@ if not tune:
                     description="weight applied to phenotypic classifier from the latent space",
                 )
             )
-            metrics.append(
-                [
-                    hp.Metric(
-                        "phenotype_prediction_accuracy",
-                        display_name="phenotype_prediction_accuracy",
-                    ),
-                    hp.Metric(
-                        "phenotype_prediction_auc",
-                        display_name="phenotype_prediction_auc",
-                    ),
-                ]
-            )
+            metrics += [
+                hp.Metric(
+                    "phenotype_prediction_accuracy",
+                    display_name="phenotype_prediction_accuracy",
+                ),
+                hp.Metric(
+                    "phenotype_prediction_auc",
+                    display_name="phenotype_prediction_auc",
+                ),
+            ]
 
         with tf.summary.create_file_writer(
             os.path.join(output_path, "hparams", run_ID)
diff --git a/deepof_experiments.smk b/deepof_experiments.smk
index 8e0f16bc..74eb9d98 100644
--- a/deepof_experiments.smk
+++ b/deepof_experiments.smk
@@ -120,4 +120,4 @@ rule explore_phenotype_classification:
         "--window-size 11 "
         "--window-step 11 "
         "--stability-check 3  "
-        "--output-path {outpath}dimension_and_loss_experiments"
+        "--output-path {outpath}pheno_classification_experiments"
-- 
GitLab