runAll_maxwell_custom_optimization.sh 815 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #! bin/bash
  2. # erase "results/optimization_comparisons.csv" file and write new header
  3. file_path='results/optimization_comparisons.csv'
  4. list="all, center, split"
  5. if [ -z "$1" ]
  6. then
  7. echo "No argument supplied"
  8. echo "Need argument from [${list}]"
  9. exit 1
  10. fi
  11. if [[ "$1" =~ ^(all|center|split)$ ]]; then
  12. echo "$1 is in the list"
  13. else
  14. echo "$1 is not in the list"
  15. fi
  16. data=$1
  17. erased=$2
  18. if [ "${erased}" == "Y" ]; then
  19. echo "Previous data file erased..."
  20. rm ${file_path}
  21. mkdir -p results
  22. touch ${file_path}
  23. # add of header
  24. echo 'data_file; ils_iteration; ls_iteration; best_solution; nb_filters; fitness (roc test);' >> ${file_path}
  25. fi
  26. size=26
  27. feature="filters_statistics"
  28. bash data_processing/generateAndTrain_maxwell_custom_optimization.sh ${size} ${feature} ${data}