embcol.problem.Problem.cost

Problem.cost(params, *, return_jacobian=False, return_hessian=False)[source]

Evaluate a cost.

Parameters:
  • params (array-like of float) – Parameters.

  • return_jacobian (bool, optional) – If True is given, a Jacobian matrix is also returned.

  • return_hessian (bool, optional) – If True is given, a Hessian matrix is also returned.

Returns:

  • value (float) – Cost. The partial sum among color-fixed samples is excluded.

  • jacobian (numpy.ndarray of float) – Jacobian matrix. Returned only if return_jacobian is True. The shape is (M,), where M is the number of parameters.

  • hessian (numpy.ndarray of float) – Hessian matrix. Returned only if return_hessian is True. The shape is (M, M), where M is the number of parameters.