API documentation¶
The pypfilt
module provides top-level functions for running forecasts
and simulating observations from simulation models:
load_instances()
Iterate over scenario instances for each scenario.
forecast()
Generate forecasts at specific times for a single scenario.
fit()
Fit the simulation model to all of the available observations.
adaptive_fit()
Fit the simulation model to all of the available observations in a series of passes, where in each pass the observation models are refined.
simulate_from_model()
Simulate observations from the simulation model, according to each observation model.
It also contains a number of sub-modules. Some are intended for public use (see the key modules table), while others are likely of no use outside of pypfilt (see the secondary modules table).
Module |
Description |
---|---|
Provides model-fitting and forecasting functions |
|
Reads forecast scenarios from TOML files |
|
Defines the simulation model base class
|
|
Defines the observation model base class
|
|
Provides scalar and date-time simulation time scales |
|
Provides common summary statistics and records outputs |
|
Defines data structures for event handlers |
|
Provides functions for plotting summary statistics |
|
Reads data tables from text files |
|
Calculates CRPS scores for simulated observations |
|
Provides example models |
Module |
Description |
---|---|
Implements adaptive fitting methods |
|
Builds simulation contexts |
|
Implements the particle filter state cache |
|
The particle filter core: time-steps and adjusting particle weights |
|
Implements particle resampling and post-regularisation |
|
Construct sampling functions for each model parameter |
|
Creates the state history matrix |
|
Calculates weighted quantiles, credible intervals, etc |
Key modules