VCAmitSVM.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. /** interface to the svm generalization of Amit et al. 2007 */
  14. class VCAmitSVM : public VCLearnFromSC
  15. {
  16. protected:
  17. double C;
  18. double gamma;
  19. // refactor-nice.pl: check this substitution
  20. // old: string amitDir;
  21. std::string amitDir;
  22. // refactor-nice.pl: check this substitution
  23. // old: string matlabExec;
  24. std::string matlabExec;
  25. // refactor-nice.pl: check this substitution
  26. // old: string matlabArgs;
  27. std::string matlabArgs;
  28. public:
  29. // refactor-nice.pl: check this substitution
  30. // old: Matrix W;
  31. NICE::Matrix W;
  32. /** simple constructor */
  33. VCAmitSVM( const NICE::Config *conf );
  34. /** simple destructor */
  35. virtual ~VCAmitSVM();
  36. /** classify using simple vector */
  37. // refactor-nice.pl: check this substitution
  38. // old: virtual ClassificationResult classify ( const ice::Vector & x ) const;
  39. virtual ClassificationResult classify ( const NICE::Vector & x ) const;
  40. virtual void preTeach ( const LabeledSetVector & teachSet );
  41. virtual void teach ( const LabeledSetVector & teachSet );
  42. virtual void finishTeaching() {};
  43. void restore ( std::istream & is, int format = 0 );
  44. void store ( std::ostream & is, int format = 0 ) const;
  45. void clear ();
  46. };
  47. } // namespace
  48. #endif