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 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Aagya Niraula
2019 年 2 月 17 日
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.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!