Skip to content

Commit c7f9d5a

Browse files
andreacatejessegrabowskimartiningramMartin IngramricardoV94
authored
Dynamical Factor Models (DFM) Implementation (GSOC 2025) (#446)
* Added new file DFM.py for GSOC 2025 Dynamical Factor Models * Add initial notebook on custom DFM implementation * Update of DFM draft implementation In the notebook a comparison between the custom DFM and the implemented DFM (which has an hardcoded version of make_symbolic_graph, that work just in this case) * Aligning the order of vector state with statsmodel and updating the test * Added test_DFM_update_matches_statsmodels and small corrections to DFM.py * Updating test following test_ETS.py and small adjustment for exog variables in DFM.py * Added support for joint VAR modelling (error_var=True) * Adding a first implemntation of exogeneous variable support based on pymc_extras/statespace/models/structural/components/regression.py * Completing the implementation of exogeneous varibales support * Small adjustments and improvements in DFM.py * Small adjustments and improvements in DFM.py * Adjustments after Jesse review * Adjustments following Jesse suggestions and added tests for exog support * Added new DFM example notebook and deleted an old version of custom DFM example * Add tests for names/dims/coords * De-duplicate exogenous dim between DFM and SARIMAX * Small adjustments and refactoring after code review * Allow exogenous regressors in `BayesianVARMAX` (#567) * First pass on exogenous variables in VARMA * Adjust state names for API consistency * Allow exogenous variables in BayesianVARMAX * Eagerly simplify model where possible * Typo fix * Small adjustments in the tests after review * Harmonizing names for EXOG dimension between DFM and VARMAX * Corrections in the notebook and add a small comment in DFM.py * Add deterministic advi (#564) * Add first version of deterministic ADVI * Update API * Add a notebook example * Add to API and add a docstring * Change import in notebook * Add jax to dependencies * Add pytensor version * Fix handling of pymc model * Add (probably suboptimal) handling of the two backends * Add transformation * Follow Ricardo's advice to simplify the transformation step * Fix naming bug * Document and clean up * Fix example * Update pymc_extras/inference/deterministic_advi/dadvi.py Co-authored-by: Ricardo Vieira <[email protected]> * Respond to comments * Fix with pre commit checks * Update pymc_extras/inference/deterministic_advi/dadvi.py Co-authored-by: Jesse Grabowski <[email protected]> * Implement suggestions * Rename parameter because it's duplicated otherwise * Rename to be consistent in use of dadvi * Rename to `optimizer_method` and drop jac=True * Add jac=True back in since trust-ncg complained * Make hessp and jac optional * Harmonize naming with existing code * Fix example * Switch to `better_optimize` * Replace with pt.split --------- Co-authored-by: Martin Ingram <[email protected]> Co-authored-by: Ricardo Vieira <[email protected]> Co-authored-by: Jesse Grabowski <[email protected]> * Small adjustments in the notebook --------- Co-authored-by: jessegrabowski <[email protected]> Co-authored-by: Jesse Grabowski <[email protected]> Co-authored-by: Martin Ingram <[email protected]> Co-authored-by: Martin Ingram <[email protected]> Co-authored-by: Ricardo Vieira <[email protected]>
1 parent 24e18e8 commit c7f9d5a

File tree

6 files changed

+3697
-12
lines changed

6 files changed

+3697
-12
lines changed

notebooks/DFM_Example_(Coincident_Index).ipynb

Lines changed: 2107 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)