Why does grid search cross validation give same value of mean square error for different values of C and gamma in support vector regression ?
Ältere Kommentare anzeigen
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.
1 Kommentar
Aagya Niraula
am 17 Feb. 2019
hey Sharda! Is your problem solved? As I am getting stuck with the same problem so can you tell me how did you solve it if possible.
Antworten (0)
Kategorien
Mehr zu Special Functions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!