1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- /**
- * @file VCDTSVM.h
- * @brief Interface to DTSVM
- * @author Björn Fröhlich
- * @date 08-02-2011
- */
- #ifndef VCDTSVMINCLUDE
- #define VCDTSVMINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/image/ImageT.h"
- #include "core/imagedisplay/ImageDisplay.h"
- #include "vislearning/cbaselib/LabeledSet.h"
- #include "vislearning/classifier/classifierbase/VecClassifier.h"
- namespace OBJREC {
- class VCDTSVM : public VecClassifier
- {
- protected:
- NICE::Vector max;
- NICE::Vector min;
- int normalization_type;
- /** where to find the binary file */
- std::string binary;
- /** where to find the DT-SVM config files */
- std::string configtrain;
- std::string configtest;
- std::string trainfile;
- std::string testfile;
- private:
- std::vector<std::vector<double> > results;
- std::vector<int> *counter;
- //int counter;
- std::vector<int> labels;
- public:
- /** using a config file to read some settings */
- VCDTSVM ( const NICE::Config *conf, const std::string & section = "VCDTSVM" );
- /** simple copy constructor */
- VCDTSVM ( const VCDTSVM & src );
- /** simple destructor */
- virtual ~VCDTSVM();
- /** classify using simple vector */
- ClassificationResult classify ( const NICE::Vector & x ) const;
- /** classify using a simple vector */
- void teach ( const LabeledSetVector & teachSet );
- void finishTeaching();
- /** clone this object */
- virtual VCDTSVM *clone ( void ) const;
- void clear ();
- void read ( const std::string& s, int format = 0 );
- void save ( const std::string& s, int format = 0 ) const;
- void store ( std::ostream & os, int format = 0 ) const;
- void restore ( std::istream & is, int format = 0 );
- };
- } // namespace
- #endif
|