Description
NET = SVMCV(NET, X, Y, RANGE)
Given an initialised Support Vector Machine structure NET, the best setting of the kernel parameters is computed via 10fold cross validation. CV is done on the data points X (one point per row) with target values Y (+1 or -1). The kernel parameters that are tested lie between MIN(RANGE) and MAX(RANGE), starting with MIN(RANGE) for ‘rbf’ kernels and MAX(RANGE) for all other kernel functions. RANGE may also be a vector of length >2, in this case RANGE is taken as the explicit sequence of kernel parameters that are tested. SVMCV only works for kernel functions that require one parameter.
[NET, CVERR, PARAMSEQ] = SVMCV(NET, X, Y, RANGE, STEP, NFOLD)
The sequence of test parameters is generated by Param(t+1) = Param(t)*STEP for ‘rbf’ kernels, and Param(t+1) = Param(t)+STEP for all other kernels. Default value: SQRT(2) for ‘rbf’, -1 otherwise. Determine the parameters based on NFOLD cross validation. If STEP==[], RANGE is again interpreted as the explict sequence of kernel parameters.
The tested parameter sequence is returned in PARAMSEQ. For each entry PARAMSEQ(i), there is one line CVERR(i,:) that describes the estimated test set error. CVERR(i,1) is the mean, CVERR(i,2) is the variance of the test set error over all NFOLD runs.
[NET, CVERR, PARAMSEQ] = SVMCV(NET, X, Y, RANGE, STEP, 1, XV, YV)
does parameter selection based on one fixed validation set XV and YV. CVERR(i,2)==0 for all tested parameter settings. NET = SVMCV(NET, X, Y, RANGE, STEP, 1, XV, YV, DODISPLAY) displays error information for all tested parameters. DODISPLAY==0 shows nothing, DODISPLAY==1 shows a final CV summary (default),
DODISPLAY==2 also shows the test set error for each trained SVM, DODISPLAY==3 includes the output produced by SVMTRAIN.
Reviews
There are no reviews yet.