Point Cloud Library (PCL)
1.10.0
|
42 #include <pcl/ml/dt/decision_forest.h>
43 #include <pcl/ml/dt/decision_tree.h>
44 #include <pcl/ml/dt/decision_tree_trainer.h>
45 #include <pcl/ml/feature_handler.h>
46 #include <pcl/ml/stats_estimator.h>
53 template <
class FeatureType,
74 num_of_trees_to_train_ = num_of_trees;
85 decision_tree_trainer_.setFeatureHandler(feature_handler);
96 decision_tree_trainer_.setStatsEstimator(stats_estimator);
106 decision_tree_trainer_.setMaxTreeDepth(max_tree_depth);
116 decision_tree_trainer_.setNumOfFeatures(num_of_features);
127 decision_tree_trainer_.setNumOfThresholds(num_of_threshold);
137 decision_tree_trainer_.setTrainingDataSet(data_set);
147 decision_tree_trainer_.setExamples(examples);
157 decision_tree_trainer_.setLabelData(label_data);
167 decision_tree_trainer_.setMinExamplesForSplit(n);
177 decision_tree_trainer_.setThresholds(thres);
191 NodeType>::Ptr& dtdp)
193 decision_tree_trainer_.setDecisionTreeDataProvider(dtdp);
203 decision_tree_trainer_.setRandomFeaturesAtSplitNode(b);
215 std::size_t num_of_trees_to_train_;
219 decision_tree_trainer_;
224 #include <pcl/ml/impl/dt/decision_forest_trainer.hpp>
void setThresholds(std::vector< float > &thres)
Specify the thresholds to be used when evaluating features.
This file defines compatibility wrappers for low level I/O functions.
void setExamples(std::vector< ExampleIndex > &examples)
Example indices that specify the data used for training.
void setMaxTreeDepth(const std::size_t max_tree_depth)
Sets the maximum depth of the learned tree.
Utility class interface which is used for creating and evaluating features.
void setNumOfFeatures(const std::size_t num_of_features)
Sets the number of features used to find optimal decision features.
Trainer for decision trees.
Trainer for decision trees.
void setLabelData(std::vector< LabelType > &label_data)
Sets the label data corresponding to the example data.
void setMinExamplesForSplit(std::size_t n)
Sets the minimum number of examples to continue growing a tree.
void setStatsEstimator(pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator)
Sets the object for estimating the statistics for tree nodes.
Class representing a decision forest.
void setFeatureHandler(pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler)
Sets the feature handler used to create and evaluate features.
void setDecisionTreeDataProvider(typename pcl::DecisionTreeTrainerDataProvider< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::Ptr &dtdp)
Specify the data provider.
void setRandomFeaturesAtSplitNode(bool b)
Specify if the features are randomly generated at each split node.
void setTrainingDataSet(DataSet &data_set)
Sets the input data set used for training.
void setNumOfThresholds(const std::size_t num_of_threshold)
Sets the number of thresholds tested for finding the optimal decision threshold on the feature respon...
void setNumberOfTreesToTrain(const std::size_t num_of_trees)
Sets the number of trees to train.