SVM Classification with Cross Validation
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to follow the examples in Bioinformatics Toolbox -> SVM Classification with Cross Validation (<http://www.mathworks.com/help/bioinfo/ug/support-vector-machines-svm.html#bs3tbev-16>
However, there is one part that I do not understand and that is
9. Set up a function that takes an input z=[rbf_sigma,boxconstraint], and returns the cross-validation value of exp(z). The reason to take exp(z) is twofold:
rbf_sigma and boxconstraint must be positive.
You should look at points spaced approximately exponentially apart.
This function handle computes the cross validation at parameters exp([rbf_sigma,boxconstraint]):
minfn = @(z)crossval('mcr',cdata,grp,'Predfun', ...
@(xtrain,ytrain,xtest)crossfun(xtrain,ytrain,...
xtest,exp(z(1)),exp(z(2))),'partition',c);
Will someone please explain how I should implement this in code? Thanks.
Cheers,
Wee Chong
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bioinformatics Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!