123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /**
- * @file VCOneVsOne.h
- * @brief one-vs.-one svm voting
- * @author Erik Rodner
- * @date 10/25/2007
- */
- #ifndef VCOneVsOneINCLUDE
- #define VCOneVsOneINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "vislearning/classifier/classifierbase/VecClassifier.h"
- #include "core/basics/triplet.h"
- namespace OBJREC {
- /** one-vs.-one svm voting */
- class VCOneVsOne : public VecClassifier
- {
- protected:
-
- VecClassifier *prototype;
- std::vector< triplet<int, int, VecClassifier *> > classifiers;
- bool use_weighted_voting;
- public:
-
- /** simple constructor */
- VCOneVsOne( const NICE::Config *conf, VecClassifier *prototype );
-
- /** simple destructor */
- virtual ~VCOneVsOne();
-
- /** classify using simple vector */
- ClassificationResult classify ( const NICE::Vector & x ) const;
- /** classify using a simple vector */
- void teach ( const LabeledSetVector & teachSet );
-
- void finishTeaching();
- void read (const std::string& s, int format = 0);
- void save (const std::string& s, int format = 0) const;
- void clear () { classifiers.clear(); };
- void store ( std::ostream & os, int format = 0 ) const;
- void restore ( std::istream & is, int format = 0 );
- };
- } // namespace
- #endif
|