12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #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
- {
- class VCOneVsOne : public VecClassifier
- {
- protected:
- VecClassifier *prototype;
- std::vector< NICE::triplet<int, int, VecClassifier *> > classifiers;
- bool use_weighted_voting;
- public:
-
- VCOneVsOne ( const NICE::Config *conf, VecClassifier *prototype );
-
- virtual ~VCOneVsOne();
-
- ClassificationResult classify ( const NICE::Vector & x ) const;
-
- 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 );
- };
- }
- #endif
|