generateAndTrainSVM_random.sh 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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="A, B, C, D, E, G"
  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 nb_zones in {3,4,5,6,7,8,9,10}; do
  20. for mode in {"svd","svdn","svdne"}; do
  21. FILENAME="data_svm/data_${mode}_N${size}_B${start}_E${end}_nb_zones_${$nb_zones}_random"
  22. echo $FILENAME
  23. python generate_data_svm.py --output ${FILENAME} --interval "${start},${end}" --kind ${mode} --scenes "${scenes}" --zones "${zones}" --percent 1 --sep : --rowindex 1
  24. ./apprentissage.sh -log2c -20,20,1 -log2g -20,20,1 ${FILENAME}.train &
  25. done
  26. done
  27. start=$(($start+50))
  28. done
  29. done