21 #ifndef otbMachineLearningModel_h
22 #define otbMachineLearningModel_h
24 #include "itkObject.h"
25 #include "itkListSample.h"
69 template <
class TInputValue,
class TTargetValue,
class TConf
idenceValue =
double>
111 virtual void Train() = 0;
123 itkSetMacro(Dimension,
unsigned int);
124 itkGetMacro(Dimension,
unsigned int);
143 virtual void Save(
const std::string& filename,
const std::string& name =
"") = 0;
146 virtual void Load(
const std::string& filename,
const std::string& name =
"") = 0;
153 virtual bool CanReadFile(
const std::string&) = 0;
156 virtual bool CanWriteFile(
const std::string&) = 0;
162 return m_ConfidenceIndex;
173 itkSetObjectMacro(InputListSample, InputListSampleType);
174 itkGetObjectMacro(InputListSample, InputListSampleType);
175 itkGetConstObjectMacro(InputListSample, InputListSampleType);
183 itkSetObjectMacro(TargetListSample, TargetListSampleType);
186 itkGetObjectMacro(TargetListSample, TargetListSampleType);
189 itkGetObjectMacro(ConfidenceListSample, ConfidenceListSampleType);
193 itkGetMacro(RegressionMode,
bool);
194 void SetRegressionMode(
bool flag);
206 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
267 void operator=(
const Self&) =
delete;
271 #ifndef OTB_MANUAL_INSTANTIATION