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

BUG: Cfield is not mandatory in unsupervised mode

parent aaed0671
Branches
Tags
No related merge requests found
......@@ -66,7 +66,7 @@ private:
// Enforce the need of class field name in supervised mode
featuresInfo.SetClassFieldNames( GetChoiceNames( "cfield" ), GetSelectedItems( "cfield" ) );
if( featuresInfo.m_SelectedCFieldIdx.empty() )
if( featuresInfo.m_SelectedCFieldIdx.empty() && GetClassifierCategory() == Supervised)
{
otbAppLogFATAL( << "No field has been selected for data labelling!" );
}
......@@ -83,9 +83,11 @@ private:
}
else
{
ContingencyTable<ClassLabelType> table = ComputeContingencyTable(predictedList,classificationListSamples.labeledListSample);
WriteContingencyTable(table);
if(!featuresInfo.m_SelectedCFieldIdx.empty())
{
ContingencyTable<ClassLabelType> table = ComputeContingencyTable(predictedList,classificationListSamples.labeledListSample);
WriteContingencyTable(table);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment