FPCnone.h 1.6 KB

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