From f82169f2f926f2b25bd385ca0e9114264ef7c2db Mon Sep 17 00:00:00 2001 From: Michael BAUDIN Date: Sun, 25 Jun 2023 19:39:44 +0200 Subject: [PATCH] Fixed shadowed attribute. --- .../Uncertainty/Algorithm/MetaModel/MetaModelValidation.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/src/Uncertainty/Algorithm/MetaModel/MetaModelValidation.cxx b/lib/src/Uncertainty/Algorithm/MetaModel/MetaModelValidation.cxx index e7087a74b40..2079ceb114f 100644 --- a/lib/src/Uncertainty/Algorithm/MetaModel/MetaModelValidation.cxx +++ b/lib/src/Uncertainty/Algorithm/MetaModel/MetaModelValidation.cxx @@ -109,7 +109,7 @@ void MetaModelValidation::initialize() const // From this, it derives also the predictive factor i.e. 1 - RSS/SS, // RSS = Residual Sum of Squares, SS = Sum of Squares residual_ = outputSample_ - metaModelPredictions_; - const Point meanSquaredError_(residual_.computeRawMoment(2)); + meanSquaredError_ = residual_.computeRawMoment(2); r2Score_ = ComputeR2Score(meanSquaredError_, outputSample_); } @@ -231,9 +231,7 @@ void MetaModelValidation::load(Advocate & adv) adv.loadAttribute( "residual_", residual_ ); adv.loadAttribute( "r2Score_", r2Score_ ); if (adv.hasAttribute("meanSquaredError_")) - { adv.loadAttribute( "meanSquaredError_", meanSquaredError_ ); - } else { const UnsignedInteger outputDimension = outputSample_.getDimension(); @@ -242,9 +240,7 @@ void MetaModelValidation::load(Advocate & adv) << " but the dimension of the output sample is " << outputDimension; const Point sampleVariance(outputSample_.computeCentralMoment(2)); for (UnsignedInteger j = 0; j < outputDimension; ++ j) - { meanSquaredError_[j] = sampleVariance[j] * (1.0 - r2Score_[j]); - } } }