VCAmitSVM.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * @file VCAmitSVM.h
  3. * @brief interface to the svm generalization of Amit et al. 2007
  4. * @author Erik Rodner
  5. * @date 11/28/2007
  6. */
  7. #ifndef VCAMITSVMINCLUDE
  8. #define VCAMITSVMINCLUDE
  9. #include "core/vector/VectorT.h"
  10. #include "core/vector/MatrixT.h"
  11. #include "VCLearnFromSC.h"
  12. namespace OBJREC
  13. {
  14. /** interface to the svm generalization of Amit et al. 2007 */
  15. class VCAmitSVM : public VCLearnFromSC
  16. {
  17. protected:
  18. double C;
  19. double gamma;
  20. std::string amitDir;
  21. std::string matlabExec;
  22. std::string matlabArgs;
  23. public:
  24. NICE::Matrix W;
  25. /** simple constructor */
  26. VCAmitSVM ( const NICE::Config *conf );
  27. /** simple destructor */
  28. virtual ~VCAmitSVM();
  29. /** classify using simple vector */
  30. virtual ClassificationResult classify ( const NICE::Vector & x ) const;
  31. virtual void preTeach ( const LabeledSetVector & teachSet );
  32. virtual void teach ( const LabeledSetVector & teachSet );
  33. virtual void finishTeaching() {};
  34. void restore ( std::istream & is, int format = 0 );
  35. void store ( std::ostream & is, int format = 0 ) const;
  36. void clear ();
  37. };
  38. } // namespace
  39. #endif