OTB
9.0.0
Orfeo Toolbox
|
#include <otbDecisionTreeMachineLearningModel.h>
Public Types | |
typedef Superclass::ConfidenceValueType | ConfidenceValueType |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef Superclass::InputListSampleType | InputListSampleType |
typedef Superclass::InputSampleType | InputSampleType |
typedef Superclass::InputValueType | InputValueType |
typedef itk::SmartPointer< Self > | Pointer |
typedef Superclass::ProbaSampleType | ProbaSampleType |
typedef DecisionTreeMachineLearningModel | Self |
typedef MachineLearningModel< TInputValue, TTargetValue > | Superclass |
typedef Superclass::TargetListSampleType | TargetListSampleType |
typedef Superclass::TargetSampleType | TargetSampleType |
typedef Superclass::TargetValueType | TargetValueType |
Public Types inherited from otb::MachineLearningModel< TInputValue, TTargetValue > | |
typedef MachineLearningModel | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef MLMSampleTraits< TInputValue >::ValueType | InputValueType |
typedef MLMSampleTraits< TInputValue >::SampleType | InputSampleType |
typedef itk::Statistics::ListSample< InputSampleType > | InputListSampleType |
typedef MLMTargetTraits< TTargetValue >::ValueType | TargetValueType |
typedef MLMTargetTraits< TTargetValue >::SampleType | TargetSampleType |
typedef itk::Statistics::ListSample< TargetSampleType > | TargetListSampleType |
typedef MLMTargetTraits< double >::ValueType | ConfidenceValueType |
typedef MLMTargetTraits< double >::SampleType | ConfidenceSampleType |
typedef itk::Statistics::ListSample< ConfidenceSampleType > | ConfidenceListSampleType |
typedef itk::VariableLengthVector< double > | ProbaSampleType |
typedef itk::Statistics::ListSample< ProbaSampleType > | ProbaListSampleType |
static Pointer | New () |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
virtual int | GetMaxDepth () |
virtual void | SetMaxDepth (int _arg) |
virtual int | GetMinSampleCount () |
virtual void | SetMinSampleCount (int _arg) |
virtual double | GetRegressionAccuracy () |
virtual void | SetRegressionAccuracy (double _arg) |
virtual bool | GetUseSurrogates () |
virtual void | SetUseSurrogates (bool _arg) |
virtual int | GetMaxCategories () |
virtual void | SetMaxCategories (int _arg) |
virtual bool | GetUse1seRule () |
virtual void | SetUse1seRule (bool _arg) |
virtual bool | GetTruncatePrunedTree () |
virtual void | SetTruncatePrunedTree (bool _arg) |
std::vector< float > | GetPriors () const |
void | Train () override |
void | Save (const std::string &filename, const std::string &name="") override |
void | Load (const std::string &filename, const std::string &name="") override |
Classification model file compatibility tests | |
cv::Ptr< cv::ml::DTrees > | m_DTreeModel |
int | m_MaxDepth |
int | m_MinSampleCount |
double | m_RegressionAccuracy |
bool | m_UseSurrogates |
int | m_MaxCategories |
bool | m_Use1seRule |
bool | m_TruncatePrunedTree |
std::vector< float > | m_Priors |
bool | CanReadFile (const std::string &) override |
bool | CanWriteFile (const std::string &) override |
DecisionTreeMachineLearningModel () | |
~DecisionTreeMachineLearningModel () override=default | |
TargetSampleType | DoPredict (const InputSampleType &input, ConfidenceValueType *quality=nullptr, ProbaSampleType *proba=nullptr) const override |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
DecisionTreeMachineLearningModel (const Self &)=delete | |
void | operator= (const Self &)=delete |
Definition at line 35 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::ConfidenceValueType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::ConfidenceValueType |
Definition at line 50 of file otbDecisionTreeMachineLearningModel.h.
typedef itk::SmartPointer<const Self> otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::ConstPointer |
Definition at line 42 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::InputListSampleType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::InputListSampleType |
Definition at line 46 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::InputSampleType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::InputSampleType |
Definition at line 45 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::InputValueType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::InputValueType |
Definition at line 44 of file otbDecisionTreeMachineLearningModel.h.
typedef itk::SmartPointer<Self> otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::Pointer |
Definition at line 41 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::ProbaSampleType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::ProbaSampleType |
Definition at line 51 of file otbDecisionTreeMachineLearningModel.h.
typedef DecisionTreeMachineLearningModel otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::Self |
Standard class typedefs.
Definition at line 39 of file otbDecisionTreeMachineLearningModel.h.
typedef MachineLearningModel<TInputValue, TTargetValue> otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::Superclass |
Definition at line 40 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::TargetListSampleType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::TargetListSampleType |
Definition at line 49 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::TargetSampleType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::TargetSampleType |
Definition at line 48 of file otbDecisionTreeMachineLearningModel.h.
typedef Superclass::TargetValueType otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::TargetValueType |
Definition at line 47 of file otbDecisionTreeMachineLearningModel.h.
|
protected |
Constructor
Definition at line 34 of file otbDecisionTreeMachineLearningModel.hxx.
References otb::MachineLearningModel< TInputValue, TTargetValue >::m_IsRegressionSupported.
|
overrideprotecteddefault |
Destructor
|
privatedelete |
Is the input model file readable and compatible with the corresponding classifier ?
|
overridevirtual |
Is the input model file readable and compatible with the corresponding classifier ?
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 124 of file otbDecisionTreeMachineLearningModel.hxx.
References CV_TYPE_NAME_ML_TREE.
|
overridevirtual |
Is the input model file writable and compatible with the corresponding classifier ?
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 151 of file otbDecisionTreeMachineLearningModel.hxx.
virtual::itk::LightObject::Pointer otb::DecisionTreeMachineLearningModel< TInputValue, TTargetValue >::CreateAnother | ( | void | ) | const |
Run-time type information (and related methods).
|
overrideprotected |
Predict values using the model
Definition at line 81 of file otbDecisionTreeMachineLearningModel.hxx.
|
virtual |
Cluster possible values of a categorical variable into clusters to find a suboptimal split. If a discrete variable, on which the training procedure tries to make a split, takes more than max_categories values, the precise best subset estimation may take a very long time because the algorithm is exponential. Instead, many decision trees engines (including ML) try to find sub-optimal split in this case by clustering all the samples into max_categories clusters that is some categories are merged together. The clustering is applied only in n>2-class classification problems for categorical variables with N > max_categories possible values. In case of regression and 2-class classification the optimal split can be found efficiently without employing clustering, thus the parameter is not used in these cases. Default is 10
|
virtual |
Setters/Getters to the maximum depth of the tree. The maximum possible depth of the tree. That is the training algorithms attempts to split a node while its depth is less than MaxDepth. The actual depth may be smaller if the other termination criteria are met, and/or if the tree is pruned. Default is INT_MAX
|
virtual |
Setters/Getters to the minimum number of sample in each node. If the number of samples in a node is less than this parameter then the node will not be split. Default is 10
|
virtual |
Run-time type information (and related methods).
|
inline |
Run-time type information (and related methods).
Definition at line 147 of file otbDecisionTreeMachineLearningModel.h.
|
virtual |
Termination Criteria for regression tree. If all absolute differences between an estimated value in a node and values of train samples in this node are less than this parameter then the node will not be split. Default is 0.01
|
virtual |
If true then pruned branches are physically removed from the tree. Otherwise they are retained and it is possible to get results from the original unpruned (or pruned less aggressively) tree by decreasing CvDTree::pruned_tree_idx parameter. Default is true
|
virtual |
If true then a pruning will be harsher. This will make a tree more compact and more resistant to the training data noise but a bit less accurate. Default is true
|
virtual |
If true then surrogate splits will be built. These splits allow working with missing data and compute variable importance correctly. Default is true
|
overridevirtual |
Load the model from file
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 117 of file otbDecisionTreeMachineLearningModel.hxx.
|
static |
Run-time type information (and related methods).
|
privatedelete |
Is the input model file readable and compatible with the corresponding classifier ?
|
overrideprotected |
PrintSelf method
Definition at line 157 of file otbDecisionTreeMachineLearningModel.hxx.
|
overridevirtual |
Save the model to file
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 107 of file otbDecisionTreeMachineLearningModel.hxx.
|
virtual |
Run-time type information (and related methods).
|
virtual |
Run-time type information (and related methods).
|
virtual |
Run-time type information (and related methods).
|
virtual |
Run-time type information (and related methods).
|
virtual |
Run-time type information (and related methods).
|
virtual |
Run-time type information (and related methods).
|
virtual |
Run-time type information (and related methods).
|
overridevirtual |
Train the machine learning model
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 50 of file otbDecisionTreeMachineLearningModel.hxx.
References CV_VAR_CATEGORICAL, and CV_VAR_NUMERICAL.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 188 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 194 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 190 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 191 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 197 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 192 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 196 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 195 of file otbDecisionTreeMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 193 of file otbDecisionTreeMachineLearningModel.h.