OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue > Class Template Reference

#include <otbRandomForestsMachineLearningModel.h>

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

Public Types

typedef
Superclass::ConfidenceValueType 
ConfidenceValueType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
Superclass::InputListSampleType 
InputListSampleType
 
typedef Superclass::InputSampleType InputSampleType
 
typedef Superclass::InputValueType InputValueType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass::ProbaSampleType ProbaSampleType
 
typedef CvRTreesWrapper RFType
 
typedef
RandomForestsMachineLearningModel 
Self
 
typedef MachineLearningModel
< TInputValue, TTargetValue > 
Superclass
 
typedef
Superclass::TargetListSampleType 
TargetListSampleType
 
typedef
Superclass::TargetSampleType 
TargetSampleType
 
typedef Superclass::TargetValueType TargetValueType
 
typedef
itk::VariableSizeMatrix< float > 
VariableImportanceMatrixType
 
- Public Types inherited from otb::MachineLearningModel< TInputValue, TTargetValue >
typedef MachineLearningModel Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef MLMSampleTraits
< TInputValue >::ValueType 
InputValueType
 
typedef MLMSampleTraits
< TInputValue >::SampleType 
InputSampleType
 
typedef
itk::Statistics::ListSample
< InputSampleType
InputListSampleType
 
typedef MLMTargetTraits
< TTargetValue >::ValueType 
TargetValueType
 
typedef MLMTargetTraits
< TTargetValue >::SampleType 
TargetSampleType
 
typedef
itk::Statistics::ListSample
< TargetSampleType
TargetListSampleType
 
typedef MLMTargetTraits
< double >::ValueType 
ConfidenceValueType
 
typedef MLMTargetTraits
< double >::SampleType 
ConfidenceSampleType
 
typedef
itk::Statistics::ListSample
< ConfidenceSampleType
ConfidenceListSampleType
 
typedef
itk::VariableLengthVector
< double > 
ProbaSampleType
 
typedef
itk::Statistics::ListSample
< ProbaSampleType
ProbaListSampleType
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual bool GetCalculateVariableImportance ()
 
virtual bool GetComputeMargin ()
 
virtual bool GetComputeSurrogateSplit ()
 
virtual float GetForestAccuracy ()
 
virtual int GetMaxDepth ()
 
virtual int GetMaxNumberOfCategories ()
 
virtual int GetMaxNumberOfTrees ()
 
virtual int GetMaxNumberOfVariables ()
 
virtual int GetMinSampleCount ()
 
std::vector< float > GetPriors () const
 
virtual double GetRegressionAccuracy ()
 
virtual int GetTerminationCriteria ()
 
float GetTrainError ()
 
virtual void SetCalculateVariableImportance (bool _arg)
 
virtual void SetComputeMargin (bool _arg)
 
virtual void SetComputeSurrogateSplit (bool _arg)
 
virtual void SetForestAccuracy (float _arg)
 
virtual void SetMaxDepth (int _arg)
 
virtual void SetMaxNumberOfCategories (int _arg)
 
virtual void SetMaxNumberOfTrees (int _arg)
 
virtual void SetMaxNumberOfVariables (int _arg)
 
virtual void SetMinSampleCount (int _arg)
 
void SetPriors (const std::vector< float > &priors)
 
virtual void SetRegressionAccuracy (double _arg)
 
virtual void SetTerminationCriteria (int _arg)
 
Classification model file compatibility tests
bool CanReadFile (const std::string &) override
 
bool CanWriteFile (const std::string &) override
 
- Public Member Functions inherited from otb::MachineLearningModel< TInputValue, TTargetValue >
bool HasConfidenceIndex () const
 
bool HasProbaIndex () const
 
 itkGetObjectMacro (ConfidenceListSample, ConfidenceListSampleType)
 
TargetSampleType Predict (const InputSampleType &input, ConfidenceValueType *quality=nullptr, ProbaSampleType *proba=nullptr) const
 
TargetListSampleType::Pointer PredictBatch (const InputListSampleType *input, ConfidenceListSampleType *quality=nullptr, ProbaListSampleType *proba=nullptr) const
 
virtual void SetDimension (unsigned int _arg)
 
virtual unsigned int GetDimension ()
 
virtual void SetInputListSample (InputListSampleType *_arg)
 
 itkGetObjectMacro (InputListSample, InputListSampleType)
 
virtual const InputListSampleTypeGetInputListSample () const
 
 itkGetObjectMacro (TargetListSample, TargetListSampleType)
 
virtual void SetTargetListSample (TargetListSampleType *_arg)
 
virtual bool GetRegressionMode ()
 
void SetRegressionMode (bool flag)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

 RandomForestsMachineLearningModel ()
 
 ~RandomForestsMachineLearningModel () override
 
- Protected Member Functions inherited from otb::MachineLearningModel< TInputValue, TTargetValue >
 MachineLearningModel ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~MachineLearningModel () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

void operator= (const Self &)=delete
 
 RandomForestsMachineLearningModel (const Self &)=delete
 

Private Attributes

bool m_CalculateVariableImportance
 
bool m_ComputeSurrogateSplit
 
