diff --git a/Modules/Applications/AppClassification/app/otbTrainVectorRegression.cxx b/Modules/Applications/AppClassification/app/otbTrainVectorRegression.cxx index ce07691cb99eda66f09e8cfaf026427a78037f22..27d47c509b0a48b0477925f99f5c7841bc11a53a 100644 --- a/Modules/Applications/AppClassification/app/otbTrainVectorRegression.cxx +++ b/Modules/Applications/AppClassification/app/otbTrainVectorRegression.cxx @@ -66,6 +66,13 @@ protected: SetOfficialDocLink(); Superclass::DoInit(); + + AddParameter( ParameterType_Float , "io.mse" , "Mean Square Error" ); + SetParameterDescription( "io.mse" , + "Mean square error computed with the validation predictors" ); + SetParameterRole( "io.mse" , Role_Output ); + this->MandatoryOff( "io.mse" ); + } void DoUpdateParameters() override @@ -105,6 +112,7 @@ protected: auto mse = ComputeMSE(m_ClassificationSamplesWithLabel.labeledListSample.GetPointer(), m_PredictedList.GetPointer() ); otbAppLogINFO("Mean Square Error = "<<mse); + this->SetParameterFloat("io.mse",mse); } private: