dfm-python 0.4.9__tar.gz → 0.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. dfm_python-0.5.1/PKG-INFO +416 -0
  2. dfm_python-0.5.1/README.md +360 -0
  3. dfm_python-0.5.1/lightning_logs/ddfm/version_0/checkpoints/ddfm-epoch=00-train_loss=0.7892.ckpt +0 -0
  4. dfm_python-0.5.1/lightning_logs/ddfm/version_0/metrics.csv +2 -0
  5. dfm_python-0.5.1/lightning_logs/ddfm/version_1/checkpoints/ddfm-epoch=00-train_loss=0.6617.ckpt +0 -0
  6. dfm_python-0.5.1/lightning_logs/ddfm/version_1/metrics.csv +2 -0
  7. dfm_python-0.5.1/lightning_logs/ddfm/version_10/checkpoints/ddfm-epoch=00-train_loss=0.7841.ckpt +0 -0
  8. dfm_python-0.5.1/lightning_logs/ddfm/version_10/metrics.csv +2 -0
  9. dfm_python-0.5.1/lightning_logs/ddfm/version_2/checkpoints/ddfm-epoch=00-train_loss=0.7447.ckpt +0 -0
  10. dfm_python-0.5.1/lightning_logs/ddfm/version_2/metrics.csv +2 -0
  11. dfm_python-0.5.1/lightning_logs/ddfm/version_3/checkpoints/ddfm-epoch=00-train_loss=0.7343.ckpt +0 -0
  12. dfm_python-0.5.1/lightning_logs/ddfm/version_3/metrics.csv +2 -0
  13. dfm_python-0.5.1/lightning_logs/ddfm/version_4/checkpoints/ddfm-epoch=00-train_loss=0.9361.ckpt +0 -0
  14. dfm_python-0.5.1/lightning_logs/ddfm/version_4/metrics.csv +2 -0
  15. dfm_python-0.5.1/lightning_logs/ddfm/version_5/checkpoints/ddfm-epoch=00-train_loss=0.6573.ckpt +0 -0
  16. dfm_python-0.5.1/lightning_logs/ddfm/version_5/metrics.csv +2 -0
  17. dfm_python-0.5.1/lightning_logs/ddfm/version_6/checkpoints/ddfm-epoch=00-train_loss=0.8632.ckpt +0 -0
  18. dfm_python-0.5.1/lightning_logs/ddfm/version_6/metrics.csv +2 -0
  19. dfm_python-0.5.1/lightning_logs/ddfm/version_7/checkpoints/ddfm-epoch=00-train_loss=0.9101.ckpt +0 -0
  20. dfm_python-0.5.1/lightning_logs/ddfm/version_7/metrics.csv +2 -0
  21. dfm_python-0.5.1/lightning_logs/ddfm/version_8/checkpoints/ddfm-epoch=00-train_loss=0.6250.ckpt +0 -0
  22. dfm_python-0.5.1/lightning_logs/ddfm/version_8/metrics.csv +2 -0
  23. dfm_python-0.5.1/lightning_logs/ddfm/version_9/checkpoints/ddfm-epoch=00-train_loss=0.6293.ckpt +0 -0
  24. dfm_python-0.5.1/lightning_logs/ddfm/version_9/metrics.csv +2 -0
  25. dfm_python-0.5.1/lightning_logs/dfm/version_0/metrics.csv +12 -0
  26. dfm_python-0.5.1/lightning_logs/dfm/version_1/metrics.csv +12 -0
  27. dfm_python-0.5.1/lightning_logs/dfm/version_10/metrics.csv +12 -0
  28. dfm_python-0.5.1/lightning_logs/dfm/version_100/metrics.csv +12 -0
  29. dfm_python-0.5.1/lightning_logs/dfm/version_101/metrics.csv +12 -0
  30. dfm_python-0.5.1/lightning_logs/dfm/version_102/metrics.csv +12 -0
  31. dfm_python-0.5.1/lightning_logs/dfm/version_103/metrics.csv +12 -0
  32. dfm_python-0.5.1/lightning_logs/dfm/version_104/metrics.csv +12 -0
  33. dfm_python-0.5.1/lightning_logs/dfm/version_106/metrics.csv +12 -0
  34. dfm_python-0.5.1/lightning_logs/dfm/version_107/metrics.csv +12 -0
  35. dfm_python-0.5.1/lightning_logs/dfm/version_108/metrics.csv +12 -0
  36. dfm_python-0.5.1/lightning_logs/dfm/version_109/metrics.csv +12 -0
  37. dfm_python-0.5.1/lightning_logs/dfm/version_11/metrics.csv +12 -0
  38. dfm_python-0.5.1/lightning_logs/dfm/version_110/metrics.csv +12 -0
  39. dfm_python-0.5.1/lightning_logs/dfm/version_111/metrics.csv +12 -0
  40. dfm_python-0.5.1/lightning_logs/dfm/version_112/metrics.csv +12 -0
  41. dfm_python-0.5.1/lightning_logs/dfm/version_113/metrics.csv +12 -0
  42. dfm_python-0.5.1/lightning_logs/dfm/version_114/metrics.csv +12 -0
  43. dfm_python-0.5.1/lightning_logs/dfm/version_115/metrics.csv +12 -0
  44. dfm_python-0.5.1/lightning_logs/dfm/version_116/metrics.csv +12 -0
  45. dfm_python-0.5.1/lightning_logs/dfm/version_118/metrics.csv +12 -0
  46. dfm_python-0.5.1/lightning_logs/dfm/version_119/metrics.csv +12 -0
  47. dfm_python-0.5.1/lightning_logs/dfm/version_12/metrics.csv +12 -0
  48. dfm_python-0.5.1/lightning_logs/dfm/version_120/metrics.csv +12 -0
  49. dfm_python-0.5.1/lightning_logs/dfm/version_121/metrics.csv +12 -0
  50. dfm_python-0.5.1/lightning_logs/dfm/version_122/metrics.csv +12 -0
  51. dfm_python-0.5.1/lightning_logs/dfm/version_123/metrics.csv +12 -0
  52. dfm_python-0.5.1/lightning_logs/dfm/version_124/metrics.csv +12 -0
  53. dfm_python-0.5.1/lightning_logs/dfm/version_125/metrics.csv +12 -0
  54. dfm_python-0.5.1/lightning_logs/dfm/version_126/metrics.csv +12 -0
  55. dfm_python-0.5.1/lightning_logs/dfm/version_127/metrics.csv +12 -0
  56. dfm_python-0.5.1/lightning_logs/dfm/version_128/metrics.csv +12 -0
  57. dfm_python-0.5.1/lightning_logs/dfm/version_13/metrics.csv +12 -0
  58. dfm_python-0.5.1/lightning_logs/dfm/version_130/metrics.csv +12 -0
  59. dfm_python-0.5.1/lightning_logs/dfm/version_131/metrics.csv +12 -0
  60. dfm_python-0.5.1/lightning_logs/dfm/version_132/metrics.csv +12 -0
  61. dfm_python-0.5.1/lightning_logs/dfm/version_133/metrics.csv +12 -0
  62. dfm_python-0.5.1/lightning_logs/dfm/version_134/metrics.csv +12 -0
  63. dfm_python-0.5.1/lightning_logs/dfm/version_135/metrics.csv +12 -0
  64. dfm_python-0.5.1/lightning_logs/dfm/version_136/metrics.csv +12 -0
  65. dfm_python-0.5.1/lightning_logs/dfm/version_137/metrics.csv +12 -0
  66. dfm_python-0.5.1/lightning_logs/dfm/version_138/metrics.csv +12 -0
  67. dfm_python-0.5.1/lightning_logs/dfm/version_139/metrics.csv +2 -0
  68. dfm_python-0.5.1/lightning_logs/dfm/version_14/metrics.csv +12 -0
  69. dfm_python-0.5.1/lightning_logs/dfm/version_140/metrics.csv +12 -0
  70. dfm_python-0.5.1/lightning_logs/dfm/version_141/metrics.csv +12 -0
  71. dfm_python-0.5.1/lightning_logs/dfm/version_142/metrics.csv +12 -0
  72. dfm_python-0.5.1/lightning_logs/dfm/version_143/metrics.csv +12 -0
  73. dfm_python-0.5.1/lightning_logs/dfm/version_144/metrics.csv +12 -0
  74. dfm_python-0.5.1/lightning_logs/dfm/version_146/metrics.csv +12 -0
  75. dfm_python-0.5.1/lightning_logs/dfm/version_147/metrics.csv +12 -0
  76. dfm_python-0.5.1/lightning_logs/dfm/version_148/metrics.csv +12 -0
  77. dfm_python-0.5.1/lightning_logs/dfm/version_149/metrics.csv +12 -0
  78. dfm_python-0.5.1/lightning_logs/dfm/version_15/metrics.csv +12 -0
  79. dfm_python-0.5.1/lightning_logs/dfm/version_150/metrics.csv +12 -0
  80. dfm_python-0.5.1/lightning_logs/dfm/version_151/metrics.csv +12 -0
  81. dfm_python-0.5.1/lightning_logs/dfm/version_152/metrics.csv +2 -0
  82. dfm_python-0.5.1/lightning_logs/dfm/version_153/metrics.csv +2 -0
  83. dfm_python-0.5.1/lightning_logs/dfm/version_154/metrics.csv +2 -0
  84. dfm_python-0.5.1/lightning_logs/dfm/version_155/metrics.csv +2 -0
  85. dfm_python-0.5.1/lightning_logs/dfm/version_156/metrics.csv +12 -0
  86. dfm_python-0.5.1/lightning_logs/dfm/version_157/metrics.csv +12 -0
  87. dfm_python-0.5.1/lightning_logs/dfm/version_158/metrics.csv +12 -0
  88. dfm_python-0.5.1/lightning_logs/dfm/version_159/metrics.csv +12 -0
  89. dfm_python-0.5.1/lightning_logs/dfm/version_16/metrics.csv +12 -0
  90. dfm_python-0.5.1/lightning_logs/dfm/version_160/metrics.csv +12 -0
  91. dfm_python-0.5.1/lightning_logs/dfm/version_162/metrics.csv +12 -0
  92. dfm_python-0.5.1/lightning_logs/dfm/version_163/metrics.csv +12 -0
  93. dfm_python-0.5.1/lightning_logs/dfm/version_164/metrics.csv +12 -0
  94. dfm_python-0.5.1/lightning_logs/dfm/version_165/metrics.csv +12 -0
  95. dfm_python-0.5.1/lightning_logs/dfm/version_166/metrics.csv +12 -0
  96. dfm_python-0.5.1/lightning_logs/dfm/version_167/metrics.csv +12 -0
  97. dfm_python-0.5.1/lightning_logs/dfm/version_17/metrics.csv +12 -0
  98. dfm_python-0.5.1/lightning_logs/dfm/version_19/metrics.csv +12 -0
  99. dfm_python-0.5.1/lightning_logs/dfm/version_2/metrics.csv +12 -0
  100. dfm_python-0.5.1/lightning_logs/dfm/version_20/metrics.csv +12 -0
  101. dfm_python-0.5.1/lightning_logs/dfm/version_21/metrics.csv +12 -0
  102. dfm_python-0.5.1/lightning_logs/dfm/version_22/metrics.csv +12 -0
  103. dfm_python-0.5.1/lightning_logs/dfm/version_23/metrics.csv +12 -0
  104. dfm_python-0.5.1/lightning_logs/dfm/version_24/metrics.csv +12 -0
  105. dfm_python-0.5.1/lightning_logs/dfm/version_25/metrics.csv +12 -0
  106. dfm_python-0.5.1/lightning_logs/dfm/version_26/metrics.csv +12 -0
  107. dfm_python-0.5.1/lightning_logs/dfm/version_27/metrics.csv +12 -0
  108. dfm_python-0.5.1/lightning_logs/dfm/version_28/metrics.csv +12 -0
  109. dfm_python-0.5.1/lightning_logs/dfm/version_29/metrics.csv +12 -0
  110. dfm_python-0.5.1/lightning_logs/dfm/version_3/metrics.csv +12 -0
  111. dfm_python-0.5.1/lightning_logs/dfm/version_30/metrics.csv +12 -0
  112. dfm_python-0.5.1/lightning_logs/dfm/version_32/metrics.csv +12 -0
  113. dfm_python-0.5.1/lightning_logs/dfm/version_33/metrics.csv +12 -0
  114. dfm_python-0.5.1/lightning_logs/dfm/version_34/metrics.csv +12 -0
  115. dfm_python-0.5.1/lightning_logs/dfm/version_35/metrics.csv +12 -0
  116. dfm_python-0.5.1/lightning_logs/dfm/version_36/metrics.csv +12 -0
  117. dfm_python-0.5.1/lightning_logs/dfm/version_37/metrics.csv +12 -0
  118. dfm_python-0.5.1/lightning_logs/dfm/version_38/metrics.csv +12 -0
  119. dfm_python-0.5.1/lightning_logs/dfm/version_39/metrics.csv +12 -0
  120. dfm_python-0.5.1/lightning_logs/dfm/version_4/metrics.csv +12 -0
  121. dfm_python-0.5.1/lightning_logs/dfm/version_40/metrics.csv +12 -0
  122. dfm_python-0.5.1/lightning_logs/dfm/version_41/metrics.csv +12 -0
  123. dfm_python-0.5.1/lightning_logs/dfm/version_42/metrics.csv +12 -0
  124. dfm_python-0.5.1/lightning_logs/dfm/version_44/metrics.csv +12 -0
  125. dfm_python-0.5.1/lightning_logs/dfm/version_45/metrics.csv +12 -0
  126. dfm_python-0.5.1/lightning_logs/dfm/version_46/metrics.csv +12 -0
  127. dfm_python-0.5.1/lightning_logs/dfm/version_47/metrics.csv +12 -0
  128. dfm_python-0.5.1/lightning_logs/dfm/version_48/metrics.csv +12 -0
  129. dfm_python-0.5.1/lightning_logs/dfm/version_49/metrics.csv +12 -0
  130. dfm_python-0.5.1/lightning_logs/dfm/version_50/metrics.csv +12 -0
  131. dfm_python-0.5.1/lightning_logs/dfm/version_51/metrics.csv +12 -0
  132. dfm_python-0.5.1/lightning_logs/dfm/version_52/metrics.csv +12 -0
  133. dfm_python-0.5.1/lightning_logs/dfm/version_53/metrics.csv +12 -0
  134. dfm_python-0.5.1/lightning_logs/dfm/version_54/metrics.csv +12 -0
  135. dfm_python-0.5.1/lightning_logs/dfm/version_55/metrics.csv +12 -0
  136. dfm_python-0.5.1/lightning_logs/dfm/version_57/metrics.csv +12 -0
  137. dfm_python-0.5.1/lightning_logs/dfm/version_58/metrics.csv +12 -0
  138. dfm_python-0.5.1/lightning_logs/dfm/version_59/metrics.csv +12 -0
  139. dfm_python-0.5.1/lightning_logs/dfm/version_6/metrics.csv +12 -0
  140. dfm_python-0.5.1/lightning_logs/dfm/version_60/metrics.csv +12 -0
  141. dfm_python-0.5.1/lightning_logs/dfm/version_61/metrics.csv +12 -0
  142. dfm_python-0.5.1/lightning_logs/dfm/version_62/metrics.csv +12 -0
  143. dfm_python-0.5.1/lightning_logs/dfm/version_63/metrics.csv +12 -0
  144. dfm_python-0.5.1/lightning_logs/dfm/version_64/metrics.csv +12 -0
  145. dfm_python-0.5.1/lightning_logs/dfm/version_65/metrics.csv +12 -0
  146. dfm_python-0.5.1/lightning_logs/dfm/version_66/metrics.csv +12 -0
  147. dfm_python-0.5.1/lightning_logs/dfm/version_67/metrics.csv +12 -0
  148. dfm_python-0.5.1/lightning_logs/dfm/version_69/metrics.csv +12 -0
  149. dfm_python-0.5.1/lightning_logs/dfm/version_7/metrics.csv +12 -0
  150. dfm_python-0.5.1/lightning_logs/dfm/version_70/metrics.csv +12 -0
  151. dfm_python-0.5.1/lightning_logs/dfm/version_71/metrics.csv +12 -0
  152. dfm_python-0.5.1/lightning_logs/dfm/version_72/metrics.csv +12 -0
  153. dfm_python-0.5.1/lightning_logs/dfm/version_73/metrics.csv +12 -0
  154. dfm_python-0.5.1/lightning_logs/dfm/version_74/metrics.csv +12 -0
  155. dfm_python-0.5.1/lightning_logs/dfm/version_75/metrics.csv +2 -0
  156. dfm_python-0.5.1/lightning_logs/dfm/version_76/metrics.csv +12 -0
  157. dfm_python-0.5.1/lightning_logs/dfm/version_77/metrics.csv +12 -0
  158. dfm_python-0.5.1/lightning_logs/dfm/version_78/metrics.csv +12 -0
  159. dfm_python-0.5.1/lightning_logs/dfm/version_79/metrics.csv +12 -0
  160. dfm_python-0.5.1/lightning_logs/dfm/version_8/metrics.csv +12 -0
  161. dfm_python-0.5.1/lightning_logs/dfm/version_80/metrics.csv +12 -0
  162. dfm_python-0.5.1/lightning_logs/dfm/version_82/metrics.csv +12 -0
  163. dfm_python-0.5.1/lightning_logs/dfm/version_83/metrics.csv +12 -0
  164. dfm_python-0.5.1/lightning_logs/dfm/version_84/metrics.csv +12 -0
  165. dfm_python-0.5.1/lightning_logs/dfm/version_85/metrics.csv +12 -0
  166. dfm_python-0.5.1/lightning_logs/dfm/version_86/metrics.csv +12 -0
  167. dfm_python-0.5.1/lightning_logs/dfm/version_87/metrics.csv +12 -0
  168. dfm_python-0.5.1/lightning_logs/dfm/version_88/metrics.csv +12 -0
  169. dfm_python-0.5.1/lightning_logs/dfm/version_89/metrics.csv +12 -0
  170. dfm_python-0.5.1/lightning_logs/dfm/version_9/metrics.csv +12 -0
  171. dfm_python-0.5.1/lightning_logs/dfm/version_90/metrics.csv +12 -0
  172. dfm_python-0.5.1/lightning_logs/dfm/version_91/metrics.csv +12 -0
  173. dfm_python-0.5.1/lightning_logs/dfm/version_92/metrics.csv +12 -0
  174. dfm_python-0.5.1/lightning_logs/dfm/version_94/metrics.csv +12 -0
  175. dfm_python-0.5.1/lightning_logs/dfm/version_95/metrics.csv +12 -0
  176. dfm_python-0.5.1/lightning_logs/dfm/version_96/metrics.csv +12 -0
  177. dfm_python-0.5.1/lightning_logs/dfm/version_97/metrics.csv +12 -0
  178. dfm_python-0.5.1/lightning_logs/dfm/version_98/metrics.csv +12 -0
  179. dfm_python-0.5.1/lightning_logs/dfm/version_99/metrics.csv +12 -0
  180. {dfm_python-0.4.9 → dfm_python-0.5.1}/pyproject.toml +1 -1
  181. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/__init__.py +1 -3
  182. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/config/results.py +55 -1
  183. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/config/schema.py +7 -2
  184. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/data/__init__.py +2 -0
  185. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/data/utils.py +1 -2
  186. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/lightning/data_module.py +49 -7
  187. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/models/base.py +246 -433
  188. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/models/ddfm.py +127 -408
  189. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/models/dfm.py +60 -195
  190. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/models/mcmc.py +32 -59
  191. dfm_python-0.5.1/src/dfm_python/models/utils.py +470 -0
  192. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/ssm/em.py +104 -135
  193. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/ssm/kalman.py +28 -45
  194. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/ssm/utils.py +2 -2
  195. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/utils/data.py +5 -0
  196. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/utils/helpers.py +1 -1
  197. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/utils/statespace.py +10 -7
  198. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_models.py +6 -4
  199. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_nowcast.py +44 -43
  200. dfm_python-0.5.1/src/test/test_nowcast_implementation.py +268 -0
  201. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_predict.py +25 -13
  202. dfm_python-0.5.1/test_update_manual.py +136 -0
  203. dfm_python-0.5.1/test_venv/bin/Activate.ps1 +247 -0
  204. dfm_python-0.5.1/test_venv/bin/activate +70 -0
  205. dfm_python-0.5.1/test_venv/bin/activate.csh +27 -0
  206. dfm_python-0.5.1/test_venv/bin/activate.fish +69 -0
  207. dfm_python-0.5.1/test_venv/bin/coverage +7 -0
  208. dfm_python-0.5.1/test_venv/bin/coverage-3.12 +7 -0
  209. dfm_python-0.5.1/test_venv/bin/coverage3 +7 -0
  210. dfm_python-0.5.1/test_venv/bin/docutils +7 -0
  211. dfm_python-0.5.1/test_venv/bin/f2py +7 -0
  212. dfm_python-0.5.1/test_venv/bin/fabric +7 -0
  213. dfm_python-0.5.1/test_venv/bin/isympy +7 -0
  214. dfm_python-0.5.1/test_venv/bin/keyring +7 -0
  215. dfm_python-0.5.1/test_venv/bin/markdown-it +7 -0
  216. dfm_python-0.5.1/test_venv/bin/normalizer +7 -0
  217. dfm_python-0.5.1/test_venv/bin/numpy-config +7 -0
  218. dfm_python-0.5.1/test_venv/bin/pip +8 -0
  219. dfm_python-0.5.1/test_venv/bin/pip3 +8 -0
  220. dfm_python-0.5.1/test_venv/bin/pip3.12 +8 -0
  221. dfm_python-0.5.1/test_venv/bin/py.test +7 -0
  222. dfm_python-0.5.1/test_venv/bin/pygmentize +7 -0
  223. dfm_python-0.5.1/test_venv/bin/pygrun +164 -0
  224. dfm_python-0.5.1/test_venv/bin/pyproject-build +7 -0
  225. dfm_python-0.5.1/test_venv/bin/pytest +7 -0
  226. dfm_python-0.5.1/test_venv/bin/python +1 -0
  227. dfm_python-0.5.1/test_venv/bin/python3 +1 -0
  228. dfm_python-0.5.1/test_venv/bin/python3.12 +1 -0
  229. dfm_python-0.5.1/test_venv/bin/rst2html +7 -0
  230. dfm_python-0.5.1/test_venv/bin/rst2html4 +7 -0
  231. dfm_python-0.5.1/test_venv/bin/rst2html5 +7 -0
  232. dfm_python-0.5.1/test_venv/bin/rst2latex +7 -0
  233. dfm_python-0.5.1/test_venv/bin/rst2man +7 -0
  234. dfm_python-0.5.1/test_venv/bin/rst2odt +7 -0
  235. dfm_python-0.5.1/test_venv/bin/rst2pseudoxml +7 -0
  236. dfm_python-0.5.1/test_venv/bin/rst2s5 +7 -0
  237. dfm_python-0.5.1/test_venv/bin/rst2xetex +7 -0
  238. dfm_python-0.5.1/test_venv/bin/rst2xml +7 -0
  239. dfm_python-0.5.1/test_venv/bin/torchfrtrace +7 -0
  240. dfm_python-0.5.1/test_venv/bin/torchrun +7 -0
  241. dfm_python-0.5.1/test_venv/bin/tqdm +7 -0
  242. dfm_python-0.5.1/test_venv/bin/twine +7 -0
  243. dfm_python-0.5.1/test_venv/bin/wheel +8 -0
  244. dfm_python-0.5.1/test_venv/pyvenv.cfg +5 -0
  245. dfm_python-0.5.1/test_venv/share/man/man1/isympy.1 +188 -0
  246. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_0/checkpoints/ddfm-epoch=00-train_loss=0.7024.ckpt +0 -0
  247. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_0/metrics.csv +2 -0
  248. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_1/checkpoints/ddfm-epoch=00-train_loss=0.8395.ckpt +0 -0
  249. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_1/metrics.csv +2 -0
  250. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_2/checkpoints/ddfm-epoch=00-train_loss=0.9328.ckpt +0 -0
  251. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_2/metrics.csv +2 -0
  252. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_3/checkpoints/ddfm-epoch=00-train_loss=0.7968.ckpt +0 -0
  253. dfm_python-0.5.1/tutorial/lightning_logs/ddfm/version_3/metrics.csv +2 -0
  254. dfm_python-0.5.1/tutorial/lightning_logs/dfm/version_0/metrics.csv +2 -0
  255. dfm_python-0.5.1/tutorial/lightning_logs/dfm/version_1/metrics.csv +2 -0
  256. dfm_python-0.5.1/tutorial/lightning_logs/dfm/version_2/metrics.csv +2 -0
  257. dfm_python-0.5.1/tutorial/lightning_logs/dfm/version_3/metrics.csv +2 -0
  258. dfm_python-0.5.1/tutorial/tutorial_finance_ddfm.py +324 -0
  259. dfm_python-0.4.9/tutorial/tutorial_finance.py → dfm_python-0.5.1/tutorial/tutorial_finance_dfm.py +105 -33
  260. dfm_python-0.5.1/tutorial/tutorial_macro_ddfm.py +346 -0
  261. dfm_python-0.4.9/tutorial/tutorial_macro.py → dfm_python-0.5.1/tutorial/tutorial_macro_dfm.py +133 -38
  262. dfm_python-0.4.9/PKG-INFO +0 -1198
  263. dfm_python-0.4.9/README.md +0 -1142
  264. dfm_python-0.4.9/lightning_logs/dfm/version_0/metrics.csv +0 -11
  265. dfm_python-0.4.9/lightning_logs/dfm/version_1/metrics.csv +0 -11
  266. dfm_python-0.4.9/lightning_logs/dfm/version_2/metrics.csv +0 -11
  267. dfm_python-0.4.9/lightning_logs/dfm/version_3/metrics.csv +0 -11
  268. dfm_python-0.4.9/lightning_logs/dfm/version_4/metrics.csv +0 -11
  269. dfm_python-0.4.9/lightning_logs/dfm/version_5/metrics.csv +0 -11
  270. dfm_python-0.4.9/src/dfm_python/models/utils.py +0 -577
  271. {dfm_python-0.4.9 → dfm_python-0.5.1}/.git +0 -0
  272. {dfm_python-0.4.9 → dfm_python-0.5.1}/.gitignore +0 -0
  273. {dfm_python-0.4.9 → dfm_python-0.5.1}/.python-version +0 -0
  274. {dfm_python-0.4.9 → dfm_python-0.5.1}/LICENSE +0 -0
  275. {dfm_python-0.4.9 → dfm_python-0.5.1}/MANIFEST.in +0 -0
  276. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/experiment/test_finance.yaml +0 -0
  277. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/experiment/test_macro.yaml +0 -0
  278. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/model/ddfm.yaml +0 -0
  279. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/model/dfm.yaml +0 -0
  280. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KO3YEARC.yaml +0 -0
  281. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBFDSAAF.yaml +0 -0
  282. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBFINAAF.yaml +0 -0
  283. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBFXSAAF.yaml +0 -0
  284. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSESI_R.yaml +0 -0
  285. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIBCEQ.yaml +0 -0
  286. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIBCOQ.yaml +0 -0
  287. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIBNER.yaml +0 -0
  288. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIBNMR.yaml +0 -0
  289. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIEMAR.yaml +0 -0
  290. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIHAPR.yaml +0 -0
  291. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIIMER.yaml +0 -0
  292. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIIMPR.yaml +0 -0
  293. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBSIXMER.yaml +0 -0
  294. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOBUSINVR.yaml +0 -0
  295. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCALL_.yaml +0 -0
  296. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCNFBUSR.yaml +0 -0
  297. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCNFCONR.yaml +0 -0
  298. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCNGOV_D.yaml +0 -0
  299. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCNPER_D.yaml +0 -0
  300. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCOBUSIR.yaml +0 -0
  301. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCONPMTH.yaml +0 -0
  302. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCONPRCF.yaml +0 -0
  303. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCONSTRP.yaml +0 -0
  304. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCPCOREF.yaml +0 -0
  305. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCPEXFEF.yaml +0 -0
  306. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCREU__A.yaml +0 -0
  307. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSECDMR.yaml +0 -0
  308. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSECEMR.yaml +0 -0
  309. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSEMEMR.yaml +0 -0
  310. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSEOHDR.yaml +0 -0
  311. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSEOHSR.yaml +0 -0
  312. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSHHEMR.yaml +0 -0
  313. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSHHLMR.yaml +0 -0
  314. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSMTTOA.yaml +0 -0
  315. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSPHIMR.yaml +0 -0
  316. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCSPSPMR.yaml +0 -0
  317. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOCYLEADR.yaml +0 -0
  318. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KODBLNEQA.yaml +0 -0
  319. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KODBLNHSA.yaml +0 -0
  320. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEMPCONF.yaml +0 -0
  321. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEMPMANF.yaml +0 -0
  322. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEMPTOTO.yaml +0 -0
  323. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEMPWREP.yaml +0 -0
  324. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEQUIMAE.yaml +0 -0
  325. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEQUIPTE.yaml +0 -0
  326. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEQUITTE.yaml +0 -0
  327. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEXCHINA.yaml +0 -0
  328. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEXNGS_D.yaml +0 -0
  329. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEXPGDSA.yaml +0 -0
  330. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOEXPPRCF.yaml +0 -0
  331. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOGCFCNSD.yaml +0 -0
  332. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOGCFFNVD.yaml +0 -0
  333. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOGDP___D.yaml +0 -0
  334. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOGFCF__D.yaml +0 -0
  335. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOHWRWEMP.yaml +0 -0
  336. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOIMNGS_D.yaml +0 -0
  337. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOIMPCONA.yaml +0 -0
  338. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOIMPGDDA.yaml +0 -0
  339. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOIMPGDSA.yaml +0 -0
  340. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOIMPPRCF.yaml +0 -0
  341. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOIPALL_G.yaml +0 -0
  342. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOIPMIMAG.yaml +0 -0
  343. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOLRLTCO.yaml +0 -0
  344. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOLRLTHH.yaml +0 -0
  345. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOMPCAPGG.yaml +0 -0
  346. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOMPCONDG.yaml +0 -0
  347. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOMPCONGG.yaml +0 -0
  348. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOMPCONNG.yaml +0 -0
  349. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOMPRI30G.yaml +0 -0
  350. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOMSCAPGG.yaml +0 -0
  351. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOMSCONGG.yaml +0 -0
  352. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KONETTRDF.yaml +0 -0
  353. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KONEWCONA.yaml +0 -0
  354. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOPICAPGG.yaml +0 -0
  355. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOPICONGG.yaml +0 -0
  356. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOPIMANUG.yaml +0 -0
  357. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOPOPACTE.yaml +0 -0
  358. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOPPSRM_F.yaml +0 -0
  359. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOPROPRCF.yaml +0 -0
  360. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOPSMANUG.yaml +0 -0
  361. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KORCNST.yaml +0 -0
  362. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KORELEC.yaml +0 -0
  363. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KORFBEV.yaml +0 -0
  364. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KORMACH.yaml +0 -0
  365. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KORMCMP.yaml +0 -0
  366. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOROCOINF.yaml +0 -0
  367. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KORWHLS.yaml +0 -0
  368. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOSHRPRCF.yaml +0 -0
  369. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOSIAHOTE.yaml +0 -0
  370. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOSIAI__E.yaml +0 -0
  371. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOSIARRLE.yaml +0 -0
  372. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOSIAWRTE.yaml +0 -0
  373. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOSSBFMBE.yaml +0 -0
  374. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOUN_TOTQ.yaml +0 -0
  375. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOUS____.yaml +0 -0
  376. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOVALCONA.yaml +0 -0
  377. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOWRCCNSE.yaml +0 -0
  378. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOWRCDURE.yaml +0 -0
  379. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOWRCNODE.yaml +0 -0
  380. {dfm_python-0.4.9 → dfm_python-0.5.1}/config/series/KOWRCSEME.yaml +0 -0
  381. {dfm_python-0.4.9 → dfm_python-0.5.1}/data/finance.csv +0 -0
  382. {dfm_python-0.4.9 → dfm_python-0.5.1}/data/macro.csv +0 -0
  383. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/config/__init__.py +0 -0
  384. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/config/adapter.py +0 -0
  385. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/config/utils.py +0 -0
  386. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/data/dataloader.py +0 -0
  387. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/data/dataset.py +0 -0
  388. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/encoder/__init__.py +0 -0
  389. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/encoder/base.py +0 -0
  390. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/encoder/pca.py +0 -0
  391. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/encoder/vae.py +0 -0
  392. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/lightning/__init__.py +0 -0
  393. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/lightning/scaling.py +0 -0
  394. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/logger/__init__.py +0 -0
  395. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/logger/inference_logger.py +0 -0
  396. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/logger/logger.py +0 -0
  397. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/logger/train_logger.py +0 -0
  398. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/models/__init__.py +0 -0
  399. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/ssm/__init__.py +0 -0
  400. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/trainer/__init__.py +0 -0
  401. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/trainer/ddfm.py +0 -0
  402. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/trainer/dfm.py +0 -0
  403. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/utils/__init__.py +0 -0
  404. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/utils/diagnostics.py +0 -0
  405. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/dfm_python/utils/time.py +0 -0
  406. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_config.py +0 -0
  407. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_helpers.py +0 -0
  408. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_logger.py +0 -0
  409. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_sktime_integration.py +0 -0
  410. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_ssm.py +0 -0
  411. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_trainer.py +0 -0
  412. {dfm_python-0.4.9 → dfm_python-0.5.1}/src/test/test_utils.py +0 -0
  413. {dfm_python-0.4.9 → dfm_python-0.5.1}/uv.lock +0 -0
