runAll_maxwell_custom.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #! bin/bash
  2. # erase "results/models_comparisons.csv" file and write new header
  3. result_file_path="results/models_comparisons.csv"
  4. features_list="(filters_statistics|filters_statistics_sobel|svd|svd_sobel)"
  5. if [[ "$1" =~ ^(filters_statistics|filters_statistics_sobel|svd|svd_sobel)$ ]]; then
  6. echo "$1 is in the list"
  7. else
  8. echo "First arguement '$1' is not in the list, need argument from [${features_list}]"
  9. exit 1
  10. fi
  11. # accept feature param
  12. feature=$1
  13. # if [ -z "$2" ]
  14. # then
  15. # echo "No argument supplied"
  16. # echo "Need argument from [${list}]"
  17. # exit 1
  18. # fi
  19. data_list="(all|center|split)"
  20. if [[ "$2" =~ ^(all|center|split)$ ]]; then
  21. echo "$2 is in the list"
  22. else
  23. echo "Second argument '$2' is not in the list, need argument from [${data_list}]"
  24. fi
  25. # accept data param
  26. data=$2
  27. # check erased data param
  28. erased=$3
  29. if [ "${erased}" == "Y" ]; then
  30. echo "Previous data file erased..."
  31. rm ${result_file_path}
  32. # if necessary
  33. mkdir -p results
  34. touch ${result_file_path}
  35. # add of header
  36. echo 'model_name; selected_indices; 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}
  37. fi
  38. bash data_processing/generateAndTrain_maxwell_custom.sh ${feature} ${data}