run_maxwell_simulation_keras_corr_custom.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #! bin/bash
  2. # file which contains model names we want to use for simulation
  3. simulate_models="simulate_models_keras_corr.csv"
  4. # selection of four scenes (only maxwell)
  5. scenes="A, D, G, H"
  6. metric="lab"
  7. for label in {"0","1"}; do
  8. for highest in {"0","1"}; do
  9. for nb_zones in {4,6,8,10,12}; do
  10. for size in {5,10,15,20,25,30,35,40}; do
  11. for mode in {"svd","svdn","svdne"}; do
  12. FILENAME="data/deep_keras_N${size}_B${start_index}_E${size}_nb_zones_${nb_zones}_${metric}_${mode}_corr_L${label}_H${highest}"
  13. MODEL_NAME="deep_keras_N${size}_B${start_index}_E${size}_nb_zones_${nb_zones}_${metric}_${mode}_corr_L${label}_H${highest}"
  14. CUSTOM_MIN_MAX_FILENAME="N${size}_B${start_index}_E${end_index}_nb_zones_${nb_zones}_${metric}_${mode}_corr_L${label}_H${highest}_min_max"
  15. if grep -xq "${MODEL_NAME}" "${simulate_models}"; then
  16. echo "Run simulation for model ${MODEL_NAME}"
  17. # by default regenerate model
  18. python generate_data_model_random.py --output ${FILENAME} --interval "${start_index},${end_index}" --kind ${mode} --metric ${metric} --scenes "${scenes}" --nb_zones "${nb_zones}" --percent 1 --renderer "maxwell" --step 40 --random 1 --custom ${CUSTOM_MIN_MAX_FILENAME}
  19. python train_model.py --data ${FILENAME} --output ${MODEL_NAME} --choice ${model}
  20. python predict_seuil_expe_maxwell_curve.py --interval "${start_index},${end_index}" --model "saved_models/${MODEL_NAME}.json" --mode "${mode}" --metric ${metric} --limit_detection '2' --custom ${CUSTOM_MIN_MAX_FILENAME}
  21. python save_model_result_in_md_maxwell.py --interval "${start_index},${end_index}" --model "saved_models/${MODEL_NAME}.json" --mode "${mode}" --metric ${metric}
  22. fi
  23. done
  24. done
  25. done
  26. done
  27. done