简体   繁体   中英

The gamma and cost parameter of SVM

everybody, here is a weird phenomenon when I was using libSVM to make some predictions.

When I set no parameters of SVM, I will get a 99.9% performance on the testing set. While, if I set parameters '-c 10 -g 5', I will get about 33% precision on the testing set.

By the way, the SVM toolkit I am using is LibSVM.

I wonder if there is something wrong with data set. And I could not figure out which result is more convincing.

You just happen to have a problem for which the default values for C and gamma work well (1 and 1/num_features, respectively).

gamma=5 is significantly larger than the default value. It is perfectly plausible for gamma=5 to induce very poor results, when the default value is close to optimal. The combination of large gamma and large C is a perfect recipe for overfitting (eg high training set performance and low test set performance).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM