Tutorials¶
Learning Paths¶
Follow these progressive learning paths based on your experience level and goals.
Beginner Track¶
Perfect for those new to Diffid or optimisation:
-
Optimisation Basics
Learn scalar optimisation with the Rosenbrock function. Compare Nelder-Mead, CMA-ES, and Adam optimisers.
-
ODE Fitting with DiffSL
Fit a logistic growth model to data using DiffSL and Diffsol.
Intermediate Track¶
Building on the basics with real-world applications:
-
Parameter Uncertainty
Go from optimisation to MCMC sampling. Quantify parameter uncertainty with confidence intervals.
-
Model Comparison
Use Dynamic Nested Sampling to calculate model evidence and Bayes factors.
Advanced Track¶
Complex problems and advanced techniques:
-
Multi-Backend ODE Solving
Compare Diffsol, JAX/Diffrax, and Julia/DifferentialEquations.jl for predator-prey models.
Quick Reference¶
| Tutorial | Difficulty | Key Concepts | Prerequisites |
|---|---|---|---|
| Optimisation Basics | Beginner | ScalarBuilder, Optimisers | None |
| ODE Fitting | Beginner | DiffsolBuilder, DiffSL | Optimisation Basics |
| Parameter Uncertainty | Intermediate | MCMC, uncertainty | Optimisation Basics, ODE Fitting |
| Model Comparison | Intermediate | Nested sampling, evidence | Optimisation Basics, ODE Fitting, Parameter Uncertainty |
| Multi-Backend | Advanced | VectorBuilder, JAX, Julia | Optimisation Basics, ODE Fitting |
Running the Notebooks¶
Installation¶
Install Diffid with Jupyter and plotting support:
Clone and Run¶
# Clone the repository
git clone https://github.com/bradyplanden/diffid.git
cd diffid/docs/tutorials/notebooks
# Launch Jupyter
jupyter notebook
Alternative: Python Scripts¶
Prefer scripts to notebooks? Check out the examples directory:
python_problem.py- Basic scalar optimisationlogistic_growth.py- ODE fittingbouncy_ball.py/bouncy_ball_sampling.py- Optimisation and MCMCbicycle_model_evidence.py- Model comparisonpredator_prey/- Multi-backend comparisons
Contributing¶
Found an issue or want to improve a tutorial?
- Fork the repository
- Edit notebooks in
docs/tutorials/notebooks/ - Test your changes locally
- Submit a pull request
See the Contributing Guide for details.
Next Steps¶
After completing the tutorials:
-
In-depth guides on choosing and tuning algorithms
-
Complete API documentation
-
More applications and use cases
-
Source code and development