OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
otb::PCAModel< TInputValue > Class Template Reference

#include <otbPCAModel.h>

+ Inheritance diagram for otb::PCAModel< TInputValue >:
+ Collaboration diagram for otb::PCAModel< TInputValue >:

Public Types

typedef Superclass::ConfidenceListSampleType ConfidenceListSampleType
 
typedef Superclass::ConfidenceSampleType ConfidenceSampleType
 
typedef Superclass::ConfidenceValueType ConfidenceValueType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::InputListSampleType InputListSampleType
 
typedef Superclass::InputSampleType InputSampleType
 
typedef Superclass::InputValueType InputValueType
 
typedef InputListSampleType::Pointer ListSamplePointerType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass::ProbaListSampleType ProbaListSampleType
 
typedef Superclass::ProbaSampleType ProbaSampleType
 
typedef PCAModel Self
 
typedef MachineLearningModel< itk::VariableLengthVector< TInputValue >, itk::VariableLengthVector< TInputValue > > Superclass
 
typedef Superclass::TargetListSampleType TargetListSampleType
 
typedef Superclass::TargetSampleType TargetSampleType
 
typedef Superclass::TargetValueType TargetValueType
 
- Public Types inherited from otb::MachineLearningModel< itk::VariableLengthVector< TInputValue >, itk::VariableLengthVector< TInputValue > >
typedef MachineLearningModel Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef MLMSampleTraits< itk::VariableLengthVector< TInputValue > >::ValueType InputValueType
 
typedef MLMSampleTraits< itk::VariableLengthVector< TInputValue > >::SampleType InputSampleType
 
typedef itk::Statistics::ListSample< InputSampleTypeInputListSampleType
 
typedef MLMTargetTraits< itk::VariableLengthVector< TInputValue > >::ValueType TargetValueType
 
typedef MLMTargetTraits< itk::VariableLengthVector< TInputValue > >::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
 

Public Member Functions

bool CanReadFile (const std::string &filename) override
 
bool CanWriteFile (const std::string &filename) override
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual bool GetWriteEigenvectors ()
 
void Load (const std::string &filename, const std::string &name="") override
 
void Save (const std::string &filename, const std::string &name="") override
 
virtual void SetDoResizeFlag (bool _arg)
 
virtual void SetWriteEigenvectors (bool _arg)
 
void Train () override
 
- Public Member Functions inherited from otb::MachineLearningModel< itk::VariableLengthVector< TInputValue >, itk::VariableLengthVector< TInputValue > >
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)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

virtual TargetSampleType DoPredict (const InputSampleType &input, ConfidenceValueType *quality=nullptr, ProbaSampleType *proba=nullptr) const override
 
virtual void DoPredictBatch (const InputListSampleType *, const unsigned int &startIndex, const unsigned int &size, TargetListSampleType *, ConfidenceListSampleType *quality=nullptr, ProbaListSampleType *proba=nullptr) const override
 
 PCAModel ()
 
 ~PCAModel () override
 
- Protected Member Functions inherited from otb::MachineLearningModel< itk::VariableLengthVector< TInputValue >, itk::VariableLengthVector< TInputValue > >
 MachineLearningModel ()
 
 ~MachineLearningModel () override=default
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Private Attributes

shark::LinearModel m_Decoder
 
bool m_DoResizeFlag
 
shark::LinearModel m_Encoder
 
shark::PCA m_PCA
 
bool m_WriteEigenvectors
 

Additional Inherited Members

- Protected Attributes inherited from otb::MachineLearningModel< itk::VariableLengthVector< TInputValue >, itk::VariableLengthVector< TInputValue > >
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 otb::PCAModel< TInputValue >

This class wraps a PCA model implemented by Shark, in a otb::MachineLearningModel

Definition at line 73 of file otbPCAModel.h.

Member Typedef Documentation

◆ ConfidenceListSampleType

template<class TInputValue >
typedef Superclass::ConfidenceListSampleType otb::PCAModel< TInputValue >::ConfidenceListSampleType

Definition at line 92 of file otbPCAModel.h.

◆ ConfidenceSampleType

template<class TInputValue >
typedef Superclass::ConfidenceSampleType otb::PCAModel< TInputValue >::ConfidenceSampleType

Definition at line 91 of file otbPCAModel.h.

◆ ConfidenceValueType

template<class TInputValue >
typedef Superclass::ConfidenceValueType otb::PCAModel< TInputValue >::ConfidenceValueType

Definition at line 90 of file otbPCAModel.h.

◆ ConstPointer

template<class TInputValue >
typedef itk::SmartPointer<const Self> otb::PCAModel< TInputValue >::ConstPointer

Definition at line 79 of file otbPCAModel.h.

◆ InputListSampleType

template<class TInputValue >
typedef Superclass::InputListSampleType otb::PCAModel< TInputValue >::InputListSampleType

Definition at line 83 of file otbPCAModel.h.

◆ InputSampleType

template<class TInputValue >
typedef Superclass::InputSampleType otb::PCAModel< TInputValue >::InputSampleType

Definition at line 82 of file otbPCAModel.h.

◆ InputValueType

template<class TInputValue >
typedef Superclass::InputValueType otb::PCAModel< TInputValue >::InputValueType

Definition at line 81 of file otbPCAModel.h.

◆ ListSamplePointerType

