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>
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;
162 return m_ConfidenceIndex;
193 itkGetMacro(RegressionMode,
bool);
194 void SetRegressionMode(
bool flag);
206 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
271 #ifndef OTB_MANUAL_INSTANTIATION
MachineLearningModel is the base class for all classifier objects (SVM, KNN, Random Forests,...
MLMSampleTraits< TInputValue >::ValueType InputValueType
virtual void Save(const std::string &filename, const std::string &name="")=0
itk::Statistics::ListSample< ConfidenceSampleType > ConfidenceListSampleType
itk::Statistics::ListSample< ProbaSampleType > ProbaListSampleType
TargetListSampleType::Pointer m_TargetListSample
MLMTargetTraits< TConfidenceValue >::SampleType ConfidenceSampleType
~MachineLearningModel() override=default
ConfidenceListSampleType::Pointer m_ConfidenceListSample
InputListSampleType::Pointer m_InputListSample
itkGetObjectMacro(ConfidenceListSample, ConfidenceListSampleType)
bool HasProbaIndex() const
itk::SmartPointer< Self > Pointer
itk::Statistics::ListSample< TargetSampleType > TargetListSampleType
bool m_IsDoPredictBatchMultiThreaded
itk::SmartPointer< const Self > ConstPointer
MLMTargetTraits< TConfidenceValue >::ValueType ConfidenceValueType
itkGetObjectMacro(InputListSample, InputListSampleType)
virtual bool CanReadFile(const std::string &)=0
itk::VariableLengthVector< double > ProbaSampleType
bool m_IsRegressionSupported
MLMTargetTraits< TTargetValue >::ValueType TargetValueType
MachineLearningModel(const Self &)=delete
itk::Statistics::ListSample< InputSampleType > InputListSampleType
itkGetObjectMacro(TargetListSample, TargetListSampleType)
void operator=(const Self &)=delete
bool HasConfidenceIndex() const
MachineLearningModel Self
MLMSampleTraits< TInputValue >::SampleType InputSampleType
virtual TargetSampleType DoPredict(const InputSampleType &input, ConfidenceValueType *quality=nullptr, ProbaSampleType *proba=nullptr) const =0
virtual void Load(const std::string &filename, const std::string &name="")=0
virtual bool CanWriteFile(const std::string &)=0
InputListSampleType::Pointer m_ValidationListSample
MLMTargetTraits< TTargetValue >::SampleType TargetSampleType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.