Commit 74206c00 authored by Jordi Inglada's avatar Jordi Inglada

BUG: correct errors and warnings from dashboard

parent 1c5c8dc9
......@@ -130,7 +130,7 @@ protected:
~GradientBoostedTreeMachineLearningModel() override;
/** Predict values using the model */
TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override;
TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr, ProbaSampleType *proba=nullptr) const override;
/** PrintSelf method */
void PrintSelf(std::ostream& os, itk::Indent indent) const override;
......
......@@ -103,7 +103,7 @@ GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue>
itkExceptionMacro("Confidence index not available for this classifier !");
}
}
if (proba != nullptr && !m_ProbaIndex)
if (proba != nullptr && !this->m_ProbaIndex)
itkExceptionMacro("Probability per class not available for this classifier !");
return target;
......
......@@ -192,6 +192,10 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue>
else
(*quality) = m_RFModel->predict_confidence(sample);
}
if (proba != nullptr && !this->m_ProbaIndex)
itkExceptionMacro("Probability per class not available for this classifier !");
return target[0];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment