Commit c9befeed authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: added output MSE parameter

No related merge requests found
Showing with 8 additions and 0 deletions
+8 -0
...@@ -66,6 +66,13 @@ protected: ...@@ -66,6 +66,13 @@ protected:
SetOfficialDocLink(); SetOfficialDocLink();
Superclass::DoInit(); 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 void DoUpdateParameters() override
...@@ -105,6 +112,7 @@ protected: ...@@ -105,6 +112,7 @@ protected:
auto mse = ComputeMSE(m_ClassificationSamplesWithLabel.labeledListSample.GetPointer(), m_PredictedList.GetPointer() ); auto mse = ComputeMSE(m_ClassificationSamplesWithLabel.labeledListSample.GetPointer(), m_PredictedList.GetPointer() );
otbAppLogINFO("Mean Square Error = "<<mse); otbAppLogINFO("Mean Square Error = "<<mse);
this->SetParameterFloat("io.mse",mse);
} }
private: private:
......
Supports Markdown
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