template<class TInputValue >
typedef InputListSampleType::Pointer otb::PCAModel< TInputValue >::ListSamplePointerType

Definition at line 84 of file otbPCAModel.h.

◆ Pointer

template<class TInputValue >
typedef itk::SmartPointer<Self> otb::PCAModel< TInputValue >::Pointer

Definition at line 78 of file otbPCAModel.h.

◆ ProbaListSampleType

template<class TInputValue >
typedef Superclass::ProbaListSampleType otb::PCAModel< TInputValue >::ProbaListSampleType

Definition at line 95 of file otbPCAModel.h.

◆ ProbaSampleType

template<class TInputValue >
typedef Superclass::ProbaSampleType otb::PCAModel< TInputValue >::ProbaSampleType

Definition at line 94 of file otbPCAModel.h.

◆ Self

template<class TInputValue >
typedef PCAModel otb::PCAModel< TInputValue >::Self

Definition at line 76 of file otbPCAModel.h.

◆ Superclass

template<class TInputValue >
typedef MachineLearningModel<itk::VariableLengthVector<TInputValue>, itk::VariableLengthVector<TInputValue> > otb::PCAModel< TInputValue >::Superclass

Definition at line 77 of file otbPCAModel.h.

◆ TargetListSampleType

template<class TInputValue >
typedef Superclass::TargetListSampleType otb::PCAModel< TInputValue >::TargetListSampleType

Definition at line 87 of file otbPCAModel.h.

◆ TargetSampleType

template<class TInputValue >
typedef Superclass::TargetSampleType otb::PCAModel< TInputValue >::TargetSampleType

Definition at line 86 of file otbPCAModel.h.

◆ TargetValueType

template<class TInputValue >
typedef Superclass::TargetValueType otb::PCAModel< TInputValue >::TargetValueType

Definition at line 85 of file otbPCAModel.h.

Constructor & Destructor Documentation

◆ PCAModel()

template<class TInputValue >
otb::PCAModel< TInputValue >::PCAModel
protected

Definition at line 53 of file otbPCAModel.hxx.

◆ ~PCAModel()

template<class TInputValue >
otb::PCAModel< TInputValue >::~PCAModel
overrideprotected

Definition at line 60 of file otbPCAModel.hxx.

Member Function Documentation

◆ CanReadFile()

template<class TInputValue >
bool otb::PCAModel< TInputValue >::CanReadFile ( const std::string &  )
overridevirtual

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

Implements otb::MachineLearningModel< itk::VariableLengthVector< TInputValue >, itk::VariableLengthVector< TInputValue > >.

Definition at line 78 of file otbPCAModel.hxx.

◆ CanWriteFile()

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

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

Implements otb::MachineLearningModel< itk::VariableLengthVector< TInputValue >, itk::VariableLengthVector< TInputValue > >.

Definition at line 93 of file otbPCAModel.hxx.

◆ CreateAnother()

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

◆ DoPredict()

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

Definition at line 151 of file otbPCAModel.hxx.

◆ DoPredictBatch()

template<class TInputValue >
void otb::PCAModel< TInputValue >::DoPredictBatch ( const InputListSampleType input,
const unsigned int &  startIndex,
const unsigned int &  size,
TargetListSampleType targets,
ConfidenceListSampleType quality = nullptr,
ProbaListSampleType proba = nullptr 
) const
overrideprotectedvirtual

Definition at line 177 of file otbPCAModel.hxx.

◆ GetNameOfClass()

template<class TInputValue >
virtual const char* otb::PCAModel< TInputValue >::GetNameOfClass ( ) const
virtual

◆ GetWriteEigenvectors()

template<class TInputValue >
virtual bool otb::PCAModel< TInputValue >::GetWriteEigenvectors ( )
virtual

◆ Load()

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

◆ New()

template<class TInputValue >
static Pointer otb::PCAModel< TInputValue >::New ( )
static

◆ Save()

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

◆ SetDoResizeFlag()

template<class TInputValue >
virtual void otb::PCAModel< TInputValue >::SetDoResizeFlag ( bool  _arg)
virtual

◆ SetWriteEigenvectors()

template<class TInputValue >
virtual void otb::PCAModel< TInputValue >::SetWriteEigenvectors ( bool  _arg)
virtual

◆ Train()

template<class TInputValue >
void otb::PCAModel< TInputValue >::Train
overridevirtual

Member Data Documentation

◆ m_Decoder

template<class TInputValue >
shark::LinearModel otb::PCAModel< TInputValue >::m_Decoder
private

Definition at line 124 of file otbPCAModel.h.

◆ m_DoResizeFlag

template<class TInputValue >
bool otb::PCAModel< TInputValue >::m_DoResizeFlag
private

Definition at line 126 of file otbPCAModel.h.

◆ m_Encoder

template<class TInputValue >
shark::LinearModel otb::PCAModel< TInputValue >::m_Encoder
private

Definition at line 123 of file otbPCAModel.h.

◆ m_PCA

template<class TInputValue >
shark::PCA otb::PCAModel< TInputValue >::m_PCA
private

Definition at line 125 of file otbPCAModel.h.

◆ m_WriteEigenvectors

template<class TInputValue >
bool otb::PCAModel< TInputValue >::m_WriteEigenvectors
private

Definition at line 127 of file otbPCAModel.h.


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