21 #ifndef otbKNearestNeighborsMachineLearningModel_h
22 #define otbKNearestNeighborsMachineLearningModel_h
26 #include "itkLightObject.h"
27 #include "itkFixedArray.h"
34 template <
class TInputValue,
class TTargetValue>
80 itkGetMacro(DecisionRule,
int);
81 itkSetMacro(DecisionRule,
int);
85 void Train()
override;
88 void Save(
const std::string& filename,
const std::string& name =
"")
override;
91 void Load(
const std::string& filename,
const std::string& name =
"")
override;
97 bool CanReadFile(
const std::string&)
override;
100 bool CanWriteFile(
const std::string&)
override;
114 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
128 #ifndef OTB_MANUAL_INSTANTIATION
Superclass::InputListSampleType InputListSampleType
KNearestNeighborsMachineLearningModel(const Self &)=delete
Superclass::ProbaSampleType ProbaSampleType
Superclass::TargetListSampleType TargetListSampleType
Superclass::InputValueType InputValueType
KNearestNeighborsMachineLearningModel Self
void operator=(const Self &)=delete
Superclass::ConfidenceValueType ConfidenceValueType
cv::Ptr< cv::ml::KNearest > m_KNearestModel
MachineLearningModel< TInputValue, TTargetValue > Superclass
itk::SmartPointer< const Self > ConstPointer
~KNearestNeighborsMachineLearningModel() override=default
Superclass::TargetSampleType TargetSampleType
itk::SmartPointer< Self > Pointer
Superclass::TargetValueType TargetValueType
Superclass::InputSampleType InputSampleType
MachineLearningModel is the base class for all classifier objects (SVM, KNN, Random Forests,...
MLMTargetTraits< TConfidenceValue >::ValueType ConfidenceValueType
itk::VariableLengthVector< double > ProbaSampleType
MLMSampleTraits< TInputValue >::SampleType InputSampleType
MLMTargetTraits< TTargetValue >::SampleType TargetSampleType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.