SVM Classification with Cross Validation

1 view (last 30 days)
Wee Chong
Wee Chong on 10 Oct 2012
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

Answers (0)

Categories

Find more on Bioinformatics 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!