Squared error (aka loss function) of x
with respect to data
,
as function of x
. Additional argument jacobian
is the Jacobian matrix of the (vector)
quantity of interest with respect to problem parameters. Such matrices are
computed by, e.g., solvers based on adjoint state method.
squared_error(x, data, jacobian = NULL)
x | numeric or complex vector, computed (simulated) data. |
---|---|
data | numeric or complex vector, observed data, must have the same
length as |
jacobian | numeric or complex matrix, can be |
List with one or two components:
value
numeric scalar;
gradient
numeric vector with length equal to ncol(jacobian)
, missing
if jacobian
is NULL
.