OTB  9.0.0
Orfeo Toolbox
Public Types | List of all members
otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue > Class Template Reference

#include <otbNormalBayesMachineLearningModel.h>

+ Inheritance diagram for otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >:
+ Collaboration diagram for otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >:

Public Types

typedef Superclass::ConfidenceValueType ConfidenceValueType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::InputListSampleType InputListSampleType
 
typedef Superclass::InputSampleType InputSampleType
 
typedef Superclass::InputValueType InputValueType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass::ProbaSampleType ProbaSampleType
 
typedef NormalBayesMachineLearningModel 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< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef MLMSampleTraits< TInputValue >::ValueType InputValueType
 
typedef MLMSampleTraits< TInputValue >::SampleType InputSampleType
 
typedef itk::Statistics::ListSample< InputSampleTypeInputListSampleType
 
typedef MLMTargetTraits< TTargetValue >::ValueType TargetValueType
 
typedef MLMTargetTraits< TTargetValue >::SampleType TargetSampleType
 
typedef itk::Statistics::ListSample< TargetSampleTypeTargetListSampleType
 
typedef MLMTargetTraits< double >::ValueType ConfidenceValueType
 
typedef MLMTargetTraits< double >::SampleType ConfidenceSampleType
 
typedef itk::Statistics::ListSample< ConfidenceSampleTypeConfidenceListSampleType
 
typedef itk::VariableLengthVector< double > ProbaSampleType
 
typedef itk::Statistics::ListSample< ProbaSampleTypeProbaListSampleType
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () 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::NormalBayesClassifier > m_NormalBayesModel
 
bool CanReadFile (const std::string &) override
 
