/** * @file ClassificationResults.h // refactor-nice.pl: check this substitution // old: * @brief vector of ClassificationResult's * @brief std::vector of ClassificationResult's * @author Erik Rodner * @date 02/13/2008 */ #ifndef CLASSIFICATIONRESULTSINCLUDE #define CLASSIFICATIONRESULTSINCLUDE #include "core/image/ImageT.h" #include "core/vector/VectorT.h" #include "core/vector/MatrixT.h" #include #include "ClassificationResult.h" namespace OBJREC { /** vector of ClassificationResult's @see ClassificationResult */ class ClassificationResults : public std::vector { public: enum { PERF_AVG_PRECISION_11_POINT = 0, PERF_AUC = 1, PERF_AVG_PRECISION }; protected: public: /** simple constructor */ ClassificationResults(); /** simple destructor */ virtual ~ClassificationResults(); /** write BINARY classification results in WEKA format suitable for drawing ROC curves @param filename write results to filename @param classno class number of object class within the binary classification setting */ void writeWEKA ( const std::string & filename, int classno ) const; /** please choose the type from the public enum, * this only works for binary classification problems */ double getBinaryClassPerformance ( int type = PERF_AUC ) const; /** return average recognition rate, useful for multi-class problems */ double getAverageRecognitionRate() const; /** return overall recognition rate, useful for multi-class problems */ double getOverallRecognitionRate() const; }; } // namespace #endif