Example scripts and notebooks for fitting scientific models and performing Bayesian inference with PyAutoFit. Start with an introductory example, then explore the tools for your own models and data.
- Try it in your browser — run the introductory notebook on Google Colab without installing anything.
- Run it locally — follow the installation guide, then open
notebooks/overview/overview_1_the_basics.ipynb. - Browse examples with images — read worked examples and view their results directly on GitHub.
See Find Your Examples below to choose where to start.
The PyAutoFit AI Assistant helps you learn Bayesian inference, run examples and fit your own models through conversation. Visit its README for setup instructions and a starting prompt.
Examples are available as Python scripts in scripts/ and Jupyter notebooks in notebooks/.
| I want to… | Start here |
|---|---|
| Work through the basics of model fitting | Overview |
| Find recipes for using the API | Cookbooks |
| Explore advanced modeling techniques | Features |
| Try different sampling and optimisation methods | Searches |
| Visualise models and results | Plotting |
You’ll find sample data in dataset/; analysis results are written to output/.
HowToFit teaches Bayesian inference and model fitting through worked notebooks. Start here if you’re new to the subject or would like more explanation alongside the workspace examples.
You can also read the Markdown lectures directly on GitHub, or ask the PyAutoFit AI Assistant to guide you through them.
Ask questions, suggest improvements and share your work in PyAutoLabs Discussions, or chat with us on Slack.
To contribute examples or explore community projects, visit the PyAutoFit community page.
If you use PyAutoFit in your research, see the citation guide.
See the PyAutoFit license.