Why does grid search cross validation give same value of mean square error for different values of C and gamma in support vector regression ?

2 views (last 30 days)
I am using libsvm in matlab for  time series prediction using support vector regression . When I use grid search cross validation to select parameters C and gamma, the value of cross validation mean square error is coming same for  different values of these parameters.So,by default the best C and gamma are the first values in the given range of parameters which is clearly not the case.
How can I sort this issue and find best value of parameters ?
My code is as follows,
[C,gamma] = meshgrid( -10:1:10, -10:1:10);
for j=1:numel(C) mse_cv(j) = svmtrain(svm_label,svm_data, ... sprintf('-s %d -t %d -c %f -g %f -p %f -v %d -h %d ',s,t, 2^C(j), 2^gamma(j),eps, folds,h )); end
here, 
svm_label =
49.6665 49.6665 49.6668 49.6670 49.6671
and 
svm_data =
 49.6664  49.6665  49.6665  49.6668  49.6670
eps=0.005 ,t=2,s=3,v=5 and h=0.

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!