#include <OutexClassificationEngine.h>
It automatically creates sample sets and asks a subclass to perform the actual classification on each iteration of the test suite.
Public Methods | |
| OutexClassificationEngine (bool precalculate=true) | |
| Construct a classification engine. | |
| virtual | ~OutexClassificationEngine () |
| Clean up any reserved resources. | |
| void | setPrecalculation (bool precalculate) |
| Set the precalculation flag. | |
| bool | getPrecalculation () |
| Get the current value of the precalculation flag. | |
| void | setRange (int startIndex=0, int endIndex=-1) |
| Set the start and end indices for the classification problems to be run. | |
| int | getStartIndex () const |
| Get the current start index. | |
| int | getEndIndex () const |
| Get the current end index. | |
| virtual util::List< T > | getFeatureVector (const util::Matrix< int > &mat) |
| Whenever the engine encounters a gray-scale image, this method is called. | |
| virtual util::List< T > | getFeatureVector (const util::Matrix< RGBColor<> > &mat) |
| Whenever a color image is encountered, this method is consulted to extract the features. | |
| virtual void | classify (util::List< Sample< T, I, C > > &train, util::List< Sample< T, I, C > > &test, int classCount)=0 |
| Once the engine has constructed the necessary sample sets for classification, it calls this method. | |
| util::List< ConfusionMatrix > | getConfusionMatrices () |
| Once each iteration has been completed, the confusion matrices from each classification are collected in a list. | |
| util::List< util::List< std::string > > | getClasses () |
| Get the class names from each classification. | |
| util::List< std::string > | getClasses (int index) throw (InvalidArgumentException&) |
| Get the class names at the specified classification round. | |
| OutexResult | evaluateSuite (std::string path) throw (OutexException&) |
| The function evaluateSuite classifies all the problems in the test suite and returns the result in OutexResult format. | |
Protected Attributes | |
| bool | _bPrecalculate |
| The pre-calculation flag. | |
| int | _iStartIndex |
| Start and end indices for the problems to be evaluated. | |
| int | _iEndIndex |
| Start and end indices for the problems to be evaluated. | |
| util::List< ConfusionMatrix > | _lstConfusionMatrices |
| A list stroring a confusion matrix for each classification round. | |
| util::List< util::List< std::string > > | _lstClasses |
| Class names for each classification round. | |
|
||||||||||
|
Construct a classification engine.
|
|
||||||||||||||||||||
|
Once the engine has constructed the necessary sample sets for classification, it calls this method. The method can use whatever classification principle you feel suitable. As a result, the classification of each sample in the test set should be performed.
|
|
||||||||||
|
The function evaluateSuite classifies all the problems in the test suite and returns the result in OutexResult format.
|
|
|||||||||
|
Once each iteration has been completed, the confusion matrices from each classification are collected in a list. You can get the list by calling this method. |
|
||||||||||
|
Whenever a color image is encountered, this method is consulted to extract the features. The default implementation returns an empty list.
|
|
||||||||||
|
Whenever the engine encounters a gray-scale image, this method is called. The method should extract the needed features and return them as a feature vector. The default implementation returns an empty list.
|
|
||||||||||
|
Set the precalculation flag.
|
|
||||||||||||||||
|
Set the start and end indices for the classification problems to be run. (By default, all problems are classified.)
|