123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /**
- * @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 "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
|