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) – IfTrueis given, a Jacobian matrix is also returned.return_hessian (
bool, optional) – IfTrueis given, a Hessian matrix is also returned.
- Returns:
value (
float) – Cost. The partial sum among color-fixed samples is excluded.jacobian (
numpy.ndarrayoffloat) – Jacobian matrix. Returned only if return_jacobian isTrue. The shape is(M,), whereMis the number of parameters.hessian (
numpy.ndarrayoffloat) – Hessian matrix. Returned only if return_hessian isTrue. The shape is(M, M), whereMis the number of parameters.