FPCnone.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * @file FPCnone.h
  3. * @brief bad hack, not realy a classifier, returns the first values as classification result
  4. * @author Björn Fröhlich
  5. * @date 18/06/2010
  6. */
  7. #ifndef FPCnoneDEF
  8. #define FPCnoneDEF
  9. #include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
  10. #include "vislearning/classifier/fpclassifier/logisticregression/SLR.h"
  11. #include "vislearning/cbaselib/FeaturePool.h"
  12. namespace OBJREC {
  13. class FPCnone : public FeaturePoolClassifier
  14. {
  15. protected:
  16. //! the featurepool
  17. FeaturePool fp;
  18. //! config file;
  19. const NICE::Config *conf;
  20. public:
  21. /**
  22. * standard constructor
  23. * @param conf configfile
  24. * @param section section name in configfile for classifier
  25. */
  26. FPCnone( const NICE::Config *conf, std::string section = "SMLR" );
  27. /**
  28. * simple constructor -> does nothing
  29. */
  30. FPCnone();
  31. /**
  32. * simple destructor
  33. */
  34. ~FPCnone();
  35. /**
  36. * main classification function
  37. * @param pce input feature
  38. * @return a classification result
  39. */
  40. ClassificationResult classify( Example & pce );
  41. /**
  42. * start training
  43. * @param fp a featurepool (how to handle which features...)
  44. * @param examples input features
  45. */
  46. void train( FeaturePool & _fp, Examples & examples );
  47. /**
  48. * clone this object
  49. * @return a copy of this object
  50. */
  51. FeaturePoolClassifier *clone() const;
  52. /**
  53. * set complexity for the next training process e.g. number of weak classifiers
  54. * @param size new complexity
  55. */
  56. void setComplexity( int size );
  57. /** IO functions */
  58. void restore( std::istream & is, int format = 0 );
  59. void store( std::ostream & os, int format = 0 ) const;
  60. void clear();
  61. };
  62. } // namespace
  63. #endif