We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bc80ad commit ea74979Copy full SHA for ea74979
src/Numerics/Optimization/NonlinearMinimizationResult.cs
@@ -57,7 +57,10 @@ void EvaluateCovariance(IObjectiveModel objective)
57
return;
58
}
59
60
- Covariance = Hessian.PseudoInverse() * objective.Value / objective.DegreeOfFreedom;
+ // The factor of 2.0 compensates for the 1/2 factor in the objective function definition
61
+ // F(p) = 1/2 * ∑{ Wi * (yi - f(xi; p))^2 }
62
+ // Without this compensation, the covariance and standard errors would be underestimated by a factor of 2
63
+ Covariance = 2.0 * Hessian.PseudoInverse() * objective.Value / objective.DegreeOfFreedom;
64
65
if (Covariance != null)
66
{
0 commit comments