pastas.solver.least_squares.LeastSquares.objfunction#

pastas.solver.least_squares.LeastSquares.objfunction(p: pastas.typing.ArrayLike, noise: bool, weights: pandas.Series | None, initial: pastas.typing.ArrayLike, vary: pastas.typing.ArrayLike) pastas.typing.ArrayLike#

Objective function that is minimized by the least_squares solver.

Parameters:
  • p (array_like) – array_like object with the values as floats representing the model parameters.

  • noise (Boolean) – If True, minimizes the sum of squared noise computed by the NoiseModel.

  • weights (pandas.Series | None) – pandas Series by which the residual or noise series are multiplied. Typically values between 0 and 1.

  • initial (array_like) – array_like object with the initial parameter values.

  • vary (array_like) – array_like object with booleans indicating which parameters (p) are varied.

  • callback (ufunc) – function that is called after each iteration. the parameters are provided to the func.