From 608567b5bf2f089596fb5e5511d200bbee900289 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Wed, 5 Apr 2017 16:06:29 +0200 Subject: [PATCH] ENH: Fancy logging of contingency table --- .../AppClassification/app/otbTrainVectorClassifier.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx b/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx index 8dac6b78b9..30e399a84c 100644 --- a/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx @@ -99,6 +99,10 @@ private: ContigencyTableCalcutaltorType::Pointer contingencyTableCalculator = ContigencyTableCalcutaltorType::New(); contingencyTableCalculator->Compute(performanceLabeledListSample->Begin(), performanceLabeledListSample->End(),predictedListSample->Begin(), predictedListSample->End()); + + otbAppLogINFO( "Training performances:" ); + + otbAppLogINFO(<<"Contingency table: reference labels (rows) vs. produced labels (cols)\n"<<contingencyTableCalculator->GetContingencyTable()); return contingencyTableCalculator->GetContingencyTable(); } @@ -128,7 +132,7 @@ private: confMatCalc->SetProducedLabels( predictedListSample ); confMatCalc->Compute(); - otbAppLogINFO( "training performances" ); + otbAppLogINFO( "Training performances:" ); LogConfusionMatrix( confMatCalc ); for( unsigned int itClasses = 0; itClasses < confMatCalc->GetNumberOfClasses(); itClasses++ ) -- GitLab