Fitting, inference & optimization

Fit a model to empirical data, tune it into a regime, and infer parameter distributions.

Simulating a model is one thing; making it match data is another. This part of the specification covers three related but distinct jobs, and choosing between them is the first decision.

Fitting minimises a loss against a measurement, and gives you one parameter set. Tuning drives the model to a target regime with an algorithm rather than a loss, which is what FIC and E/I balance do. Inference estimates a distribution over parameters rather than a point, and tells you how well-determined each one actually is.

These workflows run on the tvboptim JAX backend, which is JIT-compiled, differentiable and GPU-capable. If you arrived wanting to know how TVB-O relates to tvboptim as a tool rather than as a backend, see coming from tvboptim.

What you declare

Worked examples

Each of these is a complete study rather than a snippet, and they live in Examples & Use-Cases:

Before you trust a fit

A converged optimiser is not the same as a good answer. Gradient stability & truncated BPTT explains why gradients through long chaotic trajectories explode and what truncation buys you. A fitted parameter set that sits on the edge of its search range has almost certainly been truncated rather than found, and Bifurcation & continuation tells you which dynamical regime the answer landed in.

Reference

Optimization · Inference · LossFunction · Algorithm.