testModelByScene.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. INPUT_BEGIN=$1
  27. INPUT_END=$2
  28. INPUT_MODEL=$3
  29. INPUT_MODE$4
  30. zones="0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
  31. for scene in {"A","B","C","D","E","F","G","H","I"}; do
  32. for mode in {"svd","svdn","svdne"}; do
  33. FILENAME="data_svm/data_${mode}_B${INPUT_BEGIN}_E${INPUT_END}_scene${scene}"
  34. python generate_data_svm.py --output ${FILENAME} --interval "${INPUT_BEGIN},${INPUT_END}" --kind ${mode} --scenes "${scene}" --zones "${zones}" --percent 1 --sep ";" --rowindex "0"
  35. python prediction.py --data "$FILENAME.train" --model ${INPUT_MODEL} --output "${INPUT_MODEL}_Scene${scene}_mode_${mode}.prediction"
  36. done
  37. done