← Computational Mathematical Biology

Parameter fitting

Computational parameter fitting repeatedly evaluates a model while searching for parameter values that optimise a statistical objective.

Least-squares example

from scipy.optimize import least_squares

def residuals(theta):
    prediction = simulate(theta, t_data)
    return y_data - prediction

fit = least_squares(residuals, x0=[0.2, 0.1])

Constraints and transformations

Biological parameters such as rates may need to remain non-negative. Bounds or suitable parameter transformations can enforce meaningful ranges.

Checking the result

Optimisation success does not guarantee identifiability or a unique optimum. Residuals, alternative starting values and uncertainty should also be examined.

Key idea. Parameter fitting combines numerical model solution with optimisation, but statistical and biological checks remain essential after the optimiser stops.