Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[Installation Guide](https://pyautofit.readthedocs.io/en/latest/installation/overview.html) |
[PyAutoFit readthedocs](https://pyautofit.readthedocs.io/en/latest/index.html) |
[Browse Chapter 1 With Images](markdown/README.md) |
[autofit_workspace](https://github.com/PyAutoLabs/autofit_workspace)

<img src="https://github.com/Jammy2211/PyAutoLogo/blob/main/gifs/pyautofit.gif?raw=true" width="900" />
Expand Down
16 changes: 16 additions & 0 deletions config/build/markdown_examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Curated examples rendered to executed markdown pages (markdown/) with real
# output images, for GitHub browsing. Built by PyAutoBuild's generate_markdown.py
# (never TEST_MODE; features/ never rendered; order = execution + index order).
# Batch 2b: chapter_1_introduction (the intro lecture, in reading order).
- script: scripts/chapter_1_introduction/start_here.py
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_1_models.py
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_2_fitting_data.py
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_3_non_linear_search.py
max_minutes: 90
- script: scripts/chapter_1_introduction/tutorial_4_why_modeling_is_hard.py
max_minutes: 120
- script: scripts/chapter_1_introduction/tutorial_5_results_and_samples.py
max_minutes: 90
12 changes: 12 additions & 0 deletions markdown/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# HowToFit examples, executed — browse with output images

Every page below is the corresponding example script **fully executed**, rendered to markdown with its real output images, so you can read the examples on GitHub exactly as they run. Each page links back to the `.py` script and Jupyter notebook it was generated from.

- [HowToFit Lectures](chapter_1_introduction/start_here.md) — from `scripts/chapter_1_introduction/start_here.py`
- [Tutorial 1: Models](chapter_1_introduction/tutorial_1_models.md) — from `scripts/chapter_1_introduction/tutorial_1_models.py`
- [Tutorial 2: Fitting Data](chapter_1_introduction/tutorial_2_fitting_data.md) — from `scripts/chapter_1_introduction/tutorial_2_fitting_data.py`
- [Tutorial 3: Non Linear Search](chapter_1_introduction/tutorial_3_non_linear_search.md) — from `scripts/chapter_1_introduction/tutorial_3_non_linear_search.py`
- [Tutorial 4: Why Modeling Is Hard](chapter_1_introduction/tutorial_4_why_modeling_is_hard.md) — from `scripts/chapter_1_introduction/tutorial_4_why_modeling_is_hard.py`
- [Tutorial 5: Results And Samples](chapter_1_introduction/tutorial_5_results_and_samples.md) — from `scripts/chapter_1_introduction/tutorial_5_results_and_samples.py`

These pages are regenerated manually by PyAutoBuild's `generate_markdown.py` when a curated script changes.
62 changes: 62 additions & 0 deletions markdown/chapter_1_introduction/start_here.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
> ✏️ **This page is auto-generated from [`scripts/chapter_1_introduction/start_here.py`](../../scripts/chapter_1_introduction/start_here.py) — do not edit it directly.**
> It shows the example fully executed, with its real output images.
> Run it yourself via the [Python script](../../scripts/chapter_1_introduction/start_here.py) or the [Jupyter notebook](../../notebooks/chapter_1_introduction/start_here.ipynb).

HowToFit Lectures
=================

Welcome to the HowToFit Jupyter Notebook lectures!

At the core of data science is fitting a model to data. This process extracts meaningful patterns, relationships,
and insights, enabling accurate predictions, decision-making, and understanding of underlying processes.

However, data science can be quite challenging. With a vast array of statistical methods to choose from, it can be
difficult to determine the right one for your problem. Interpreting large volumes of results is complex, and managing big datasets requires significant computational power and sophisticated statistical methods.

The HowToFit lectures teach you how to perform effective data science analysis. Designed at an undergraduate level,
these lectures assume no prior knowledge of model-fitting, Bayesian statistics, or scientific analysis. They
introduce core concepts without formal statistical equations, aiming to provide an understanding of the
phenomenological methods used in data science. By the end of the lectures, you'll be equipped to perform your own
data analysis.

The lectures use the probabilistic programming language PyAutoFit, an open-source library for model-fitting,
scientific analysis, and big data analysis (https://github.com/PyAutoLabs/PyAutoFit).

The HowToFit lectures are composed of 3 chapters:

**Chapter 1: Introduction**: How to fit a model to data, perform statistical inference, and interpret the results
for scientific analysis.

**Chapter 2: Scientific Workflow**: Scaling model-fitting to big datasets while ensuring detailed scientific analysis
of the results.

**Chapter 3: Graphical Models**: Simultaneous model fitting of large datasets, scaling up to models with tens of
thousands of parameters.

After each chapter, it is advised that you apply what you've learned to your own model-fitting analysis based on
your scientific problem to build confidence in the techniques. Once confident, proceed to the next chapter.

__Chapter 1: Introduction__

The first chapter of the HowToFit lectures covers the basics of model-fitting, statistical inference, and scientific
interpretation. The chapter includes:

`tutorial_1_models.py`: What probabilistic models are and how to compose them using PyAutoFit.

`tutorial_2_fitting_data.py`: Fitting a model with an input set of parameters to data and quantifying the goodness of fit.

`tutorial_3_non_linear_search.py`: Searching non-linear parameter spaces to find the best-fit model.

`tutorial_4_why_modeling_is_hard.py`: Why modeling becomes difficult and how to over model-fitting problems.

`tutorial_5_results_and_samples.py`: Interpreting model-fit results and using the samples for scientific analysis.

An applied astronomy-focused example (previously tutorial 8) now lives in
`autofit_workspace_developer/scripts/howtofit/chapter_1_introduction/tutorial_8_astronomy_example.py`,
alongside the larger `projects/cosmology/` example. These depend on astronomy-specific datasets
that only live in the developer workspace.


```python

```
Loading
Loading