41 #include <pcl/ml/feature_handler.h>
42 #include <pcl/ml/ferns/fern.h>
43 #include <pcl/ml/stats_estimator.h>
50 template <
class FeatureType,
72 feature_handler_ = &feature_handler;
83 stats_estimator_ = &stats_estimator;
93 fern_depth_ = fern_depth;
103 num_of_features_ = num_of_features;
114 num_of_thresholds_ = num_of_threshold;
124 data_set_ = data_set;
134 examples_ = examples;
144 label_data_ = label_data;
163 createThresholdsUniform(
const std::size_t num_of_thresholds,
164 std::vector<float>& values,
165 std::vector<float>& thresholds);
169 std::size_t fern_depth_;
171 std::size_t num_of_features_;
173 std::size_t num_of_thresholds_;
183 std::vector<LabelType> label_data_;
185 std::vector<ExampleIndex> examples_;
190 #include <pcl/ml/impl/ferns/fern_trainer.hpp>
Utility class interface which is used for creating and evaluating features.
Class representing a Fern.
void setTrainingDataSet(DataSet &data_set)
Sets the input data set used for training.
void setFernDepth(const std::size_t fern_depth)
Sets the maximum depth of the learned tree.
void setNumOfFeatures(const std::size_t num_of_features)
Sets the number of features used to find optimal decision features.
void setStatsEstimator(pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator)
Sets the object for estimating the statistics for tree nodes.
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 setFeatureHandler(pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler)
Sets the feature handler used to create and evaluate features.
void setLabelData(std::vector< LabelType > &label_data)
Sets the label data corresponding to the example data.
void setExamples(std::vector< ExampleIndex > &examples)
Example indices that specify the data used for training.
Define standard C methods and C++ classes that are common to all methods.