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
13 changes: 7 additions & 6 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NowcastAutoGP.jl is a **Julia package for forecasting with nowcasting** that com

### Main Pipeline (see `docs/vignettes/tutorial.qmd` for complete example)
1. **Transform Data**: `create_transformed_data(dates, values; transformation)` using `get_transformations()`
2. **Fit Base Model**: `make_and_fit_model(data)` on historical "confirmed" data
2. **Fit Base Model**: `make_and_fit_model(data; n_mcmc=200, n_hmc=50)` on historical "confirmed" data (`n_mcmc`/`n_hmc` are required pass-through kwargs of `AutoGP.fit_smc!`)
3. **Create Nowcasts**: Generate multiple `TData` objects representing uncertain recent data scenarios
4. **Forecast with Uncertainty**: `forecast_with_nowcasts()` temporarily adds each nowcast to model, generates forecasts, then removes it

Expand All @@ -40,14 +40,15 @@ NowcastAutoGP.jl is a **Julia package for forecasting with nowcasting** that com
```julia
# Standard pattern for fitting
model = make_and_fit_model(data;
n_particles=8, # SMC particles
smc_data_proportion=0.1, # Data proportion per SMC step
n_mcmc=200, # MCMC structure steps
n_hmc=50 # HMC parameter steps
n_particles=8, # SMC particles (forwarded to AutoGP.GPModel)
smc_data_proportion=0.1, # Data proportion per SMC step (wrapper-only; builds the schedule)
config=GPConfig(), # GP prior; pass a customised GPConfig() to change kernel structure / priors
n_mcmc=200, # forwarded to AutoGP.fit_smc! via kwargs...
n_hmc=50 # forwarded to AutoGP.fit_smc! via kwargs...
)
```

**Key Implementation Detail**: `effective_proportion = max(smc_data_proportion, 1.0/n_train)` prevents schedule step=0 errors with small datasets.
**Key Implementation Detail**: Only `n_particles`, `smc_data_proportion`, and `config` are named wrapper kwargs; everything else (`n_mcmc`, `n_hmc`, `hmc_config`, `biased`, `shuffle`, `verbose`, …) is passed straight through `kwargs...` to `AutoGP.fit_smc!` rather than re-declared here. `effective_proportion = max(smc_data_proportion, 1.0/n_train)` prevents schedule step=0 errors with small datasets.

## Forecasting with Nowcasts (`src/forecasting.jl`)

Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
AutoGP = "6eb593e7-dfb4-4e48-b98e-d7222cdf0053"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pages = [
"Getting Started" => "vignettes/getting-started.md",
"Tutorials" => [
"vignettes/use-percentages.md",
"vignettes/setting-priors.md",
],
"API Reference" => "api.md",
]
Expand Down
6 changes: 5 additions & 1 deletion docs/make_vignettes.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using Literate
vignettes_to_make = ["getting-started.jl", "use-percentages.jl"]
vignettes_to_make = [
"getting-started.jl",
"use-percentages.jl",
"setting-priors.jl",
]
Comment thread
SamuelBrand1 marked this conversation as resolved.

# Generate markdown with executed output from Literate.jl scripts.
# Uses CommonMarkFlavor so Documenter.jl won't re-evaluate code blocks.
Expand Down
Binary file added docs/src/vignettes/setting-priors-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/vignettes/setting-priors-21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/vignettes/setting-priors-25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading