From 71936351aff10490971c259a13226e3fb7d65bc7 Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Tue, 12 Oct 2021 15:13:37 +0200
Subject: [PATCH] Sensitivity analysis of regularization.

---
 Scripts/downscale.sh | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/Scripts/downscale.sh b/Scripts/downscale.sh
index dde1a3b..4917c50 100644
--- a/Scripts/downscale.sh
+++ b/Scripts/downscale.sh
@@ -5,15 +5,21 @@ conda activate climax
 cd ~/git/climax
 
 # wet day thresholds to test
-WET_DAY_THRESHOLDS=(0 0.5 1 2 3 5)
+# WET_DAY_THRESHOLDS=(0 0.5 1 2 3 5)
+LAMBDA = (0 0.000001 0.00001 0.0001 0.001 0.01)
 
-for w in ${WET_DAY_THRESHOLDS[@]}; do
+# for w in ${WET_DAY_THRESHOLDS[@]}; do
     # change wet day threshold in configuration
-    sed -i "s/min_amount\s*=.*/min_amount=$w)/" ./climax/main/config.py
-    
-    # model training
-    python climax/main/downscale_train.py
+#    sed -i "s/min_amount\s*=.*/min_amount=$w)/" ./climax/main/config.py
 
-    # model inference
-    python climax/main/downscale_infer.py
+    # run downscaling
+#   python climax/main/downscale.py
+# done
+
+for lambda in ${LAMBDA[@]}; do
+    # change weight regularization in configuration
+    sed -i "s/LAMBDA\s*=.*/LAMBDA=$lambda)/" ./climax/main/config.py
+
+    # run downscaling
+    python climax/main/downscale.py
 done
-- 
GitLab