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 | CNSConstants, block_constants: SpringBlockConstants | InertialSpringBlockConstants, verbose: bool = False, retries: int = 3, seed: int = 42) Solution | None[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
ty0 (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
Falseretries (int) – The maximum number of inversion attempts. When the inversion fails to converge, it will retry up to
retriestimes with randomly perturbed initial parameters.seed (int) – Seed for the random number generator. This is only used when the initial inversion attempt fails, and the initial parameters are randomly perturbed before the next attempt.
- Returns:
sol – The inversion result, including various diagnostics. The inverted parameter values can be accessed as
sol.values- Return type:
optimistix.Solution