DTBClusterRandom.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * @file DTBClusterRandom.h
  3. * @brief build a decision tree for clustering
  4. * @author Erik Rodner
  5. * @date 05/01/2010
  6. */
  7. #ifndef DTBCLUSTERRANDOMINCLUDE
  8. #define DTBCLUSTERRANDOMINCLUDE
  9. #include "core/vector/VectorT.h"
  10. #include "core/vector/MatrixT.h"
  11. #include "core/basics/Config.h"
  12. #include "DecisionTreeBuilder.h"
  13. #include "vislearning/cbaselib/CachedExample.h"
  14. namespace OBJREC {
  15. /** build a decision tree for clustering */
  16. class DTBClusterRandom : public DecisionTreeBuilder
  17. {
  18. protected:
  19. int max_depth;
  20. int min_examples;
  21. DecisionNode *buildRecursive ( const FeaturePool & fp,
  22. const Examples & examples,
  23. std::vector<int> & examples_selection,
  24. FullVector & distribution,
  25. int maxClassNo,
  26. int depth );
  27. public:
  28. /** simple constructor */
  29. DTBClusterRandom( const NICE::Config *conf, std::string section = "DTBClusterRandom" );
  30. /** simple destructor */
  31. virtual ~DTBClusterRandom();
  32. DecisionNode *build ( const FeaturePool & fp,
  33. const Examples & examples,
  34. int maxClassNo );
  35. };
  36. } // namespace
  37. #endif