improved accuracy of optimize_linear_svm; added relevant test