testModelByScene_maxwell.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #! bin/bash
  2. if [ -z "$1" ]
  3. then
  4. echo "No first argument supplied"
  5. echo "Need of begin vector index"
  6. exit 1
  7. fi
  8. if [ -z "$2" ]
  9. then
  10. echo "No second argument supplied"
  11. echo "Need of end vector index"
  12. exit 1
  13. fi
  14. if [ -z "$3" ]
  15. then
  16. echo "No third argument supplied"
  17. echo "Need of model input"
  18. exit 1
  19. fi
  20. if [ -z "$4" ]
  21. then
  22. echo "No fourth argument supplied"
  23. echo "Need of mode file : 'svd', 'svdn', svdne"
  24. exit 1
  25. fi
  26. if [ -z "$5" ]
  27. then
  28. echo "No fifth argument supplied"
  29. echo "Need of metric : 'lab', 'mscn'"
  30. exit 1
  31. fi
  32. if [ -z "$6" ]
  33. then
  34. echo "No sixth argument supplied"
  35. fi
  36. INPUT_BEGIN=$1
  37. INPUT_END=$2
  38. INPUT_MODEL=$3
  39. INPUT_MODE=$4
  40. INPUT_METRIC=$5
  41. zones="0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
  42. echo "**Model :** ${INPUT_MODEL}"
  43. echo "**Metric :** ${INPUT_METRIC}"
  44. echo "**Mode :** ${INPUT_MODE}"
  45. echo "**Vector range :** [${INPUT_BEGIN}, ${INPUT_END}]"
  46. echo ""
  47. echo " # | GLOBAL | NOISY | NOT NOISY"
  48. echo "---|--------|-------|----------"
  49. # only take maxwell scenes
  50. for scene in {"A","D","G","H"}; do
  51. FILENAME="data/data_${INPUT_MODE}_${INPUT_METRIC}_B${INPUT_BEGIN}_E${INPUT_END}_scene${scene}"
  52. python generate_data_model.py --output ${FILENAME} --interval "${INPUT_BEGIN},${INPUT_END}" --kind ${INPUT_MODE} --metric ${INPUT_METRIC} --scenes "${scene}" --zones "${zones}" --percent 1
  53. python prediction_scene.py --data "$FILENAME.train" --model ${INPUT_MODEL} --output "${INPUT_MODEL}_Scene${scene}_mode_${INPUT_MODE}_metric_${INPUT_METRIC}.prediction" --scene ${scene}
  54. done