Skip to content

User Guides

In-depth guides for making the most of Diffid's optimisation and sampling capabilities.

Algorithm Selection

  • Choosing an Optimiser


    Decision trees and guidelines for selecting the right optimisation algorithm.

    Choosing an Optimiser

  • Tuning Optimisers


    Parameter tuning strategies and troubleshooting for each algorithm.

    Tuning Guide

  • Choosing a Sampler


    When to use MCMC vs nested sampling for uncertainty quantification.

    Choosing a Sampler

Problem Configuration

  • Cost Metrics


    Understanding SSE, RMSE, and GaussianNLL for different use cases.

    Cost Metrics Guide

  • DiffSL Backend


    Choosing between dense and sparse solvers for ODE systems.

    DiffSL Backend Guide

  • Custom Solvers


    Integrating Diffrax, DifferentialEquations.jl, and other external solvers.

    Custom Solvers

Performance

  • Parallel Execution


    Thread safety, parallelisation strategies, and performance optimisation.

    Parallel Execution

Troubleshooting

Quick Reference

When to Use Each Component

Component Use Case
ScalarBuilder Direct function optimisation
DiffsolBuilder ODE fitting with DiffSL
VectorBuilder Custom solvers (JAX, Julia)
Nelder-Mead Local search, < 10 parameters
CMA-ES Global search, 10-100+ parameters
Adam Gradient-based, smooth objectives
SSE Standard least squares
RMSE Normalised error
GaussianNLL Bayesian inference

Typical Workflows

Simple Optimisation:

ScalarBuilder → optimise() → Result

ODE Fitting:

DiffsolBuilder → CMAES → Result → Visualise

Uncertainty Quantification:

DiffsolBuilder + GaussianNLL → Optimise → MCMC → Posterior

Model Comparison:

Multiple models + GaussianNLL → Nested Sampling → Evidence → Bayes factors

See Also