VCTransform.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * @file VCTransform.h
  3. // refactor-nice.pl: check this substitution
  4. // old: * @brief interface to Vector Transformation
  5. * @brief interface to NICE::Vector Transformation
  6. * @author Michael Koch
  7. * @date 11/28/2007
  8. */
  9. #ifndef VCTransformINCLUDE
  10. #define VCTransformINCLUDE
  11. #ifdef NOVISUAL
  12. #include <vislearning/nice_nonvis.h>
  13. #else
  14. #include <vislearning/nice.h>
  15. #endif
  16. #include "vislearning/math/ftransform/FTransform.h"
  17. #include "vislearning/classifier/classifierbase/VecClassifier.h"
  18. namespace OBJREC {
  19. /** VC with Feature Transformation */
  20. class VCTransform : public VecClassifier
  21. {
  22. protected:
  23. VecClassifier * classifier;
  24. FTransform * transform;
  25. LabeledSetVector transformedSet;
  26. uint dimension;
  27. uint mode;
  28. public:
  29. /** simple constructor */
  30. VCTransform( const NICE::Config *conf, VecClassifier * classifier, FTransform * transform );
  31. /** simple destructor */
  32. virtual ~VCTransform();
  33. /** classify using simple vector */
  34. // refactor-nice.pl: check this substitution
  35. // old: virtual ClassificationResult classify ( const ice::Vector & x ) const;
  36. ClassificationResult classify ( const NICE::Vector & x ) const;
  37. void teach ( const LabeledSetVector & teachSet );
  38. void finishTeaching();
  39. void restore ( std::istream & is, int format = 0 );
  40. void store ( std::ostream & is, int format = 0 ) const;
  41. void clear ();
  42. };
  43. } // namespace
  44. #endif