perfCv
Cross-validation accuracy of given dataset and classifier
Contents
Syntax
- vRr=perfCv(DS, classifier, classifierOpt)
- vRr=perfCv(DS, classifier, classifierOpt, showPlot)
- [vRrOverall, tRrOverall, vRr, tRr, computedClass]=perfCv(...)
Description
vRr=perfCv(DS, classifier, classifierOpt) returns the cross-validation recognition rate of the given dataset and classifier.
- vRr: validating recognition rate
- DS: Dataset
- DS.input: Input data (each column is a feature vector)
- DS.output: Output class (ranging from 1 to N)
- classifierOpt: Training parameters for the classifier
vRr=perfCv(DS, classifier, classifierOpt, 1) also plots the dataset and misclasified instances (if the dimension is 2).
[vRrOverall, tRrOverall, vRr, tRr, computedClass]=perfCv(...) returns more info about cross-validation:
- vRrOverall: Overall validating RR
- tRrOverall: Overall training RR
- vRr: Validating RR for all folds
- tRr: Training RR for all folds
- computedClass: The computed class of each data instance in DS
Example
DS=prData('iris'); showPlot=1; foldNum=10; classifier='qc'; vRr=perfCv(DS, classifier, [], foldNum, showPlot);
![](perfCv_help_01.png)