diabayes.solver.ODESolver.max_likelihood_inversion#

ODESolver.max_likelihood_inversion(t: Float[Array, 'Nt'], mu: Float[Array, 'Nt'], y0: Variables, params: RSFParams | CNSParams, friction_constants: RSFConstants, block_constants: SpringBlockConstants | InertialSpringBlockConstants, verbose: bool = False) Solution[source]#

Minimises the least-squares residuals between the observed friction curve and the parameterised one, using the Levenberg-Marquardt algorithm.

Parameters:
  • t (Array) – A vector or time values (in units of seconds). The time steps do not need to be uniform

  • mu (Array) – The observed friction curve sampled at t

  • y0 (Variables) – The initial values for the modelled friction and any state variables

  • params (_Params) – The initial guess for the invertible parameters that characterise the forward problem. These need to be sufficiently close to the “true” values for the algorithm to converge

  • friction_constants (_Constants) – The non-invertible constants that characterise the forward problem

  • block_constants (_BlockConstants) – The stress transfer constants (e.g. stiffness and loading rate)

  • verbose (bool) – Whether or not to output detailed progress of the inversion. Defaults to False

Returns:

sol – The inversion result, including various diagnostics. The inverted parameter values can be accessed as sol.values

Return type:

optimistix.Solution

Notes

If an error is produced in the first iteration step, it is quite possible that the initial guess parameters were too far off from the “true” values (i.e., the mismatch between the observed and modelled friction curves is too large), breaking the Gauss-Newton step of the Levenberg-Marquardt algorithm. Initial manual tuning is recommended.