#652: svm_training.py, reorganize 'if-elif' logic