predictSVM_random.sh 796 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. for size in {"4","8","16","26","32","40"}; do
  10. start=0
  11. for counter in {0..4}; do
  12. end=$(($start+$size))
  13. if [ "$end" -gt "$VECTOR_SIZE" ]; then
  14. start=$(($VECTOR_SIZE-$size))
  15. end=$(($VECTOR_SIZE))
  16. fi
  17. for nb_zones in {3,4,5,6,7,8,9,10}; do
  18. for mode in {"svd","svdn","svdne"}; do
  19. MODEL_FILENAME="data_svm/data_${mode}_N${size}_B${start}_E${end}_nb_zones_${$nb_zones}.train.model"
  20. TEST_FILENAME="data_svm/data_${mode}_N${size}_B${start}_E${end}_nb_zones_${$nb_zones}.test"
  21. ./prediction.sh ${TEST_FILENAME} ${MODEL_FILENAME} &
  22. done
  23. done
  24. start=$(($start+50))
  25. done
  26. done