Parcourir la source

Merge branch 'release/v0.2.2'

Jérôme BUISINE il y a 5 ans
Parent
commit
390bc778c6

+ 2 - 1
generate/generate_data_model_random_all.py

@@ -74,6 +74,7 @@ def construct_new_line(path_seuil, interval, line, choice, each, norm):
 
 
     return line
     return line
 
 
+
 def get_min_max_value_interval(_scenes_list, _interval, _feature):
 def get_min_max_value_interval(_scenes_list, _interval, _feature):
 
 
     global min_value_interval, max_value_interval
     global min_value_interval, max_value_interval
@@ -183,7 +184,7 @@ def generate_data_model(_scenes_list, _filename, _interval, _choice, _feature, _
 
 
             # if custom normalization choices then we use svd values not already normalized
             # if custom normalization choices then we use svd values not already normalized
             if _custom:
             if _custom:
-                data_filename = _feature + "_svd"+ generic_output_file_svd
+                data_filename = _feature + "_svd" + generic_output_file_svd
             else:
             else:
                 data_filename = _feature + "_" + _choice + generic_output_file_svd
                 data_filename = _feature + "_" + _choice + generic_output_file_svd
 
 

+ 15 - 37
prediction/predict_noisy_image_svd_attributes.py

@@ -75,50 +75,28 @@ def main():
 
 
     for index, value in enumerate(p_solution): 
     for index, value in enumerate(p_solution): 
         if value == 1: 
         if value == 1: 
-            indices.append(index) 
+            indices.append(index)
 
 
-    # check if custom min max file is used
-    if p_custom:
-        
-        test_data = data[indices]
-        
-        if p_mode == 'svdne':
+    # No need to use custom normalization with this kind of process 
+    # check mode to normalize data
+    if p_mode == 'svdne':
 
 
-            # set min_max_filename if custom use
-            min_max_file_path = os.path.join(custom_min_max_folder, p_custom)
+        # set min_max_filename if custom use
+        min_max_file_path = os.path.join(path, p_feature + min_max_ext)
 
 
-            # need to read min_max_file
-            with open(min_max_file_path, 'r') as f:
-                min_val = float(f.readline().replace('\n', ''))
-                max_val = float(f.readline().replace('\n', ''))
+        # need to read min_max_file
+        with open(min_max_file_path, 'r') as f:
+            min_val = float(f.readline().replace('\n', ''))
+            max_val = float(f.readline().replace('\n', ''))
 
 
-            test_data = utils.normalize_arr_with_range(test_data, min_val, max_val)
-
-        if p_mode == 'svdn':
-            test_data = utils.normalize_arr(test_data)
+        l_values = utils.normalize_arr_with_range(data, min_val, max_val)
 
 
+    elif p_mode == 'svdn':
+        l_values = utils.normalize_arr(data)
     else:
     else:
+        l_values = data
 
 
-        # check mode to normalize data
-        if p_mode == 'svdne':
-
-            # set min_max_filename if custom use
-            min_max_file_path = os.path.join(path, p_feature + min_max_ext)
-
-            # need to read min_max_file
-            with open(min_max_file_path, 'r') as f:
-                min_val = float(f.readline().replace('\n', ''))
-                max_val = float(f.readline().replace('\n', ''))
-
-            l_values = utils.normalize_arr_with_range(data, min_val, max_val)
-
-        elif p_mode == 'svdn':
-            l_values = utils.normalize_arr(data)
-        else:
-            l_values = data
-
-        test_data = data[indices]
-
+    test_data = np.array(l_values)[indices]
 
 
     # get prediction of model
     # get prediction of model
     if kind_model == 'sklearn':
     if kind_model == 'sklearn':

+ 15 - 36
prediction/predict_noisy_image_svd_filters.py

@@ -78,48 +78,27 @@ def main():
             indices.append(index*2) 
             indices.append(index*2) 
             indices.append(index*2+1) 
             indices.append(index*2+1) 
 
 
-    # check if custom min max file is used
-    if p_custom:
-        
-        test_data = data[indices]
-        
-        if p_mode == 'svdne':
+    # No need to use custom normalization with this kind of process 
+    # check mode to normalize data
+    if p_mode == 'svdne':
 
 
-            # set min_max_filename if custom use
-            min_max_file_path = os.path.join(custom_min_max_folder, p_custom)
+        # set min_max_filename if custom use
+        min_max_file_path = os.path.join(path, p_feature + min_max_ext)
 
 
-            # need to read min_max_file
-            with open(min_max_file_path, 'r') as f:
-                min_val = float(f.readline().replace('\n', ''))
-                max_val = float(f.readline().replace('\n', ''))
+        # need to read min_max_file
+        with open(min_max_file_path, 'r') as f:
+            min_val = float(f.readline().replace('\n', ''))
+            max_val = float(f.readline().replace('\n', ''))
 
 
-            test_data = utils.normalize_arr_with_range(test_data, min_val, max_val)
-
-        if p_mode == 'svdn':
-            test_data = utils.normalize_arr(test_data)
+        l_values = utils.normalize_arr_with_range(data, min_val, max_val)
 
 
+    elif p_mode == 'svdn':
+        l_values = utils.normalize_arr(data)
     else:
     else:
+        l_values = data
 
 
-        # check mode to normalize data
-        if p_mode == 'svdne':
-
-            # set min_max_filename if custom use
-            min_max_file_path = os.path.join(path, p_feature + min_max_ext)
-
-            # need to read min_max_file
-            with open(min_max_file_path, 'r') as f:
-                min_val = float(f.readline().replace('\n', ''))
-                max_val = float(f.readline().replace('\n', ''))
-
-            l_values = utils.normalize_arr_with_range(data, min_val, max_val)
-
-        elif p_mode == 'svdn':
-            l_values = utils.normalize_arr(data)
-        else:
-            l_values = data
-
-        test_data = data[indices]
-
+    test_data = np.array(l_values)[indices]
+    
 
 
     # get prediction of model
     # get prediction of model
     if kind_model == 'sklearn':
     if kind_model == 'sklearn':

+ 0 - 2
run/runAll_maxwell_custom.sh

@@ -1,7 +1,6 @@
 #! bin/bash
 #! bin/bash
 
 
 # erase "results/models_comparisons.csv" file and write new header
 # erase "results/models_comparisons.csv" file and write new header
-file_path='results/models_comparisons.csv'
 list="all, center, split"
 list="all, center, split"
 
 
 if [ -z "$1" ]
 if [ -z "$1" ]
@@ -28,7 +27,6 @@ if [ "${erased}" == "Y" ]; then
 
 
     # add of header
     # add of header
     echo 'model_name; vector_size; start; end; nb_zones; feature; mode; tran_size; val_size; test_size; train_pct_size; val_pct_size; test_pct_size; train_acc; val_acc; test_acc; all_acc; F1_train; recall_train; roc_auc_train; F1_val; recall_val; roc_auc_val; F1_test; recall_test; roc_auc_test; F1_all; recall_all; roc_auc_all;' >> ${file_path}
     echo 'model_name; vector_size; start; end; nb_zones; feature; mode; tran_size; val_size; test_size; train_pct_size; val_pct_size; test_pct_size; train_acc; val_acc; test_acc; all_acc; F1_train; recall_train; roc_auc_train; F1_val; recall_val; roc_auc_val; F1_test; recall_test; roc_auc_test; F1_all; recall_all; roc_auc_all;' >> ${file_path}
-
 fi
 fi
 
 
 size=26
 size=26

+ 0 - 54
runs.txt

@@ -1,54 +0,0 @@
-python generate/generate_data_model_random_all.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svd_all_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svd_all_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svd_all_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svdn_all_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svdn_all_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svdn_all_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svdne_all_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svdne_all_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svdne_all_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svd_all_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svd_all_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svd_all_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svdn_all_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svdn_all_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svdn_all_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svdne_all_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svdne_all_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_all_attributes_min_max
-python generate/generate_data_model_random_all.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svdne_all_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_all_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svd_split_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svd_split_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svd_split_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svdn_split_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svdn_split_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svdn_split_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svdne_split_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svdne_split_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svdne_split_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svd_split_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svd_split_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svd_split_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svdn_split_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svdn_split_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svdn_split_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svdne_split_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svdne_split_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_split_attributes_min_max
-python generate/generate_data_model_random_split.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svdne_split_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_split_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svd_center_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svd_center_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svd_center_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svd_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svdn_center_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svdn_center_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svdn_center_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdn_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/svm_model_N26_B0_E26_nb_zones_10_filters_statistics_svdne_center_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_N26_B0_E26_nb_zones_10_filters_statistics_svdne_center_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_10_filters_statistics_svdne_center_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 10 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_10_filters_statistics_svdne_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svd_center_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svd_center_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svd_center_attributes --interval 0,26 --kind svd --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svd_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svdn_center_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svdn_center_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svdn_center_attributes --interval 0,26 --kind svdn --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdn_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/svm_model_N26_B0_E26_nb_zones_12_filters_statistics_svdne_center_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_N26_B0_E26_nb_zones_12_filters_statistics_svdne_center_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_center_attributes_min_max
-python generate/generate_data_model_random_center.py --output data/ensemble_model_v2_N26_B0_E26_nb_zones_12_filters_statistics_svdne_center_attributes --interval 0,26 --kind svdne --feature filters_statistics --scenes A,D,G,H --nb_zones 12 --percent 1 --renderer maxwell --random 1 --custom N26_B0_E26_nb_zones_12_filters_statistics_svdne_center_attributes_min_max

+ 10 - 10
simulation/run_maxwell_simulation_filters_statistics.sh

@@ -4,33 +4,33 @@
 simulate_models="simulate_models.csv"
 simulate_models="simulate_models.csv"
 
 
 # selection of four scenes (only maxwell)
 # selection of four scenes (only maxwell)
-scenes="A, D, G, H"
+scenes="A,D,G,H"
 
 
 size="26"
 size="26"
 
 
 # for feature in {"lab","mscn","low_bits_2","low_bits_3","low_bits_4","low_bits_5","low_bits_6","low_bits_4_shifted_2","ica_diff","svd_trunc_diff","ipca_diff","svd_reconstruct"}; do
 # for feature in {"lab","mscn","low_bits_2","low_bits_3","low_bits_4","low_bits_5","low_bits_6","low_bits_4_shifted_2","ica_diff","svd_trunc_diff","ipca_diff","svd_reconstruct"}; do
 feature="filters_statistics"
 feature="filters_statistics"
 
 
-for nb_zones in {4,6,8,10,12}; do
+for nb_zones in {4,6,8,10,11,12}; do
     for mode in {"svd","svdn","svdne"}; do
     for mode in {"svd","svdn","svdne"}; do
         for model in {"svm_model","ensemble_model","ensemble_model_v2"}; do
         for model in {"svm_model","ensemble_model","ensemble_model_v2"}; do
 
 
-            FILENAME="data/${model}_N${size}_B0_E${size}_nb_zones_${nb_zones}_${feature}_${mode}"
-            MODEL_NAME="${model}_N${size}_B0_E${size}_nb_zones_${nb_zones}_${feature}_${mode}"
-            CUSTOM_MIN_MAX_FILENAME="N${size}_B0_E${size}_nb_zones_${nb_zones}_${feature}_${mode}_min_max"
+            FILENAME="data/${model}_N${size}_B0_E${size}_nb_zones_${nb_zones}_${feature}_${mode}_all"
+            MODEL_NAME="${model}_N${size}_B0_E${size}_nb_zones_${nb_zones}_${feature}_${mode}_all"
+            CUSTOM_MIN_MAX_FILENAME="N${size}_B0_E${size}_nb_zones_${nb_zones}_${feature}_${mode}_all_min_max"
 
 
-            echo $MODEL_NAME
+            #echo $MODEL_NAME
 
 
             # only compute if necessary (perhaps server will fall.. Just in case)
             # only compute if necessary (perhaps server will fall.. Just in case)
             if grep -xq "${MODEL_NAME}" "${simulate_models}"; then
             if grep -xq "${MODEL_NAME}" "${simulate_models}"; then
 
 
-                echo "Run simulation for ${MODEL_NAME}..."
+                #echo "Run simulation for ${MODEL_NAME}..."
 
 
                 # Use of already generated model
                 # Use of already generated model
-                python generate/generate_data_model_random.py --output ${FILENAME} --interval "0,${size}" --kind ${mode} --feature ${feature} --scenes "${scenes}" --nb_zones "${nb_zones}" --percent 1 --renderer "maxwell" --step 40 --random 1 --custom ${CUSTOM_MIN_MAX_FILENAME}
-                python train_model.py --data ${FILENAME} --output ${MODEL_NAME} --choice ${model}
+                # python generate/generate_data_model_random.py --output ${FILENAME} --interval "0,${size}" --kind ${mode} --feature ${feature} --scenes "${scenes}" --nb_zones "${nb_zones}" --percent 1 --renderer "maxwell" --step 40 --random 1 --custom ${CUSTOM_MIN_MAX_FILENAME}
+                # python train_model.py --data ${FILENAME} --output ${MODEL_NAME} --choice ${model}
 
 
-                python prediction/predict_seuil_expe_maxwell_curve.py --interval "0,${size}" --model "saved_models/${MODEL_NAME}.joblib" --mode "${mode}" --feature ${feature} --custom ${CUSTOM_MIN_MAX_FILENAME}
+                echo python prediction/predict_seuil_expe_maxwell_curve.py --interval "0,${size}" --model "saved_models/${MODEL_NAME}.joblib" --mode "${mode}" --feature ${feature} --custom ${CUSTOM_MIN_MAX_FILENAME}
 
 
                 # python others/save_model_result_in_md_maxwell.py --interval "0,${size}" --model "saved_models/${MODEL_NAME}.joblib" --mode "${mode}" --feature ${feature}
                 # python others/save_model_result_in_md_maxwell.py --interval "0,${size}" --model "saved_models/${MODEL_NAME}.joblib" --mode "${mode}" --feature ${feature}
             fi
             fi