Optimal SVM parameter selection for non-separable and unbalanced datasets