float m_ForestAccuracy
 
int m_MaxDepth
 
int m_MaxNumberOfCategories
 
int m_MaxNumberOfTrees
 
int m_MaxNumberOfVariables
 
int m_MinSampleCount
 
std::vector< float > m_Priors
 
float m_RegressionAccuracy
 
CvRTreesWrapperm_RFModel
 
int m_TerminationCriteria
 
bool m_ComputeMargin
 
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
 
VariableImportanceMatrixType GetVariableImportance ()
 
TargetSampleType DoPredict (const InputSampleType &input, ConfidenceValueType *quality=nullptr, ProbaSampleType *proba=nullptr) const override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Attributes inherited from otb::MachineLearningModel< TInputValue, TTargetValue >
bool m_ConfidenceIndex
 
ConfidenceListSampleType::Pointer m_ConfidenceListSample
 
unsigned int m_Dimension
 
InputListSampleType::Pointer m_InputListSample
 
bool m_IsDoPredictBatchMultiThreaded
 
bool m_IsRegressionSupported
 
bool m_ProbaIndex
 
bool m_RegressionMode
 
TargetListSampleType::Pointer m_TargetListSample
 
InputListSampleType::Pointer m_ValidationListSample
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

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

Definition at line 36 of file otbRandomForestsMachineLearningModel.h.

Member Typedef Documentation

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

Definition at line 52 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 44 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 48 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 47 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 46 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 43 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 53 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
typedef CvRTreesWrapper otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::RFType

Definition at line 59 of file otbRandomForestsMachineLearningModel.h.

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

Standard class typedefs.

Definition at line 41 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 42 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 51 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 50 of file otbRandomForestsMachineLearningModel.h.

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

Definition at line 49 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
typedef itk::VariableSizeMatrix<float> otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::VariableImportanceMatrixType

Definition at line 55 of file otbRandomForestsMachineLearningModel.h.

Constructor & Destructor Documentation

template<class TInputValue , class TOutputValue >
otb::RandomForestsMachineLearningModel< TInputValue, TOutputValue >::RandomForestsMachineLearningModel ( )
protected

Constructor

Definition at line 34 of file otbRandomForestsMachineLearningModel.hxx.

template<class TInputValue , class TOutputValue >
otb::RandomForestsMachineLearningModel< TInputValue, TOutputValue >::~RandomForestsMachineLearningModel ( )
overrideprotected

Destructor

Definition at line 60 of file otbRandomForestsMachineLearningModel.hxx.

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

Member Function Documentation

template<class TInputValue , class TOutputValue >
bool otb::RandomForestsMachineLearningModel< 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 241 of file otbRandomForestsMachineLearningModel.hxx.

template<class TInputValue , class TOutputValue >
bool otb::RandomForestsMachineLearningModel< 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 276 of file otbRandomForestsMachineLearningModel.hxx.

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

Run-time type information (and related methods).

Reimplemented from itk::Object.

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

Predict values using the model

Definition at line 176 of file otbRandomForestsMachineLearningModel.hxx.

template<class TInputValue, class TTargetValue>
virtual bool otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetCalculateVariableImportance ( )
virtual
template<class TInputValue, class TTargetValue>
virtual bool otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetComputeMargin ( )
virtual
template<class TInputValue, class TTargetValue>
virtual bool otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetComputeSurrogateSplit ( )
virtual
template<class TInputValue, class TTargetValue>
virtual float otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetForestAccuracy ( )
virtual
template<class TInputValue, class TTargetValue>
virtual int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetMaxDepth ( )
virtual
template<class TInputValue, class TTargetValue>
virtual int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetMaxNumberOfCategories ( )
virtual
template<class TInputValue, class TTargetValue>
virtual int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetMaxNumberOfTrees ( )
virtual
template<class TInputValue, class TTargetValue>
virtual int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetMaxNumberOfVariables ( )
virtual
template<class TInputValue, class TTargetValue>
virtual int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetMinSampleCount ( )
virtual
template<class TInputValue, class TTargetValue>
virtual const char* otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from otb::MachineLearningModel< TInputValue, TTargetValue >.

template<class TInputValue, class TTargetValue>
std::vector<float> otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetPriors ( ) const
inline

Definition at line 101 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
virtual double otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetRegressionAccuracy ( )
virtual
template<class TInputValue, class TTargetValue>
virtual int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::GetTerminationCriteria ( )
virtual
template<class TInputValue , class TOutputValue >
float otb::RandomForestsMachineLearningModel< TInputValue, TOutputValue >::GetTrainError ( )

Definition at line 70 of file otbRandomForestsMachineLearningModel.hxx.

template<class TInputValue , class TOutputValue >
RandomForestsMachineLearningModel< TInputValue, TOutputValue >::VariableImportanceMatrixType otb::RandomForestsMachineLearningModel< TInputValue, TOutputValue >::GetVariableImportance ( )

Returns a matrix containing variable importance

Definition at line 285 of file otbRandomForestsMachineLearningModel.hxx.

template<class TInputValue , class TOutputValue >
void otb::RandomForestsMachineLearningModel< 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 225 of file otbRandomForestsMachineLearningModel.hxx.

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

