diff options
Diffstat (limited to 'macros/evaluate.sci')
-rw-r--r-- | macros/evaluate.sci | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/macros/evaluate.sci b/macros/evaluate.sci new file mode 100644 index 0000000..9ab7d28 --- /dev/null +++ b/macros/evaluate.sci @@ -0,0 +1,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 |