21 #ifndef otbDecisionTreeMachineLearningModel_h
22 #define otbDecisionTreeMachineLearningModel_h
26 #include "itkLightObject.h"
27 #include "itkFixedArray.h"
34 template <
class TInputValue,
class TTargetValue>
64 itkGetMacro(MaxDepth,
int);
65 itkSetMacro(MaxDepth,
int);
73 itkGetMacro(MinSampleCount,
int);
74 itkSetMacro(MinSampleCount,
int);
84 itkGetMacro(RegressionAccuracy,
double);
85 itkSetMacro(RegressionAccuracy,
double);
93 itkGetMacro(UseSurrogates,
bool);
94 itkSetMacro(UseSurrogates,
bool);
108 itkGetMacro(MaxCategories,
int);
109 itkSetMacro(MaxCategories,
int);
117 itkGetMacro(Use1seRule,
bool);
118 itkSetMacro(Use1seRule,
bool);
127 itkGetMacro(TruncatePrunedTree,
bool);
128 itkSetMacro(TruncatePrunedTree,
bool);
153 void Train()
override;
156 void Save(
const std::string& filename,
const std::string& name =
"")
override;
159 void Load(
const std::string& filename,
const std::string& name =
"")
override;
165 bool CanReadFile(
const std::string&)
override;
168 bool CanWriteFile(
const std::string&)
override;
179 TargetSampleType DoPredict(
const InputSampleType& input, ConfidenceValueType* quality =
nullptr, ProbaSampleType* proba =
nullptr)
const override;
182 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
186 void operator=(
const Self&) =
delete;
201 #ifndef OTB_MANUAL_INSTANTIATION