1111## Installation
1212
1313``` bash
14+ pip install dynaris
15+ # or
1416uv add dynaris
1517```
1618
19+ ## Documentation
20+
21+ Full documentation is available at [ dynaris.readthedocs.io] ( https://dynaris.readthedocs.io ) .
22+
1723## Quickstart
1824
1925``` python
20- from dynaris import LocalLevel, Seasonal, DLM
26+ from dynaris import LocalLevel, DLM
2127from dynaris.datasets import load_nile
2228
2329# Load data
2430y = load_nile()
2531
26- # Build a model by composing components
27- model = LocalLevel(sigma_level = 38.0 , sigma_obs = 123.0 ) + Seasonal(period = 12 )
28-
29- # Fit, smooth, forecast
30- dlm = DLM(model)
32+ # Build a local-level model and fit
33+ dlm = DLM(LocalLevel(sigma_level = 38.0 , sigma_obs = 123.0 ))
3134dlm.fit(y).smooth()
32- fc = dlm.forecast(steps = 12 )
3335
34- # Print summary
36+ # Forecast and plot
37+ fc = dlm.forecast(steps = 10 )
3538print (dlm.summary())
36-
37- # Single-figure overview
3839dlm.plot(kind = " panel" )
3940```
4041
@@ -43,7 +44,7 @@ dlm.plot(kind="panel")
4344Build models by combining components with ` + ` :
4445
4546``` python
46- from dynaris import LocalLinearTrend, Seasonal, Cycle, Autoregressive, Regression
47+ from dynaris import LocalLinearTrend, Seasonal, Cycle
4748
4849model = (
4950 LocalLinearTrend(sigma_level = 1.0 , sigma_slope = 0.1 )
@@ -80,26 +81,14 @@ print(f"Log-likelihood: {result.log_likelihood:.2f}")
8081
8182## Datasets
8283
83- ``` python
84- from dynaris.datasets import load_nile, load_airline, load_lynx, load_sunspots, load_temperature, load_gdp
85-
86- y = load_airline() # 144 monthly obs, 1949-1960
87- y = load_lynx() # 114 annual obs, 1821-1934 (~10-year cycle)
88- y = load_sunspots() # 288 annual obs, 1700-1987 (~11-year cycle)
89- y = load_temperature() # 144 annual obs, 1880-2023 (warming trend)
90- y = load_gdp() # 319 quarterly obs, 1947-2026 (business cycle)
91- ```
92-
93- ## Notation
94-
95- Dynaris follows the West & Harrison (1997) notation:
96-
97- | Symbol | Code | Meaning |
98- | --------| ------| ---------|
99- | ** G** | ` model.G ` / ` system_matrix ` | System (evolution) matrix |
100- | ** F** | ` model.F ` / ` observation_matrix ` | Observation (regression) matrix |
101- | ** W** | ` model.W ` / ` evolution_cov ` | Evolution covariance |
102- | ** V** | ` model.V ` / ` obs_cov ` | Observational variance |
84+ | Dataset | Loader | N | Frequency | Domain |
85+ | ---------| --------| ---| -----------| --------|
86+ | Nile river flow | ` load_nile() ` | 100 | Annual | Hydrology |
87+ | Airline passengers | ` load_airline() ` | 144 | Monthly | Transportation |
88+ | Lynx population | ` load_lynx() ` | 114 | Annual | Ecology |
89+ | Sunspot numbers | ` load_sunspots() ` | 288 | Annual | Astronomy |
90+ | Global temperature | ` load_temperature() ` | 144 | Annual | Climate |
91+ | US GDP growth | ` load_gdp() ` | 319 | Quarterly | Economics |
10392
10493## License
10594
0 commit comments