/** * @file VCNearestClassMean.h * @brief Nearest Class Mean Classifier (Naive Bayes with identity covariance matrix for all classes) -> code is based on VCSimpleGaussian and VCNearestNeighbor * @author Erik Rodner + Mi.Ke * @date 12/05/2007 */ #ifdef NICE_USELIB_ICE #ifndef VCNEARESTCLASSMEANINCLUDE #define VCNEARESTCLASSMEANINCLUDE #include "vislearning/classifier/classifierbase/VecClassifier.h" #include #include namespace OBJREC { /** Simple Gaussian Classifier */ class VCNearestClassMean : public VecClassifier { public: std::vector means; std::vector classNo; NICE::VectorDistance *distancefunc; std::map statistics; public: /** simple constructor */ VCNearestClassMean( const NICE::Config *conf, NICE::VectorDistance *distancefunc = NULL ); /** simple destructor */ virtual ~VCNearestClassMean(); /** classify using simple vector */ ClassificationResult classify ( const NICE::Vector & x ) const; /** classify using a simple vector */ void teach ( const LabeledSetVector & teachSet ); void finishTeaching(); void clear (); void store ( std::ostream & os, int format = 0 ) const; void restore ( std::istream & is, int format = 0 ); }; } // namespace #endif //VCNEARESTCLASSMEANINCLUDE #endif //NICE_USELIB_ICE