blob: 9ab7d28d5ee11b5a8bcb2dcec956a55159b423e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
function confMat = evaluate(classifier, imageSet)
// This function is used to evaluate an image classifier.
//
// Calling Sequence
// confMat = evaluate(classifier, imgSet)
//
// Parameters
// confMat: Confusion matrix as a result of the evaluation
// classifier: Image category classifer
// imgSet: An imageSet struct to be evaluated
//
// Description
// This function evaluates an image category classifier on an input image set.
//
// Examples
// imgSet = imageSet(directory,'recursive');
// [trainingSet testSet] = partition(imgSet,[0.8]);
// bag = bagOfFeatures(trainingSet);
// categoryClassifier = trainImageCategoryClassifier(trainingSet, bag);
// confMatrix = evaluate(categoryClassifer, testSet);
//
// Authors
// Rohit Suri
// Umang Agrawal
classifier_list = classifierToList(classifier)
imageSet_list = imageSetToList(imageSet)
confMat = opencv_evaluate(classifier_list, imageSet_list)
endfunction
|