How to optimize the hyperparameter for support vector regression with LIBSVM library on MATLAB?
显示 更早的评论
To make a regression model using LIBSVM library on MATLAB? Therefore paraameter of optimization is required. I optimized parameter but it's not working because epsilon does not change with other parameter?
my loop for optimization is such as
bestcv = inf;
for log2c = -1:10
for log2g = -1:5
for log2p = -10:-7
cmd = [ '-v 5 -s 3 ', '-c ', num2str(2^log2c), ' -g ', num2str(2^log2g), '-p', num2str(2^log2p)];
cv = svmtrain(Y, X, cmd);
if (cv<= bestcv)
bestcv = cv; bestc = 2^log2c; bestg = 2^log2g; bestp = 2^log2p;
end
fprintf('%g %g %g %g(best c=%g, g=%g, p=%p rate=%g)\n', log2c, log2g, log2p, cv, bestc, bestg, bestp, bestcv);
end
end
end
How to change in the loop and get correct values? please explain it
Thanks in advance
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 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!