Skip to content

Commit

Permalink
Fixed shadowed attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudin47 committed Jun 25, 2023
1 parent d60506c commit f82169f
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
}

Expand Down Expand Up @@ -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();
Expand All @@ -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]);
}
}
}

Expand Down

0 comments on commit f82169f

Please sign in to comment.