lsecEval
Evaluation for the QC (quadratic classifier)
Contents
Syntax
- computedClass=qcEval(DS)
- computedClass=qcEval(DS, cPrm)
- computedClass=qcEval(DS, cPrm, showPlot)
- [computedClass, logLike, recogRate, hitIndex]=qcEval(...)
Description
[computedClass, logLike, recogRate, hitIndex]=qcEval(DS, cPrm) returns the evaluation results of QC
- DS: dataset
- cPrm: QC parameters
- computedClass: computed class of each data instance
- logLike: log likelihood of each data instance
- recogRate: recognition rate of the QC
- hitIndex: vector of the hit indices of the dataset
If DS does not have "output" field, then this command won't return "recogRate" and "hitIndex".
Example
DS=prData('iris'); DS.input=DS.input(3:4, :); trainSet.input=DS.input(:, 1:2:end); trainSet.output=DS.output(:, 1:2:end); testSet.input=DS.input(:, 2:2:end); testSet.output=DS.output(:, 2:2:end); [cPrm, logLike1, recogRate1]=qcTrain(trainSet); [computedClass, logLike2, recogRate2, hitIndex]=qcEval(testSet, cPrm, 1); fprintf('Inside recog rate = %g%%\n', recogRate1*100); fprintf('Outside recog rate = %g%%\n', recogRate2*100);
Inside recog rate = 97.3333% Outside recog rate = 97.3333%
![](lsecEval_help_01.png)