|
@@ -2,8 +2,22 @@
|
|
|
|
|
|
# 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'
|
|
file_path='results/models_comparisons.csv'
|
|
|
|
+list="all, center, split"
|
|
|
|
|
|
-erased=$1
|
|
|
|
|
|
+if [ -z "$1" ]
|
|
|
|
+ then
|
|
|
|
+ echo "No argument supplied"
|
|
|
|
+ echo "Need argument from [${list}]"
|
|
|
|
+ exit 1
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+if [[ "$1" =~ ^(all|center|split)$ ]]; then
|
|
|
|
+ echo "$1 is in the list"
|
|
|
|
+else
|
|
|
|
+ echo "$1 is not in the list"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+erased=$2
|
|
|
|
|
|
if [ "${erased}" == "Y" ]; then
|
|
if [ "${erased}" == "Y" ]; then
|
|
echo "Previous data file erased..."
|
|
echo "Previous data file erased..."
|
|
@@ -13,7 +27,6 @@ if [ "${erased}" == "Y" ]; then
|
|
|
|
|
|
# add of header
|
|
# add of header
|
|
echo 'model_name; vector_size; start_index; 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_index; 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
|
|
|
|
|
|
feature="sub_blocks_area"
|
|
feature="sub_blocks_area"
|
|
@@ -40,7 +53,7 @@ for nb_zones in {4,6,8,10,12}; do
|
|
|
|
|
|
echo "${MODEL_NAME} results already generated..."
|
|
echo "${MODEL_NAME} results already generated..."
|
|
else
|
|
else
|
|
- python generate/generate_data_model_random.py --output ${FILENAME} --interval "${start_index},${end_index}" --kind ${mode} --feature ${feature} --scenes "${scenes}" --nb_zones "${nb_zones}" --percent 1 --renderer "maxwell" --step 10 --random 1
|
|
|
|
|
|
+ python generate/generate_data_model_random_${data}.py --output ${FILENAME} --interval "${start_index},${end_index}" --kind ${mode} --feature ${feature} --scenes "${scenes}" --nb_zones "${nb_zones}" --percent 1 --renderer "maxwell" --step 10 --random 1
|
|
python train_model.py --data ${FILENAME} --output ${MODEL_NAME} --choice ${model}
|
|
python train_model.py --data ${FILENAME} --output ${MODEL_NAME} --choice ${model}
|
|
|
|
|
|
python others/save_model_result_in_md_maxwell.py --interval "${start_index},${end_index}" --model "saved_models/${MODEL_NAME}.joblib" --mode "${mode}" --feature ${feature}
|
|
python others/save_model_result_in_md_maxwell.py --interval "${start_index},${end_index}" --model "saved_models/${MODEL_NAME}.joblib" --mode "${mode}" --feature ${feature}
|