DTBClusterRandom.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #ifdef NOVISUAL
  10. #include <vislearning/nice_nonvis.h>
  11. #else
  12. #include <vislearning/nice.h>
  13. #endif
  14. #include "core/basics/Config.h"
  15. #include "DecisionTreeBuilder.h"
  16. #include "vislearning/cbaselib/CachedExample.h"
  17. namespace OBJREC {
  18. /** build a decision tree for clustering */
  19. class DTBClusterRandom : public DecisionTreeBuilder
  20. {
  21. protected:
  22. int max_depth;
  23. int min_examples;
  24. DecisionNode *buildRecursive ( const FeaturePool & fp,
  25. const Examples & examples,
  26. std::vector<int> & examples_selection,
  27. FullVector & distribution,
  28. int maxClassNo,
  29. int depth );
  30. public:
  31. /** simple constructor */
  32. DTBClusterRandom( const NICE::Config *conf, std::string section = "DTBClusterRandom" );
  33. /** simple destructor */
  34. virtual ~DTBClusterRandom();
  35. DecisionNode *build ( const FeaturePool & fp,
  36. const Examples & examples,
  37. int maxClassNo );
  38. };
  39. } // namespace
  40. #endif