38 #ifndef PCL_ML_FERNS_FERN_TRAINER_H_ 39 #define PCL_ML_FERNS_FERN_TRAINER_H_ 43 #include <pcl/ml/ferns/fern.h> 44 #include <pcl/ml/feature_handler.h> 45 #include <pcl/ml/stats_estimator.h> 53 template <
class FeatureType,
class DataSet,
class LabelType,
class ExampleIndex,
class NodeType>
71 feature_handler_ = &feature_handler;
80 stats_estimator_ = &stats_estimator;
89 fern_depth_ = fern_depth;
98 num_of_features_ = num_of_features;
107 num_of_thresholds_ = num_of_threshold;
116 data_set_ = data_set;
125 examples_ = examples;
134 label_data_ = label_data;
151 createThresholdsUniform (
const size_t num_of_thresholds,
152 std::vector<float> & values,
153 std::vector<float> & thresholds);
160 size_t num_of_features_;
162 size_t num_of_thresholds_;
172 std::vector<LabelType> label_data_;
174 std::vector<ExampleIndex> examples_;
180 #include <pcl/ml/impl/ferns/fern_trainer.hpp> void setNumOfFeatures(const size_t num_of_features)
Sets the number of features used to find optimal decision features.
void setFeatureHandler(pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler)
Sets the feature handler used to create and evaluate features.
void setNumOfThresholds(const size_t num_of_threshold)
Sets the number of thresholds tested for finding the optimal decision threshold on the feature respon...
void setFernDepth(const size_t fern_depth)
Sets the maximum depth of the learned tree.
This file defines compatibility wrappers for low level I/O functions.
Define standard C methods and C++ classes that are common to all methods.
void setLabelData(std::vector< LabelType > &label_data)
Sets the label data corresponding to the example data.
void setStatsEstimator(pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator)
Sets the object for estimating the statistics for tree nodes.
Class representing a Fern.
void setTrainingDataSet(DataSet &data_set)
Sets the input data set used for training.
void setExamples(std::vector< ExampleIndex > &examples)
Example indices that specify the data used for training.
Utility class interface which is used for creating and evaluating features.