Run-time type information (and related methods).

template<class TInputValue, class TTargetValue>
void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::operator= ( const Self )
privatedelete
template<class TInputValue , class TOutputValue >
void otb::RandomForestsMachineLearningModel< TInputValue, TOutputValue >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

PrintSelf method

Reimplemented from itk::Object.

Definition at line 303 of file otbRandomForestsMachineLearningModel.hxx.

template<class TInputValue , class TOutputValue >
void otb::RandomForestsMachineLearningModel< 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 206 of file otbRandomForestsMachineLearningModel.hxx.

template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetCalculateVariableImportance ( bool  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetComputeMargin ( bool  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetComputeSurrogateSplit ( bool  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetForestAccuracy ( float  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetMaxDepth ( int  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetMaxNumberOfCategories ( int  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetMaxNumberOfTrees ( int  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetMaxNumberOfVariables ( int  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetMinSampleCount ( int  _arg)
virtual
template<class TInputValue, class TTargetValue>
void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetPriors ( const std::vector< float > &  priors)
inline

Definition at line 106 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetRegressionAccuracy ( double  _arg)
virtual
template<class TInputValue, class TTargetValue>
virtual void otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::SetTerminationCriteria ( int  _arg)
virtual
template<class TInputValue , class TOutputValue >
void otb::RandomForestsMachineLearningModel< TInputValue, TOutputValue >::Train ( )
overridevirtual

Train the machine learning model

Implements otb::MachineLearningModel< TInputValue, TTargetValue >.

Definition at line 108 of file otbRandomForestsMachineLearningModel.hxx.

Member Data Documentation

template<class TInputValue, class TTargetValue>
bool otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_CalculateVariableImportance
private

If true then variable importance will be calculated and then it can be retrieved by CvRTreesWrapper::get_var_importance().

Definition at line 211 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
bool otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_ComputeMargin
private

Whether to compute margin (difference in probability between the 2 most voted classes) instead of confidence (probability of the most voted class) in prediction

Definition at line 234 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
bool otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_ComputeSurrogateSplit
private

Definition at line 175 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
float otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_ForestAccuracy
private

Sufficient accuracy (OOB error)

Definition at line 226 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_MaxDepth
private

The depth of the tree. A low value will likely underfit and conversely a high value will likely overfit. The optimal value can be obtained using cross validation or other suitable methods.

Definition at line 165 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_MaxNumberOfCategories
private

Cluster possible values of a categorical variable into $ K \leq MaxCategories $ clusters to find a suboptimal split. If a discrete variable, on which the training procedure tries to make a split, takes more than max_categories values, the precise best subset estimation may take a very long time because the algorithm is exponential. Instead, many decision trees engines (including ML) try to find sub-optimal split in this case by clustering all the samples into max categories clusters that is some categories are merged together. The clustering is applied only in n>2-class classification problems for categorical variables with N > max_categories possible values. In case of regression and 2-class classification the optimal split can be found efficiently without employing clustering, thus the parameter is not used in these cases.

Definition at line 191 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_MaxNumberOfTrees
private

The maximum number of trees in the forest (surprise, surprise). Typically the more trees you have the better the accuracy. However, the improvement in accuracy generally diminishes and asymptotes pass a certain number of trees. Also to keep in mind, the number of tree increases the prediction time linearly.

Definition at line 223 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_MaxNumberOfVariables
private

The size of the randomly selected subset of features at each tree node and that are used to find the best split(s). If you set it to 0 then the size will be set to the square root of the total number of features.

Definition at line 216 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_MinSampleCount
private

minimum samples required at a leaf node for it to be split. A reasonable value is a small percentage of the total data e.g. 1%.

Definition at line 169 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
std::vector<float> otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_Priors
private

The array of a priori class probabilities, sorted by the class label value. The parameter can be used to tune the decision tree preferences toward a certain class. For example, if you want to detect some rare anomaly occurrence, the training base will likely contain much more normal cases than anomalies, so a very good classification performance will be achieved just by considering every case as normal. To avoid this, the priors can be specified, where the anomaly probability is artificially increased (up to 0.5 or even greater), so the weight of the misclassified anomalies becomes much bigger, and the tree is adjusted properly. You can also think about this parameter as weights of prediction categories which determine relative weights that you give to misclassification. That is, if the weight of the first category is 1 and the weight of the second category is 10, then each mistake in predicting the second category is equivalent to making 10 mistakes in predicting the first category.

Definition at line 207 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
float otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_RegressionAccuracy
private

Termination criteria for regression trees. If all absolute differences between an estimated value in a node and values of train samples in this node are less than this parameter then the node will not be split

Definition at line 174 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
CvRTreesWrapper* otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_RFModel
private

Definition at line 160 of file otbRandomForestsMachineLearningModel.h.

template<class TInputValue, class TTargetValue>
int otb::RandomForestsMachineLearningModel< TInputValue, TTargetValue >::m_TerminationCriteria
private

The type of the termination criteria

Definition at line 229 of file otbRandomForestsMachineLearningModel.h.


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