Browse Source

Merge branch 'release/v0.4.0'

Jérôme BUISINE 8 months ago
parent
commit
403db2b44b
3 changed files with 22 additions and 19 deletions
  1. 20 17
      cross_run.sh
  2. 1 1
      custom_config.py
  3. 1 1
      modules

+ 20 - 17
cross_run.sh

@@ -5,9 +5,10 @@ all_scenes="A,B,C,D,E,F,G,H,I"
 
 # file which contains model names we want to use for simulation
 file_path="results/models_comparisons.csv"
+stride=1
 
-for window in {"3","5","7","9","11"}; do
-    echo python generate/generate_reconstructed_data.py --features ${metric} --params ${window},${window} --size 100,100 --scenes ${all_scenes}
+for window in {"3","5","7","9"}; do
+    echo python generate/generate_reconstructed_data.py --features ${metric} --params ${window},${window},${stride} --size 100,100 --scenes ${all_scenes}
 done
 
 for scene in {"A","B","D","G","H","I"}; do
@@ -17,25 +18,27 @@ for scene in {"A","B","D","G","H","I"}; do
     s="${s//${scene},}"
 
     for zone in {10,11,12}; do
-        for balancing in {0,1}; do
-        
-            OUTPUT_DATA_FILE="${metric}_nb_zones_${zone}_W${width}_H${height}_balancing${balancing}_without_${scene}"
-            OUTPUT_DATA_FILE_TEST="${metric}_nb_zones_${zone}_W${width}_H${height}_balancing${balancing}_scene_${scene}"
-
-            if grep -q "${OUTPUT_DATA_FILE}" "${file_path}"; then
+        for window in {"3","5","7","9"}; do
+            for balancing in {0,1}; do
             
-                echo "SVD model ${OUTPUT_DATA_FILE} already generated"
+                OUTPUT_DATA_FILE="${metric}_nb_zones_${zone}_W${window}_S${stride}_balancing${balancing}_without_${scene}"
+                OUTPUT_DATA_FILE_TEST="${metric}_nb_zones_${zone}_W${window}_S${stride}_balancing${balancing}_scene_${scene}"
+
+                if grep -q "${OUTPUT_DATA_FILE}" "${file_path}"; then
+                
+                    echo "SVD model ${OUTPUT_DATA_FILE} already generated"
 
-            else
+                else
 
-                #echo "Run computation for SVD model ${OUTPUT_DATA_FILE}"
-                echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE_TEST} --features ${metric} --scenes ${scene} --params ${width},${height} --nb_zones ${zone} --random 1 --size 100,100     
+                    #echo "Run computation for SVD model ${OUTPUT_DATA_FILE}"
+                    echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE_TEST} --features ${metric} --scenes ${scene} --params ${window},${window},${stride} --nb_zones ${zone} --random 1 --size 100,100     
 
-                echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE} --features ${metric} --scenes ${s} --params ${width},${height} --nb_zones ${zone} --random 1 --size 100,100     
-                
-                echo python train_model.py --data data/${OUTPUT_DATA_FILE} --output ${OUTPUT_DATA_FILE} --balancing ${balancing}
-                echo python prediction_model.py --data data/${OUTPUT_DATA_FILE_TEST}.train --model saved_models/${OUTPUT_DATA_FILE}.json
-            fi 
+                    echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE} --features ${metric} --scenes ${s} --params ${window},${window},${stride} --nb_zones ${zone} --random 1 --size 100,100     
+                    
+                    echo python train_model.py --data data/${OUTPUT_DATA_FILE} --output ${OUTPUT_DATA_FILE} --balancing ${balancing}
+                    echo python prediction_model.py --data data/${OUTPUT_DATA_FILE_TEST}.train --model saved_models/${OUTPUT_DATA_FILE}.json
+                fi 
+            done
         done
     done
 done

+ 1 - 1
custom_config.py

@@ -20,7 +20,7 @@ perf_prediction_model_path      = 'predictions_models_results.csv'
 perf_train_header_file          = "model_name;global_train_size;global_test_size;filtered_train_size;filtered_test_size;f1_train;f1_test;recall_train;recall_test;presicion_train;precision_test;acc_train;acc_test;roc_auc_train;roc_auc_test;\n"
 perf_prediction_header_file    = "data;data_size;model_name;accucary;f1;recall;precision;roc;\n"
 
-features_choices_labels         = ['static', 'svd_reconstruction', 'fast_ica_reconstruction', 'ipca_reconstruction', 'min_diff_filter']
+features_choices_labels         = ['static', 'svd_reconstruction', 'fast_ica_reconstruction', 'ipca_reconstruction', 'min_diff_filter', 'sobel_based_filter']
 
 # parameters
 

+ 1 - 1
modules

@@ -1 +1 @@
-Subproject commit 6b8f28e9e2b077269df746c2a819756b865bd4bb
+Subproject commit eb8e33654458d82fb37d25a0a4335efca36ebcd0