bool CanWriteFile (const std::string &) override
 
 NormalBayesMachineLearningModel ()
 
 ~NormalBayesMachineLearningModel () 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
 
 NormalBayesMachineLearningModel (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Public Member Functions inherited from otb::MachineLearningModel< TInputValue, TTargetValue >
virtual const char * GetNameOfClass () const
 
TargetSampleType Predict (const InputSampleType &input, ConfidenceValueType *quality=nullptr, ProbaSampleType *proba=nullptr) const
 
virtual void SetDimension (unsigned int _arg)
 
virtual unsigned int GetDimension ()
 
TargetListSampleType::Pointer PredictBatch (const InputListSampleType *input, ConfidenceListSampleType *quality=nullptr, ProbaListSampleType *proba=nullptr) const
 
bool HasConfidenceIndex () const
 
bool HasProbaIndex () const
 
virtual void SetInputListSample (InputListSampleType *_arg)
 
 itkGetObjectMacro (InputListSample, InputListSampleType)
 
virtual const InputListSampleTypeGetInputListSample () const
 
 itkGetObjectMacro (TargetListSample, TargetListSampleType)
 
 itkGetObjectMacro (ConfidenceListSample, ConfidenceListSampleType)
 
virtual void SetTargetListSample (TargetListSampleType *_arg)
 
virtual bool GetRegressionMode ()
 
void SetRegressionMode (bool flag)
 
- Protected Member Functions inherited from otb::MachineLearningModel< TInputValue, TTargetValue >
 MachineLearningModel ()
 
 ~MachineLearningModel () override=default
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
- Protected Attributes inherited from otb::MachineLearningModel< TInputValue, TTargetValue >
InputListSampleType::Pointer m_InputListSample
 
InputListSampleType::Pointer m_ValidationListSample
 
TargetListSampleType::Pointer m_TargetListSample
 
ConfidenceListSampleType::Pointer m_ConfidenceListSample
 
bool m_RegressionMode
 
bool m_IsRegressionSupported
 
bool m_ConfidenceIndex
 
bool m_ProbaIndex
 
bool m_IsDoPredictBatchMultiThreaded
 
unsigned int m_Dimension
 

Detailed Description

template<class TInputValue, class TTargetValue>
class otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >

Definition at line 35 of file otbNormalBayesMachineLearningModel.h.

Member Typedef Documentation

◆ ConfidenceValueType

template<class TInputValue , class TTargetValue >
typedef Superclass::ConfidenceValueType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::ConfidenceValueType

Definition at line 50 of file otbNormalBayesMachineLearningModel.h.

◆ ConstPointer

template<class TInputValue , class TTargetValue >
typedef itk::SmartPointer<const Self> otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::ConstPointer

Definition at line 42 of file otbNormalBayesMachineLearningModel.h.

◆ InputListSampleType

template<class TInputValue , class TTargetValue >
typedef Superclass::InputListSampleType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::InputListSampleType

Definition at line 46 of file otbNormalBayesMachineLearningModel.h.

◆ InputSampleType

template<class TInputValue , class TTargetValue >
typedef Superclass::InputSampleType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::InputSampleType

Definition at line 45 of file otbNormalBayesMachineLearningModel.h.

◆ InputValueType

template<class TInputValue , class TTargetValue >
typedef Superclass::InputValueType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::InputValueType

Definition at line 44 of file otbNormalBayesMachineLearningModel.h.

◆ Pointer

template<class TInputValue , class TTargetValue >
typedef itk::SmartPointer<Self> otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::Pointer

Definition at line 41 of file otbNormalBayesMachineLearningModel.h.

◆ ProbaSampleType

template<class TInputValue , class TTargetValue >
typedef Superclass::ProbaSampleType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::ProbaSampleType

Definition at line 51 of file otbNormalBayesMachineLearningModel.h.

◆ Self

template<class TInputValue , class TTargetValue >
typedef NormalBayesMachineLearningModel otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::Self

Standard class typedefs.

Definition at line 39 of file otbNormalBayesMachineLearningModel.h.

◆ Superclass

template<class TInputValue , class TTargetValue >
typedef MachineLearningModel<TInputValue, TTargetValue> otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::Superclass

Definition at line 40 of file otbNormalBayesMachineLearningModel.h.

◆ TargetListSampleType

template<class TInputValue , class TTargetValue >
typedef Superclass::TargetListSampleType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::TargetListSampleType

Definition at line 49 of file otbNormalBayesMachineLearningModel.h.

◆ TargetSampleType

template<class TInputValue , class TTargetValue >
typedef Superclass::TargetSampleType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::TargetSampleType

Definition at line 48 of file otbNormalBayesMachineLearningModel.h.

◆ TargetValueType

template<class TInputValue , class TTargetValue >
typedef Superclass::TargetValueType otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::TargetValueType

Definition at line 47 of file otbNormalBayesMachineLearningModel.h.

Constructor & Destructor Documentation

◆ NormalBayesMachineLearningModel() [1/2]

template<class TInputValue , class TOutputValue >
otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::NormalBayesMachineLearningModel
protected

Constructor

Definition at line 33 of file otbNormalBayesMachineLearningModel.hxx.

◆ ~NormalBayesMachineLearningModel()

template<class TInputValue , class TTargetValue >
otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::~NormalBayesMachineLearningModel ( )
overrideprotecteddefault

Destructor

◆ NormalBayesMachineLearningModel() [2/2]

template<class TInputValue , class TTargetValue >
otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::NormalBayesMachineLearningModel ( const Self )
privatedelete

Is the input model file readable and compatible with the corresponding classifier ?

Member Function Documentation

◆ CanReadFile()

template<class TInputValue , class TOutputValue >
bool otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::CanReadFile ( const std::string &  file)
overridevirtual

Is the input model file readable and compatible with the corresponding classifier ?

Implements otb::MachineLearningModel< TInputValue, TTargetValue >.

Definition at line 105 of file otbNormalBayesMachineLearningModel.hxx.

References CV_TYPE_NAME_ML_NBAYES.

◆ CanWriteFile()

template<class TInputValue , class TOutputValue >
bool otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::CanWriteFile ( const std::string &  )
overridevirtual

Is the input model file writable and compatible with the corresponding classifier ?

Implements otb::MachineLearningModel< TInputValue, TTargetValue >.

Definition at line 131 of file otbNormalBayesMachineLearningModel.hxx.

◆ CreateAnother()

template<class TInputValue , class TTargetValue >
virtual::itk::LightObject::Pointer otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::CreateAnother ( void  ) const

Run-time type information (and related methods).

◆ DoPredict()

template<class TInputValue , class TOutputValue >
NormalBayesMachineLearningModel< TInputValue, TOutputValue >::TargetSampleType otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::DoPredict ( const InputSampleType input,
ConfidenceValueType quality = nullptr,
ProbaSampleType proba = nullptr 
) const
overrideprotected

Predict values using the model

Definition at line 59 of file otbNormalBayesMachineLearningModel.hxx.

◆ GetNameOfClass()

template<class TInputValue , class TTargetValue >
virtual const char* otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ Load()

template<class TInputValue , class TOutputValue >
void otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::Load ( const std::string &  filename,
const std::string &  name = "" 
)
overridevirtual

Load the model from file

Implements otb::MachineLearningModel< TInputValue, TTargetValue >.

Definition at line 98 of file otbNormalBayesMachineLearningModel.hxx.

◆ New()

template<class TInputValue , class TTargetValue >
static Pointer otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::New ( )
static

Run-time type information (and related methods).

◆ operator=()

template<class TInputValue , class TTargetValue >
void otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::operator= ( const Self )
privatedelete

Is the input model file readable and compatible with the corresponding classifier ?

◆ PrintSelf()

template<class TInputValue , class TOutputValue >
void otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

Definition at line 137 of file otbNormalBayesMachineLearningModel.hxx.

◆ Save()

template<class TInputValue , class TOutputValue >
void otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::Save ( const std::string &  filename,
const std::string &  name = "" 
)
overridevirtual

Save the model to file

Implements otb::MachineLearningModel< TInputValue, TTargetValue >.

Definition at line 88 of file otbNormalBayesMachineLearningModel.hxx.

◆ Train()

template<class TInputValue , class TOutputValue >
void otb::NormalBayesMachineLearningModel< TInputValue, TOutputValue >::Train
overridevirtual

Train the machine learning model

Implements otb::MachineLearningModel< TInputValue, TTargetValue >.

Definition at line 40 of file otbNormalBayesMachineLearningModel.hxx.

References CV_VAR_CATEGORICAL, and CV_VAR_NUMERICAL.

Member Data Documentation

◆ m_NormalBayesModel

template<class TInputValue , class TTargetValue >
cv::Ptr<cv::ml::NormalBayesClassifier> otb::NormalBayesMachineLearningModel< TInputValue, TTargetValue >::m_NormalBayesModel
private

Is the input model file readable and compatible with the corresponding classifier ?

Definition at line 92 of file otbNormalBayesMachineLearningModel.h.


The documentation for this class was generated from the following files: