123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- #ifndef FPCRandomForestTransferINCLUDE
- #define FPCRandomForestTransferINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/basics/Config.h"
- #include "vislearning/cbaselib/ClassNames.h"
- #include "vislearning/classifier/fpclassifier/randomforest/DTEstimateAPriori.h"
- #include "FPCRandomForests.h"
- namespace OBJREC {
- class FPCRandomForestTransfer : public FPCRandomForests
- {
- protected:
-
- std::set<int> substituteClasses;
-
- std::set<int> muClasses;
-
- std::set<int> newClass;
-
-
- bool reduce_training_set;
-
- double training_ratio;
-
- int training_absolute;
-
- bool extend_map_tree;
-
- bool partial_ml_estimation;
- int partial_ml_estimation_depth;
-
-
- double entropy_rejection_threshold;
- bool extend_only_critical_leafs;
-
- double sigmaq;
-
- bool read_cached_prior_structure;
-
-
-
- std::string cached_prior_structure;
-
- bool learn_ert_with_newclass;
-
- void extendMapTree ( FeaturePool & fp,
- DecisionTree & tree,
- Examples & examples_transfer,
- Examples & examples_new,
- int newClassNo,
- const std::set<int> & muClasses );
-
- void mlEstimate ( DecisionNode *node,
- Examples & examples_new,
- int newClassNo );
-
- void partialMLEstimate ( DecisionTree & tree,
- Examples & examples_new,
- int newClassNo,
- int mldepth );
- DecisionTreeBuilder *builder_extend;
- DTEstimateAPriori dte;
- public:
-
-
- FPCRandomForestTransfer(
- const NICE::Config *conf,
- const ClassNames *classNames,
-
-
- std::string section = "RandomForest"
- );
-
-
- virtual ~FPCRandomForestTransfer();
- void train ( FeaturePool & fp,
- Examples & examples );
- FeaturePoolClassifier *clone () const;
- };
- }
- #endif
|