VCAmitSVM.h 1.5 KB

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