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,
69 feature_handler_ = &feature_handler;
80 stats_estimator_ = &stats_estimator;
90 fern_depth_ = fern_depth;
100 num_of_features_ = num_of_features;
111 num_of_thresholds_ = num_of_threshold;
121 data_set_ = data_set;
131 examples_ = examples;
141 label_data_ = label_data;
160 createThresholdsUniform(
const std::size_t num_of_thresholds,
161 std::vector<float>& values,
162 std::vector<float>& thresholds);
166 std::size_t fern_depth_;
168 std::size_t num_of_features_;
170 std::size_t num_of_thresholds_;
180 std::vector<LabelType> label_data_;
182 std::vector<ExampleIndex> examples_;
187 #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.