@@ -0,0 +1,416 @@
1
+ Metadata-Version: 2.4
2
+ Name: dfm-python
3
+ Version: 0.5.1
4
+ Summary: Dynamic Factor Model (DFM) estimation and nowcasting in Python
5
+ Project-URL: Homepage, https://github.com/yourusername/dfm-python
6
+ Project-URL: Documentation, https://github.com/yourusername/dfm-python#readme
7
+ Project-URL: Repository, https://github.com/yourusername/dfm-python
8
+ Project-URL: Issues, https://github.com/yourusername/dfm-python/issues
9
+ Author: DFM Python Contributors
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: dfm,dynamic-factor-model,econometrics,forecasting,nowcasting,time-series
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: hydra-core>=1.3.2
23
+ Requires-Dist: matplotlib>=3.5.0
24
+ Requires-Dist: numpy>=1.24.0
25
+ Requires-Dist: pandas>=2.0.0
26
+ Requires-Dist: pyarrow>=22.0.0
27
+ Requires-Dist: pytorch-lightning>=2.0.0
28
+ Requires-Dist: scikit-learn>=1.7.2
29
+ Requires-Dist: scipy>=1.10.0
30
+ Requires-Dist: sktime>=0.40.1
31
+ Requires-Dist: torch>=2.0.0
32
+ Requires-Dist: twine>=6.2.0
33
+ Provides-Extra: all
34
+ Requires-Dist: hydra-core>=1.3.0; extra == 'all'
35
+ Requires-Dist: omegaconf>=2.3.0; extra == 'all'
36
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'all'
37
+ Requires-Dist: pytest>=7.0.0; extra == 'all'
38
+ Requires-Dist: scikit-learn>=1.0.0; extra == 'all'
39
+ Requires-Dist: sktime>=0.27.0; extra == 'all'
40
+ Requires-Dist: sqlalchemy>=2.0.0; extra == 'all'
41
+ Provides-Extra: db
42
+ Requires-Dist: sqlalchemy>=2.0.0; extra == 'db'
43
+ Provides-Extra: deep
44
+ Provides-Extra: dev
45
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
46
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
47
+ Requires-Dist: scikit-learn>=1.0.0; extra == 'dev'
48
+ Provides-Extra: forecasting
49
+ Requires-Dist: sktime[forecasting]>=0.40.1; extra == 'forecasting'
50
+ Provides-Extra: hydra
51
+ Requires-Dist: hydra-core>=1.3.0; extra == 'hydra'
52
+ Requires-Dist: omegaconf>=2.3.0; extra == 'hydra'
53
+ Provides-Extra: transform
54
+ Requires-Dist: sktime>=0.27.0; extra == 'transform'
55
+ Description-Content-Type: text/markdown
56
+
57
+ # dfm-python: Dynamic Factor Models for Python
58
+
59
+ [![PyPI version](https://img.shields.io/pypi/v/dfm-python.svg)](https://pypi.org/project/dfm-python/)
60
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
61
+
62
+ A comprehensive Python implementation of **Dynamic Factor Models (DFM)** and **Deep Dynamic Factor Models (DDFM)** for forecasting high-dimensional time series. Built with PyTorch Lightning for production-ready training and inference.
63
+
64
+ ## Features
65
+
66
+ ### Core Capabilities
67
+ - ✅ **Mixed-frequency data**: Monthly, quarterly, semi-annual, annual series in one model
68
+ - ✅ **Clock-based framework**: All factors evolve at a common clock frequency
69
+ - ✅ **Block structure**: Flexible factor organization (global + sector-specific factors)
70
+ - ✅ **Idiosyncratic components**: Per-series state augmentation for better fit
71
+ - ✅ **Preprocessed data**: Users handle preprocessing (imputation, scaling) using sktime or other tools
72
+ - ✅ **Forecasting**: Generate predictions for any horizon
73
+ - ✅ **Nowcasting**: Estimate current period values using incomplete data
74
+ - ✅ **Deep DFM (DDFM)**: Nonlinear encoder with PyTorch for capturing complex factor structures
75
+
76
+ ### Technical Features
77
+ - ✅ **PyTorch Lightning**: Standard training interface with DataModule and Trainer
78
+ - ✅ **Multiple configuration methods**: YAML files, Python dictionaries, or Hydra
79
+ - ✅ **Advanced numerical stability**: Adaptive regularization, spectral radius capping, variance floors
80
+ - ✅ **Production-ready**: Comprehensive error handling, extensive testing, well-documented
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install dfm-python
86
+ ```
87
+
88
+ **Requirements**:
89
+ - Python >= 3.10
90
+ - numpy >= 1.24.0
91
+ - pandas >= 2.0.0
92
+ - scipy >= 1.10.0
93
+ - pytorch-lightning >= 2.0.0
94
+ - torch >= 2.0.0
95
+ - sktime >= 0.40.1
96
+
97
+ ## Quick Start
98
+
99
+ ### Example 1: Linear DFM
100
+
101
+ ```python
102
+ from dfm_python import DFM, DFMDataModule, DFMTrainer
103
+ import pandas as pd
104
+ import numpy as np
105
+
106
+ # Load and preprocess data
107
+ df = pd.read_csv('data/macro.csv')
108
+ df_processed = df[[col for col in df.columns if col != 'date']]
109
+
110
+ # Create DataModule
111
+ dm = DFMDataModule(
112
+ config_path='config/model/dfm.yaml',
113
+ data=df_processed
114
+ )
115
+ dm.setup()
116
+
117
+ # Create model and load config
118
+ model = DFM()
119
+ model.load_config('config/model/dfm.yaml')
120
+
121
+ # Create trainer and fit
122
+ trainer = DFMTrainer(max_iter=10, threshold=1e-4)
123
+ trainer.fit(model, dm)
124
+
125
+ # Predict
126
+ Xf, Zf = model.predict(horizon=6)
127
+ ```
128
+
129
+ ### Example 2: Deep DFM (DDFM)
130
+
131
+ ```python
132
+ from dfm_python import DDFM, DFMDataModule, DDFMTrainer
133
+ import pandas as pd
134
+
135
+ # Load and preprocess data
136
+ df = pd.read_csv('data/finance.csv')
137
+ df_processed = df[[col for col in df.columns if col != 'date']]
138
+
139
+ # Create DataModule
140
+ dm = DFMDataModule(
141
+ config_path='config/model/ddfm.yaml',
142
+ data=df_processed
143
+ )
144
+ dm.setup()
145
+
146
+ # Create DDFM model
147
+ ddfm_model = DDFM(
148
+ encoder_layers=[64, 32],
149
+ num_factors=2,
150
+ learning_rate=0.005,
151
+ epochs=100
152
+ )
153
+ ddfm_model.load_config('config/model/ddfm.yaml')
154
+
155
+ # Create trainer and fit
156
+ trainer = DDFMTrainer(max_epochs=10)
157
+ trainer.fit(ddfm_model, dm)
158
+
159
+ # Predict
160
+ Xf, Zf = ddfm_model.predict(horizon=6)
161
+ ```
162
+
163
+ ### Example 3: Nowcasting with update().predict()
164
+
165
+ ```python
166
+ from dfm_python import DFM, DFMDataModule, DFMTrainer
167
+ import pandas as pd
168
+ import numpy as np
169
+
170
+ # Load data and train model (same as above)
171
+ df = pd.read_csv('data/macro.csv')
172
+ df_processed = df[[col for col in df.columns if col != 'date']]
173
+
174
+ dm = DFMDataModule(config_path='config/model/dfm.yaml', data=df_processed)
175
+ dm.setup()
176
+
177
+ model = DFM()
178
+ model.load_config('config/model/dfm.yaml')
179
+
180
+ trainer = DFMTrainer(max_iter=10, threshold=1e-4)
181
+ trainer.fit(model, dm)
182
+
183
+ # Get standardization parameters from trained model
184
+ result = model.result
185
+ Mx = result.Mx # Mean for standardization
186
+ Wx = result.Wx # Standard deviation for standardization
187
+
188
+ # Prepare new data (in practice, this would be real-time incomplete data)
189
+ # Standardize using the same parameters from training
190
+ X_new_raw = df_processed.iloc[-5:].values # Last 5 periods as example
191
+ X_new_std = (X_new_raw - Mx) / Wx
192
+
193
+ # Update model state with new standardized data, then predict
194
+ # Pattern: model.update(X_std).predict(horizon=1)
195
+ X_nowcast, Z_nowcast = model.update(X_new_std).predict(horizon=1)
196
+
197
+ # Extract nowcast for target series
198
+ target_idx = df_processed.columns.get_loc('KOEQUIPTE')
199
+ nowcast_value = X_nowcast[0, target_idx]
200
+
201
+ print(f"Nowcast value: {nowcast_value:.6f}")
202
+ ```
203
+
204
+ ## Configuration
205
+
206
+ ### YAML Configuration (Recommended)
207
+
208
+ Create a YAML configuration file:
209
+
210
+ ```yaml
211
+ # config/model/dfm.yaml
212
+ clock: m # Monthly clock frequency
213
+ blocks:
214
+ Block_Global:
215
+ factors: 2
216
+ ar_lag: 1
217
+ clock: m
218
+
219
+ series:
220
+ - series_id: KOEQUIPTE
221
+ frequency: m
222
+ transformation: lin
223
+ blocks: [1]
224
+ - series_id: KOGDP___D
225
+ frequency: q
226
+ transformation: lin
227
+ blocks: [1]
228
+
229
+ augment_idio: true
230
+ augment_idio_slow: true
231
+ ```
232
+
233
+ ### Python Configuration
234
+
235
+ ```python
236
+ from dfm_python.config import DFMConfig, SeriesConfig, BlockConfig
237
+
238
+ config = DFMConfig(
239
+ clock='m',
240
+ series=[
241
+ SeriesConfig(series_id='series1', frequency='m', transformation='lin', blocks=[1]),
242
+ SeriesConfig(series_id='series2', frequency='q', transformation='lin', blocks=[1]),
243
+ ],
244
+ blocks={'Block_Global': BlockConfig(factors=2, ar_lag=1, clock='m')},
245
+ augment_idio=True,
246
+ augment_idio_slow=True
247
+ )
248
+ ```
249
+
250
+ ## Data Format
251
+
252
+ ### CSV Format
253
+
254
+ Your data CSV should have:
255
+ - **First column**: `date` (YYYY-MM-DD format)
256
+ - **Subsequent columns**: One per time series, column names must match `series_id` in configuration
257
+ - **Missing values**: Empty cells or `NaN`
258
+
259
+ **Example**:
260
+ ```csv
261
+ date,KOEQUIPTE,KOGDP___D
262
+ 2000-01-01,100.2,
263
+ 2000-02-01,100.5,
264
+ 2000-03-01,100.8,100.5
265
+ 2000-04-01,101.0,
266
+ ```
267
+
268
+ **Important**:
269
+ - Data must be preprocessed before passing to the package
270
+ - Use sktime or other tools for imputation, scaling, and transformations
271
+ - Quarterly series should only have values at quarter-end months
272
+
273
+ ## Tutorials
274
+
275
+ The package includes tutorial scripts demonstrating complete workflows:
276
+
277
+ ```bash
278
+ # Linear DFM tutorial
279
+ python tutorial/tutorial_macro_dfm.py
280
+ python tutorial/tutorial_finance_dfm.py
281
+
282
+ # Deep DFM tutorial
283
+ python tutorial/tutorial_macro_ddfm.py
284
+ python tutorial/tutorial_finance_ddfm.py
285
+ ```
286
+
287
+ ## API Reference
288
+
289
+ ### Core Classes
290
+
291
+ - **`DFM`**: Linear Dynamic Factor Model (EM algorithm)
292
+ - **`DDFM`**: Deep Dynamic Factor Model (PyTorch encoder)
293
+ - **`DFMDataModule`**: PyTorch Lightning DataModule for data handling
294
+ - **`DFMTrainer`**: Trainer for DFM (EM algorithm)
295
+ - **`DDFMTrainer`**: Trainer for DDFM (gradient descent)
296
+
297
+ ### Key Methods
298
+
299
+ ```python
300
+ # Configuration
301
+ model.load_config(source) # Load from YAML, dict, or Hydra config
302
+
303
+ # Training
304
+ trainer.fit(model, datamodule) # Standard Lightning pattern
305
+
306
+ # Prediction
307
+ Xf, Zf = model.predict(horizon=6) # Forecast future values
308
+
309
+ # Nowcasting (update state with new data, then predict)
310
+ result = model.result
311
+ X_new_std = (X_new_raw - result.Mx) / result.Wx # Standardize new data
312
+ X_nowcast, Z_nowcast = model.update(X_new_std).predict(horizon=1) # Update and predict
313
+ ```
314
+
315
+ ### Result Objects
316
+
317
+ ```python
318
+ # DFMResult / DDFMResult
319
+ result.Z # (T+1 × m) Smoothed factor estimates
320
+ result.C # (N × m) Factor loadings matrix
321
+ result.A # (m × m) Factor transition matrix
322
+ result.Q # (m × m) Innovation covariance
323
+ result.R # (N × N) Observation covariance
324
+ result.converged # bool: Convergence status
325
+ result.num_iter # int: Number of iterations
326
+
327
+ # NowcastResult
328
+ result.nowcast_value # Estimated value
329
+ result.confidence_interval # Confidence interval
330
+ result.factors_at_view # Factor state at view date
331
+ ```
332
+
333
+ ## Architecture
334
+
335
+ ### Core Modules
336
+
337
+ - **`models/`**: Model implementations
338
+ - `base.py`: BaseFactorModel (common interface)
339
+ - `dfm.py`: Linear DFM (EM algorithm)
340
+ - `ddfm.py`: Deep DFM (PyTorch encoder)
341
+
342
+ - **`ssm/`**: State-space model components
343
+ - `kalman.py`: Kalman filter and smoother
344
+ - `em.py`: EM algorithm implementation
345
+
346
+ - **`config/`**: Configuration management
347
+ - `schema.py`: Configuration dataclasses
348
+ - `results.py`: Result dataclasses
349
+
350
+ - **`lightning/`**: PyTorch Lightning integration
351
+ - `data_module.py`: DFMDataModule
352
+ - `scaling.py`: Data scaling utilities
353
+
354
+ ## Testing
355
+
356
+ Run the test suite:
357
+
358
+ ```bash
359
+ pytest src/test/ -v
360
+ ```
361
+
362
+ Run specific tests:
363
+
364
+ ```bash
365
+ pytest src/test/test_nowcast_implementation.py -v
366
+ pytest src/test/test_models.py -v
367
+ pytest src/test/test_trainer.py -v
368
+ ```
369
+
370
+ ## Troubleshooting
371
+
372
+ ### Convergence Issues
373
+
374
+ - Increase `max_iter` in `DFMTrainer`
375
+ - Relax `threshold` (default: 1e-4)
376
+ - Check data quality and preprocessing
377
+
378
+ ### Numerical Instability
379
+
380
+ - The package includes automatic stability features:
381
+ - Adaptive regularization for ill-conditioned matrices
382
+ - Spectral radius capping (< 0.99) for stationarity
383
+ - Variance floors for all covariance matrices
384
+
385
+ ### Missing Data
386
+
387
+ - Preprocess data before passing to the package
388
+ - Use sktime for imputation and scaling
389
+ - Verify frequency settings match your data
390
+
391
+ ## Project Status
392
+
393
+ **Version**: 0.5.1
394
+ **Status**: Stable and production-ready
395
+ **Python**: 3.10+
396
+
397
+ ### What's New in 0.5.1
398
+
399
+ - ✨ **New `update()` method**: Replaces legacy `nowcast()` with flexible `update().predict()` pattern
400
+ - 🔧 **Improved API**: Users now control all preprocessing (masking, imputation, standardization)
401
+ - 🧹 **Code cleanup**: Removed legacy code and overengineering (~200+ lines removed)
402
+ - 🐛 **Bug fixes**: Fixed DDFM `update()` method for single-factor models
403
+ - 📚 **Updated tutorials**: All 4 tutorials rewritten with new pattern and VAR(1) configuration
404
+ - ✅ **VAR(1) only**: Simplified to VAR(1) factor dynamics throughout
405
+
406
+ ## License
407
+
408
+ MIT License
409
+
410
+ ## Contributing
411
+
412
+ Contributions are welcome! Please ensure:
413
+ - All tests pass: `pytest src/test/ -q`
414
+ - Code follows existing patterns and style
415
+ - New features include tests
416
+ - Documentation is updated