From a6df67e8bcd5159cde27556f4f6a315f8dc2215f Mon Sep 17 00:00:00 2001 From: shamikam Date: Mon, 16 Jan 2017 02:56:17 +0530 Subject: First Commit --- macros/evaluate.sci | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 macros/evaluate.sci (limited to 'macros/evaluate.sci') 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 -- cgit