Gaussian Loss Function
Syntax
loss = curvefit.core.loss_fun.normal_loss(r)
r
is a numpy vector of normalized residual values. We use
for the length of the vector.
The elements of this vector can be float
or a_double
values.
Distribution
The Gaussian distribution is where is the mean and is the standard deviation.
Negative log
Taking the negative log of the distribution function we get where is constant w.r.t. .
loss
The return value loss
is a scalar equal to
where .