diff --git a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h index fc51f72bf969238dea8b05c60dfcaec274b9b0f0..a8baa08e58118980fff9deb9dd184e05d9ef2d0c 100644 --- a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h @@ -154,7 +154,7 @@ public: itkGetMacro(ParameterOptimization, bool); /** Do probability estimates */ - void DoProbabilityEstimates(bool prob) + void SetDoProbabilityEstimates(bool prob) { m_Parameters.probability = static_cast<int>(prob); } diff --git a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx index f2e3f4dcc485cdbe64e367641b926f1930bb6cbf..5890ae8ef52f587f6bf20b8314043fa03f4143ba 100644 --- a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx @@ -44,7 +44,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> this->SetC(1.0); this->SetEpsilon(1e-3); this->SetP(0.1); - this->DoProbabilityEstimates(false); + this->SetDoProbabilityEstimates(false); this->DoShrinking(true); this->SetCacheSize(40); // MB this->m_ParameterOptimization = false; @@ -355,7 +355,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> if (this->GetSVMType() == ONE_CLASS && this->GetDoProbabilityEstimates()) { otbMsgDebugMacro(<< "Disabling SVM probability estimates for ONE_CLASS SVM type."); - this->DoProbabilityEstimates(false); + this->SetDoProbabilityEstimates(false); } const char* error_msg = svm_check_parameter(&m_Problem, &m_Parameters); diff --git a/Modules/Learning/Supervised/test/0000209-SVMValidationLinearlySeparableProbEstimation.cxx b/Modules/Learning/Supervised/test/0000209-SVMValidationLinearlySeparableProbEstimation.cxx index f349f7e1f850384f88d573a8907ecba8ced75853..5394d793ed7b82d62cb7c3d7d231a5053c724c53 100644 --- a/Modules/Learning/Supervised/test/0000209-SVMValidationLinearlySeparableProbEstimation.cxx +++ b/Modules/Learning/Supervised/test/0000209-SVMValidationLinearlySeparableProbEstimation.cxx @@ -165,7 +165,7 @@ int main(int argc, char* argv[]) estimator->SetTrainingSampleList(trainingLabels); estimator->SetKernelType(kernel); - estimator->DoProbabilityEstimates(probEstimate); + estimator->SetDoProbabilityEstimates(probEstimate); // estimator->SetParametersOptimization(true); estimator->Update(); diff --git a/Modules/Radiometry/Simulation/test/otbAtmosphericCorrectionsRSRSVMClassifier.cxx b/Modules/Radiometry/Simulation/test/otbAtmosphericCorrectionsRSRSVMClassifier.cxx index 05aa064d2db15f0e29323918aff635efa38dd362..70bd23fb68614c46294fa3ae6dc369dc591638da 100644 --- a/Modules/Radiometry/Simulation/test/otbAtmosphericCorrectionsRSRSVMClassifier.cxx +++ b/Modules/Radiometry/Simulation/test/otbAtmosphericCorrectionsRSRSVMClassifier.cxx @@ -262,7 +262,7 @@ int otbAtmosphericCorrectionsRSRSVMClassifier(int argc, char * argv[]) SVMType::Pointer classifier = SVMType::New(); classifier->SetInputListSample(sampleList); classifier->SetTargetListSample(trainingList); - classifier->DoProbabilityEstimates(true); + classifier->SetDoProbabilityEstimates(true); classifier->Train(); classifier->Save("model.txt"); diff --git a/Modules/Radiometry/Simulation/test/otbReduceSpectralResponseSVMClassifier.cxx b/Modules/Radiometry/Simulation/test/otbReduceSpectralResponseSVMClassifier.cxx index 75fd0149c4462bc2f1aba1f245da3b8f39b96778..71e0d85cd87830607f827888936db294044846d8 100644 --- a/Modules/Radiometry/Simulation/test/otbReduceSpectralResponseSVMClassifier.cxx +++ b/Modules/Radiometry/Simulation/test/otbReduceSpectralResponseSVMClassifier.cxx @@ -180,7 +180,7 @@ int otbReduceSpectralResponseSVMClassifier(int argc, char * argv[]) model->SetC(1); model->SetEpsilon(0.001); model->SetP(0.1); - model->DoProbabilityEstimates(true); + model->SetDoProbabilityEstimates(true); model->Train(); model->Save("model.txt");