Skip to content
Snippets Groups Projects
Commit 27f02b66 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Giving access to probability estimates mode in libSVMMachineLearningModel...

ENH: Giving access to probability estimates mode in libSVMMachineLearningModel (patch kindly contributed by Adrien Gressin)
parent 0a9e7a92
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,9 @@ public:
itkGetMacro(ParameterOptimization, bool);
itkSetMacro(ParameterOptimization, bool);
itkGetMacro(DoProbabilityEstimates, bool);
itkSetMacro(DoProbabilityEstimates, bool);
// itkGetMacro(Epsilon, int);
// itkSetMacro(Epsilon, int);
......@@ -117,6 +120,7 @@ private:
int m_KernelType;
float m_C;
bool m_ParameterOptimization;
bool m_DoProbabilityEstimates;
typename SVMEstimatorType::Pointer m_SVMestimator;
};
} // end namespace otb
......
......@@ -39,6 +39,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
m_C = 1.0;
// m_Epsilon = 1e-6;
m_ParameterOptimization = false;
m_DoProbabilityEstimates = false;
m_SVMestimator = SVMEstimatorType::New();
}
......@@ -67,6 +68,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
m_SVMestimator->SetC(m_C);
m_SVMestimator->SetKernelType(m_KernelType);
m_SVMestimator->SetParametersOptimization(m_ParameterOptimization);
m_SVMestimator->DoProbabilityEstimates(m_DoProbabilityEstimates);
m_SVMestimator->SetInputSampleList(this->GetInputListSample());
m_SVMestimator->SetTrainingSampleList(this->GetTargetListSample());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment