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

BUG: Do not perform classification if no support vectors are available

parent 0580b2f0
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,11 @@ void
SVMClassifier< TSample, TLabel >
::GenerateData()
{
if(m_Model->GetNumberOfSupportVectors() == 0)
{
itkExceptionMacro(<<"SVM model does not contain any support vector, can not perform classification.");
}
m_Output->SetSample(this->GetSample());
otbMsgDevMacro( << "m_Output " << m_Output );
......
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