predictSVM.sh 989 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #! bin/bash
  2. if [ -z "$1" ]
  3. then
  4. echo "No argument supplied"
  5. echo "Need of vector size"
  6. exit 1
  7. fi
  8. VECTOR_SIZE=$1
  9. # selection of six scenes
  10. scenes="Appart1opt02, Bureau1, Cendrier, PNDVuePlongeante, SdbDroite, Selles"
  11. for size in {"4","8","16","26","32","40"}; do
  12. start=0
  13. for counter in {0..4}; do
  14. end=$(($start+$size))
  15. if [ "$end" -gt "$VECTOR_SIZE" ]; then
  16. start=$(($VECTOR_SIZE-$size))
  17. end=$(($VECTOR_SIZE))
  18. fi
  19. for zones in {"1, 3, 7, 9","0, 2, 7, 8, 9","2, 6, 8, 10, 13, 15","1, 2, 4, 7, 9, 10, 13, 15"}; do
  20. zones_str="${zones//, /-}"
  21. for mode in {"svd","svdn","svdne"}; do
  22. MODEL_FILENAME="data_svm/data_${mode}_N${size}_B${start}_E${end}_zones${zones_str}.train.model"
  23. TEST_FILENAME="data_svm/data_${mode}_N${size}_B${start}_E${end}_zones${zones_str}.test"
  24. ./prediction.sh ${TEST_FILENAME} ${MODEL_FILENAME} &
  25. done
  26. done
  27. start=$(($start+50))
  28. done
  29. done