From 237a8cc1eae3d0421fa144c603a0bb1604641ad9 Mon Sep 17 00:00:00 2001 From: Jordi Inglada <jordi.inglada@cesbio.cnes.fr> Date: Mon, 10 Oct 2016 08:37:16 +0200 Subject: [PATCH] ENH: move proba computation inside condition --- .../include/otbSharkRandomForestsMachineLearningModel.txx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx index 833ab6b457..0e0b08f3e2 100644 --- a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx @@ -158,10 +158,9 @@ SharkRandomForestsMachineLearningModel<TInputValue,TOutputValue> omp_set_num_threads(itk::MultiThreader::GetGlobalDefaultNumberOfThreads()); #endif - shark::Data<shark::RealVector> probas = m_RFModel(inputSamples); - if(quality != ITK_NULLPTR) { + shark::Data<shark::RealVector> probas = m_RFModel(inputSamples); unsigned int id = startIndex; for(shark::RealVector && p : probas.elements()) { -- GitLab