OTB
9.0.0
Orfeo Toolbox
|
#include <otbKNearestNeighborsMachineLearningModel.h>
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< Self > | Pointer |
typedef Superclass::ProbaSampleType | ProbaSampleType |
typedef KNearestNeighborsMachineLearningModel | 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< Self > | Pointer |
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 |
enum | { KNN_VOTING, KNN_MEAN, KNN_MEDIAN } |
static Pointer | New () |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
virtual int | GetK () |
virtual void | SetK (int _arg) |
virtual int | GetDecisionRule () |
virtual void | SetDecisionRule (int _arg) |
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::KNearest > | m_KNearestModel |
int | m_K |
int | m_DecisionRule |
bool | CanReadFile (const std::string &) override |
bool | CanWriteFile (const std::string &) override |
KNearestNeighborsMachineLearningModel () | |
~KNearestNeighborsMachineLearningModel () 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 |
KNearestNeighborsMachineLearningModel (const Self &)=delete | |
void | operator= (const Self &)=delete |
Definition at line 35 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::ConfidenceValueType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::ConfidenceValueType |
Definition at line 50 of file otbKNearestNeighborsMachineLearningModel.h.
typedef itk::SmartPointer<const Self> otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::ConstPointer |
Definition at line 42 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::InputListSampleType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::InputListSampleType |
Definition at line 46 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::InputSampleType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::InputSampleType |
Definition at line 45 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::InputValueType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::InputValueType |
Definition at line 44 of file otbKNearestNeighborsMachineLearningModel.h.
typedef itk::SmartPointer<Self> otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::Pointer |
Definition at line 41 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::ProbaSampleType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::ProbaSampleType |
Definition at line 51 of file otbKNearestNeighborsMachineLearningModel.h.
typedef KNearestNeighborsMachineLearningModel otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::Self |
Standard class typedefs.
Definition at line 39 of file otbKNearestNeighborsMachineLearningModel.h.
typedef MachineLearningModel<TInputValue, TTargetValue> otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::Superclass |
Definition at line 40 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::TargetListSampleType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::TargetListSampleType |
Definition at line 49 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::TargetSampleType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::TargetSampleType |
Definition at line 48 of file otbKNearestNeighborsMachineLearningModel.h.
typedef Superclass::TargetValueType otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::TargetValueType |
Definition at line 47 of file otbKNearestNeighborsMachineLearningModel.h.
anonymous enum |
Decision rule once the KNN are found : [for classification]
Enumerator | |
---|---|
KNN_VOTING | |
KNN_MEAN | |
KNN_MEDIAN |
Definition at line 72 of file otbKNearestNeighborsMachineLearningModel.h.
|
protected |
Constructor
Definition at line 36 of file otbKNearestNeighborsMachineLearningModel.hxx.
References otb::MachineLearningModel< TInputValue, TTargetValue >::m_ConfidenceIndex, and otb::MachineLearningModel< TInputValue, TTargetValue >::m_IsRegressionSupported.
|
overrideprotecteddefault |
Destructor
|
privatedelete |
Is the input model file readable and compatible with the corresponding classifier ?
|
overridevirtual |
Is the input model file readable and compatible with the corresponding classifier ?
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 257 of file otbKNearestNeighborsMachineLearningModel.hxx.
|
overridevirtual |
Is the input model file writable and compatible with the corresponding classifier ?
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 271 of file otbKNearestNeighborsMachineLearningModel.hxx.
virtual::itk::LightObject::Pointer otb::KNearestNeighborsMachineLearningModel< TInputValue, TTargetValue >::CreateAnother | ( | void | ) | const |
Decision rule once the KNN are found : [for classification]
|
overrideprotected |
Predict values using the model
Definition at line 84 of file otbKNearestNeighborsMachineLearningModel.hxx.
|
virtual |
Setters/Getters to the decision rule
|
virtual |
Setters/Getters to the number of neighbors to use Default is 32
|
virtual |
Decision rule once the KNN are found : [for classification]
|
overridevirtual |
Load the model from file
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 149 of file otbKNearestNeighborsMachineLearningModel.hxx.
|
static |
Run-time type information (and related methods).
|
privatedelete |
Is the input model file readable and compatible with the corresponding classifier ?
|
overrideprotected |
PrintSelf method
Definition at line 278 of file otbKNearestNeighborsMachineLearningModel.hxx.
|
overridevirtual |
Save the model to file
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 138 of file otbKNearestNeighborsMachineLearningModel.hxx.
|
virtual |
Decision rule once the KNN are found : [for classification]
|
virtual |
Decision rule once the KNN are found : [for classification]
|
overridevirtual |
Train the machine learning model
Implements otb::MachineLearningModel< TInputValue, TTargetValue >.
Definition at line 48 of file otbKNearestNeighborsMachineLearningModel.hxx.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 124 of file otbKNearestNeighborsMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 122 of file otbKNearestNeighborsMachineLearningModel.h.
|
private |
Is the input model file readable and compatible with the corresponding classifier ?
Definition at line 120 of file otbKNearestNeighborsMachineLearningModel.h.