dfm-python 0.5.55__tar.gz → 0.5.57__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 (252) hide show
  1. {dfm_python-0.5.55 → dfm_python-0.5.57}/PKG-INFO +4 -5
  2. {dfm_python-0.5.55 → dfm_python-0.5.57}/README.md +3 -3
  3. dfm_python-0.5.57/config/ddfm_exchange.yaml +38 -0
  4. dfm_python-0.5.57/config/ddfm_finance.yaml +31 -0
  5. dfm_python-0.5.57/config/ddfm_macro.yaml +55 -0
  6. {dfm_python-0.5.55 → dfm_python-0.5.57}/config/dfm_macro.yaml +24 -22
  7. dfm_python-0.5.57/data/exchange_rate.csv +7589 -0
  8. {dfm_python-0.5.55 → dfm_python-0.5.57}/pyproject.toml +2 -1
  9. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/__init__.py +19 -49
  10. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/__init__.py +7 -12
  11. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/adapter.py +63 -7
  12. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/constants.py +149 -10
  13. dfm_python-0.5.57/src/dfm_python/config/schema/__init__.py +19 -0
  14. dfm_python-0.5.57/src/dfm_python/config/schema/block.py +122 -0
  15. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/schema/model.py +40 -11
  16. dfm_python-0.5.57/src/dfm_python/config/schema/params.py +279 -0
  17. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/schema/results.py +121 -92
  18. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/types.py +57 -28
  19. dfm_python-0.5.57/src/dfm_python/dataset/__init__.py +21 -0
  20. dfm_python-0.5.57/src/dfm_python/dataset/ddfm_dataset.py +393 -0
  21. dfm_python-0.5.55/src/dfm_python/datamodule/dfm_dm.py → dfm_python-0.5.57/src/dfm_python/dataset/dfm_dataset.py +263 -92
  22. dfm_python-0.5.57/src/dfm_python/dataset/time.py +97 -0
  23. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/decoder/__init__.py +3 -1
  24. dfm_python-0.5.57/src/dfm_python/decoder/base.py +78 -0
  25. dfm_python-0.5.57/src/dfm_python/decoder/linear.py +72 -0
  26. dfm_python-0.5.57/src/dfm_python/decoder/mlp.py +128 -0
  27. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/encoder/__init__.py +9 -9
  28. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/encoder/pca.py +6 -5
  29. dfm_python-0.5.57/src/dfm_python/encoder/simple_autoencoder.py +292 -0
  30. dfm_python-0.5.57/src/dfm_python/functional/__init__.py +11 -0
  31. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/functional/dfm_block.py +65 -14
  32. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/functional/em.py +580 -223
  33. dfm_python-0.5.57/src/dfm_python/logger/__init__.py +63 -0
  34. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/logger/inference_logger.py +41 -29
  35. dfm_python-0.5.57/src/dfm_python/logger/logger.py +271 -0
  36. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/logger/train_logger.py +81 -68
  37. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/models/__init__.py +2 -10
  38. dfm_python-0.5.57/src/dfm_python/models/base.py +292 -0
  39. dfm_python-0.5.57/src/dfm_python/models/ddfm.py +982 -0
  40. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/models/dfm.py +576 -384
  41. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/estimator.py +281 -52
  42. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/stability.py +133 -167
  43. dfm_python-0.5.57/src/dfm_python/numeric/statistic.py +353 -0
  44. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/tent.py +16 -6
  45. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/validator.py +159 -8
  46. dfm_python-0.5.57/src/dfm_python/ssm/__init__.py +29 -0
  47. dfm_python-0.5.57/src/dfm_python/ssm/kalman.py +564 -0
  48. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/__init__.py +20 -38
  49. dfm_python-0.5.57/src/dfm_python/utils/checkpoint.py +295 -0
  50. dfm_python-0.5.57/src/dfm_python/utils/helper.py +110 -0
  51. dfm_python-0.5.57/src/dfm_python/utils/loss.py +100 -0
  52. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/misc.py +73 -150
  53. dfm_python-0.5.57/src/dfm_python/utils/validation.py +54 -0
  54. dfm_python-0.5.57/src/test/config/schema/test_model.py +61 -0
  55. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/schema/test_results.py +41 -92
  56. dfm_python-0.5.57/src/test/config/test_adapter.py +231 -0
  57. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/test_constants.py +102 -13
  58. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/test_types.py +6 -23
  59. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/conftest.py +13 -4
  60. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/dataset/test_dataloader.py +9 -4
  61. dfm_python-0.5.57/src/test/dataset/test_dataset.py +69 -0
  62. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/dataset/test_process.py +44 -40
  63. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/decoder/test_linear.py +6 -6
  64. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/test_base.py +0 -1
  65. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/test_simple_encoder.py +34 -57
  66. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/functional/test_dfm_block.py +17 -20
  67. dfm_python-0.5.57/src/test/functional/test_em.py +878 -0
  68. dfm_python-0.5.57/src/test/logger/test_inference_logger.py +17 -0
  69. dfm_python-0.5.57/src/test/logger/test_logger.py +146 -0
  70. dfm_python-0.5.57/src/test/logger/test_train_logger.py +18 -0
  71. dfm_python-0.5.57/src/test/models/test_base.py +161 -0
  72. dfm_python-0.5.57/src/test/models/test_ddfm.py +488 -0
  73. dfm_python-0.5.57/src/test/models/test_ddfm_batchnorm_placement.py +179 -0
  74. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/models/test_dfm.py +104 -26
  75. dfm_python-0.5.57/src/test/models/test_tensorflow_batchnorm_comparison.py +266 -0
  76. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_builder.py +2 -1
  77. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_estimator.py +4 -3
  78. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_stability.py +54 -52
  79. dfm_python-0.5.57/src/test/numeric/test_tent.py +135 -0
  80. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_common.py +142 -5
  81. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_helper.py +3 -32
  82. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_metric.py +11 -1
  83. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_misc.py +6 -6
  84. dfm_python-0.5.57/src/test/utils/test_tensor_utils.py +57 -0
  85. dfm_python-0.5.57/tutorial/tutorial_exchange_ddfm.py +330 -0
  86. {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_finance_ddfm.py +74 -52
  87. {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_finance_dfm.py +17 -18
  88. dfm_python-0.5.57/tutorial/tutorial_illness_ddfm.py +284 -0
  89. {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_macro_ddfm.py +58 -39
  90. {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_macro_dfm.py +20 -20
  91. {dfm_python-0.5.55 → dfm_python-0.5.57}/uv.lock +1 -1
  92. dfm_python-0.5.55/LICENSE +0 -21
  93. dfm_python-0.5.55/config/ddfm_finance.yaml +0 -35
  94. dfm_python-0.5.55/config/ddfm_macro.yaml +0 -63
  95. dfm_python-0.5.55/lightning_logs/ddfm/version_10/checkpoints/ddfm-epoch=00-train_loss=0.6495.ckpt +0 -0
  96. dfm_python-0.5.55/lightning_logs/ddfm/version_10/metrics.csv +0 -2
  97. dfm_python-0.5.55/lightning_logs/ddfm/version_11/checkpoints/ddfm-epoch=00-train_loss=0.8428.ckpt +0 -0
  98. dfm_python-0.5.55/lightning_logs/ddfm/version_11/metrics.csv +0 -2
  99. dfm_python-0.5.55/lightning_logs/ddfm/version_12/checkpoints/ddfm-epoch=00-train_loss=0.8959.ckpt +0 -0
  100. dfm_python-0.5.55/lightning_logs/ddfm/version_12/metrics.csv +0 -2
  101. dfm_python-0.5.55/lightning_logs/ddfm/version_13/checkpoints/ddfm-epoch=00-train_loss=0.7644.ckpt +0 -0
  102. dfm_python-0.5.55/lightning_logs/ddfm/version_13/metrics.csv +0 -2
  103. dfm_python-0.5.55/lightning_logs/ddfm/version_14/checkpoints/ddfm-epoch=00-train_loss=0.7935.ckpt +0 -0
  104. dfm_python-0.5.55/lightning_logs/ddfm/version_14/metrics.csv +0 -2
  105. dfm_python-0.5.55/lightning_logs/ddfm/version_15/checkpoints/ddfm-epoch=00-train_loss=0.6240.ckpt +0 -0
  106. dfm_python-0.5.55/lightning_logs/ddfm/version_15/metrics.csv +0 -2
  107. dfm_python-0.5.55/lightning_logs/ddfm/version_16/checkpoints/ddfm-epoch=00-train_loss=0.9689.ckpt +0 -0
  108. dfm_python-0.5.55/lightning_logs/ddfm/version_16/metrics.csv +0 -2
  109. dfm_python-0.5.55/lightning_logs/ddfm/version_17/checkpoints/ddfm-epoch=00-train_loss=0.9336.ckpt +0 -0
  110. dfm_python-0.5.55/lightning_logs/ddfm/version_17/metrics.csv +0 -2
  111. dfm_python-0.5.55/lightning_logs/ddfm/version_18/checkpoints/ddfm-epoch=00-train_loss=0.8481.ckpt +0 -0
  112. dfm_python-0.5.55/lightning_logs/ddfm/version_18/metrics.csv +0 -2
  113. dfm_python-0.5.55/lightning_logs/ddfm/version_19/checkpoints/ddfm-epoch=00-train_loss=0.6991.ckpt +0 -0
  114. dfm_python-0.5.55/lightning_logs/ddfm/version_19/metrics.csv +0 -2
  115. dfm_python-0.5.55/lightning_logs/ddfm/version_20/checkpoints/ddfm-epoch=00-train_loss=0.9289.ckpt +0 -0
  116. dfm_python-0.5.55/lightning_logs/ddfm/version_20/metrics.csv +0 -2
  117. dfm_python-0.5.55/lightning_logs/ddfm/version_21/checkpoints/ddfm-epoch=00-train_loss=0.8253.ckpt +0 -0
  118. dfm_python-0.5.55/lightning_logs/ddfm/version_21/metrics.csv +0 -2
  119. dfm_python-0.5.55/lightning_logs/ddfm/version_22/checkpoints/ddfm-epoch=00-train_loss=0.8933.ckpt +0 -0
  120. dfm_python-0.5.55/lightning_logs/ddfm/version_22/metrics.csv +0 -2
  121. dfm_python-0.5.55/lightning_logs/ddfm/version_5/checkpoints/ddfm-epoch=00-train_loss=0.8292.ckpt +0 -0
  122. dfm_python-0.5.55/lightning_logs/ddfm/version_5/metrics.csv +0 -2
  123. dfm_python-0.5.55/lightning_logs/ddfm/version_7/checkpoints/ddfm-epoch=00-train_loss=0.8216.ckpt +0 -0
  124. dfm_python-0.5.55/lightning_logs/ddfm/version_7/metrics.csv +0 -2
  125. dfm_python-0.5.55/lightning_logs/ddfm/version_8/checkpoints/ddfm-epoch=00-train_loss=0.6088.ckpt +0 -0
  126. dfm_python-0.5.55/lightning_logs/ddfm/version_8/metrics.csv +0 -2
  127. dfm_python-0.5.55/lightning_logs/ddfm/version_9/checkpoints/ddfm-epoch=00-train_loss=0.6595.ckpt +0 -0
  128. dfm_python-0.5.55/lightning_logs/ddfm/version_9/metrics.csv +0 -2
  129. dfm_python-0.5.55/lightning_logs/trainer/version_0/checkpoints/kdfm-epoch=01-train_loss=9750156656246784.0000.ckpt +0 -0
  130. dfm_python-0.5.55/lightning_logs/trainer/version_0/metrics.csv +0 -3
  131. dfm_python-0.5.55/lightning_logs/trainer/version_1/checkpoints/kdfm-epoch=00-train_loss=inf.ckpt +0 -0
  132. dfm_python-0.5.55/lightning_logs/trainer/version_1/metrics.csv +0 -2
  133. dfm_python-0.5.55/lightning_logs/trainer/version_10/checkpoints/kdfm-epoch=01-train_loss=0.2948.ckpt +0 -0
  134. dfm_python-0.5.55/lightning_logs/trainer/version_10/metrics.csv +0 -3
  135. dfm_python-0.5.55/lightning_logs/trainer/version_11/checkpoints/kdfm-epoch=01-train_loss=0.2337.ckpt +0 -0
  136. dfm_python-0.5.55/lightning_logs/trainer/version_11/metrics.csv +0 -3
  137. dfm_python-0.5.55/lightning_logs/trainer/version_12/checkpoints/kdfm-epoch=01-train_loss=0.2372.ckpt +0 -0
  138. dfm_python-0.5.55/lightning_logs/trainer/version_12/metrics.csv +0 -3
  139. dfm_python-0.5.55/lightning_logs/trainer/version_13/checkpoints/kdfm-epoch=01-train_loss=0.3323.ckpt +0 -0
  140. dfm_python-0.5.55/lightning_logs/trainer/version_13/metrics.csv +0 -3
  141. dfm_python-0.5.55/lightning_logs/trainer/version_14/checkpoints/kdfm-epoch=01-train_loss=0.0895.ckpt +0 -0
  142. dfm_python-0.5.55/lightning_logs/trainer/version_14/metrics.csv +0 -3
  143. dfm_python-0.5.55/lightning_logs/trainer/version_2/checkpoints/kdfm-epoch=00-train_loss=11076925440424673280.0000.ckpt +0 -0
  144. dfm_python-0.5.55/lightning_logs/trainer/version_2/metrics.csv +0 -3
  145. dfm_python-0.5.55/lightning_logs/trainer/version_3/checkpoints/kdfm-epoch=01-train_loss=3466010845203398656.0000.ckpt +0 -0
  146. dfm_python-0.5.55/lightning_logs/trainer/version_3/metrics.csv +0 -3
  147. dfm_python-0.5.55/lightning_logs/trainer/version_4/checkpoints/kdfm-epoch=01-train_loss=89213903044608.0000.ckpt +0 -0
  148. dfm_python-0.5.55/lightning_logs/trainer/version_4/metrics.csv +0 -3
  149. dfm_python-0.5.55/lightning_logs/trainer/version_5/checkpoints/kdfm-epoch=01-train_loss=1842788085222342656.0000.ckpt +0 -0
  150. dfm_python-0.5.55/lightning_logs/trainer/version_5/metrics.csv +0 -3
  151. dfm_python-0.5.55/lightning_logs/trainer/version_6/checkpoints/kdfm-epoch=00-train_loss=28594968117244854272.0000.ckpt +0 -0
  152. dfm_python-0.5.55/lightning_logs/trainer/version_6/metrics.csv +0 -3
  153. dfm_python-0.5.55/lightning_logs/trainer/version_7/checkpoints/kdfm-epoch=00-train_loss=inf.ckpt +0 -0
  154. dfm_python-0.5.55/lightning_logs/trainer/version_7/metrics.csv +0 -2
  155. dfm_python-0.5.55/lightning_logs/trainer/version_8/checkpoints/kdfm-epoch=01-train_loss=457264.4062.ckpt +0 -0
  156. dfm_python-0.5.55/lightning_logs/trainer/version_8/metrics.csv +0 -3
  157. dfm_python-0.5.55/lightning_logs/trainer/version_9/checkpoints/kdfm-epoch=01-train_loss=0.3095.ckpt +0 -0
  158. dfm_python-0.5.55/lightning_logs/trainer/version_9/metrics.csv +0 -3
  159. dfm_python-0.5.55/src/dfm_python/config/schema/__init__.py +0 -17
  160. dfm_python-0.5.55/src/dfm_python/config/schema/block.py +0 -64
  161. dfm_python-0.5.55/src/dfm_python/datamodule/__init__.py +0 -31
  162. dfm_python-0.5.55/src/dfm_python/datamodule/base.py +0 -618
  163. dfm_python-0.5.55/src/dfm_python/datamodule/ddfm_dm.py +0 -276
  164. dfm_python-0.5.55/src/dfm_python/datamodule/kdfm_dm.py +0 -180
  165. dfm_python-0.5.55/src/dfm_python/dataset/__init__.py +0 -60
  166. dfm_python-0.5.55/src/dfm_python/dataset/dataloader.py +0 -142
  167. dfm_python-0.5.55/src/dfm_python/dataset/dataset.py +0 -158
  168. dfm_python-0.5.55/src/dfm_python/dataset/process.py +0 -435
  169. dfm_python-0.5.55/src/dfm_python/decoder/linear.py +0 -68
  170. dfm_python-0.5.55/src/dfm_python/decoder/mlp.py +0 -137
  171. dfm_python-0.5.55/src/dfm_python/encoder/simple_encoder.py +0 -474
  172. dfm_python-0.5.55/src/dfm_python/encoder/variational_encoder.py +0 -0
  173. dfm_python-0.5.55/src/dfm_python/functional/__init__.py +0 -13
  174. dfm_python-0.5.55/src/dfm_python/functional/irf.py +0 -305
  175. dfm_python-0.5.55/src/dfm_python/functional/krylov.py +0 -124
  176. dfm_python-0.5.55/src/dfm_python/logger/__init__.py +0 -53
  177. dfm_python-0.5.55/src/dfm_python/logger/logger.py +0 -147
  178. dfm_python-0.5.55/src/dfm_python/models/base.py +0 -471
  179. dfm_python-0.5.55/src/dfm_python/models/ddfm.py +0 -1888
  180. dfm_python-0.5.55/src/dfm_python/models/kdfm.py +0 -1968
  181. dfm_python-0.5.55/src/dfm_python/ssm/__init__.py +0 -19
  182. dfm_python-0.5.55/src/dfm_python/ssm/arma.py +0 -0
  183. dfm_python-0.5.55/src/dfm_python/ssm/companion.py +0 -995
  184. dfm_python-0.5.55/src/dfm_python/ssm/kalman.py +0 -432
  185. dfm_python-0.5.55/src/dfm_python/ssm/structural.py +0 -298
  186. dfm_python-0.5.55/src/dfm_python/trainer/__init__.py +0 -683
  187. dfm_python-0.5.55/src/dfm_python/trainer/ddfm.py +0 -656
  188. dfm_python-0.5.55/src/dfm_python/trainer/dfm.py +0 -154
  189. dfm_python-0.5.55/src/dfm_python/trainer/kdfm.py +0 -137
  190. dfm_python-0.5.55/src/dfm_python/utils/common.py +0 -403
  191. dfm_python-0.5.55/src/dfm_python/utils/helper.py +0 -200
  192. dfm_python-0.5.55/src/dfm_python/utils/tensor_utils.py +0 -199
  193. dfm_python-0.5.55/src/dfm_python/utils/validation.py +0 -121
  194. dfm_python-0.5.55/src/test/config/schema/test_model.py +0 -22
  195. dfm_python-0.5.55/src/test/config/test_adapter.py +0 -90
  196. dfm_python-0.5.55/src/test/datamodule/__init__.py +0 -2
  197. dfm_python-0.5.55/src/test/datamodule/test_base.py +0 -109
  198. dfm_python-0.5.55/src/test/datamodule/test_ddfm_dm.py +0 -27
  199. dfm_python-0.5.55/src/test/datamodule/test_dfm_dm.py +0 -26
  200. dfm_python-0.5.55/src/test/datamodule/test_kdfm_dm.py +0 -27
  201. dfm_python-0.5.55/src/test/dataset/test_dataset.py +0 -53
  202. dfm_python-0.5.55/src/test/encoder/test_variational_encoder.py +0 -27
  203. dfm_python-0.5.55/src/test/functional/test_em.py +0 -57
  204. dfm_python-0.5.55/src/test/functional/test_irf.py +0 -132
  205. dfm_python-0.5.55/src/test/functional/test_krylov.py +0 -39
  206. dfm_python-0.5.55/src/test/logger/test_inference_logger.py +0 -18
  207. dfm_python-0.5.55/src/test/logger/test_logger.py +0 -28
  208. dfm_python-0.5.55/src/test/logger/test_train_logger.py +0 -18
  209. dfm_python-0.5.55/src/test/models/test_base.py +0 -385
  210. dfm_python-0.5.55/src/test/models/test_ddfm.py +0 -232
  211. dfm_python-0.5.55/src/test/models/test_kdfm.py +0 -411
  212. dfm_python-0.5.55/src/test/numeric/test_tent.py +0 -69
  213. dfm_python-0.5.55/src/test/trainer/__init__.py +0 -2
  214. dfm_python-0.5.55/src/test/trainer/test_ddfm.py +0 -34
  215. dfm_python-0.5.55/src/test/trainer/test_dfm.py +0 -39
  216. dfm_python-0.5.55/src/test/trainer/test_kdfm.py +0 -39
  217. dfm_python-0.5.55/src/test/utils/test_tensor_utils.py +0 -175
  218. dfm_python-0.5.55/tutorial/tutorial_finance_kdfm.py +0 -285
  219. dfm_python-0.5.55/tutorial/tutorial_macro_kdfm.py +0 -310
  220. {dfm_python-0.5.55 → dfm_python-0.5.57}/.git +0 -0
  221. {dfm_python-0.5.55 → dfm_python-0.5.57}/.gitignore +0 -0
  222. {dfm_python-0.5.55 → dfm_python-0.5.57}/.python-version +0 -0
  223. {dfm_python-0.5.55 → dfm_python-0.5.57}/MANIFEST.in +0 -0
  224. {dfm_python-0.5.55 → dfm_python-0.5.57}/config/dfm_finance.yaml +0 -0
  225. {dfm_python-0.5.55 → dfm_python-0.5.57}/data/finance.csv +0 -0
  226. {dfm_python-0.5.55 → dfm_python-0.5.57}/data/macro.csv +0 -0
  227. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/encoder/base.py +0 -0
  228. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/builder.py +0 -0
  229. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/errors.py +0 -0
  230. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/metric.py +0 -0
  231. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/__init__.py +0 -0
  232. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/__init__.py +0 -0
  233. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/schema/__init__.py +0 -0
  234. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/schema/test_block.py +0 -0
  235. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/dataset/__init__.py +0 -0
  236. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/decoder/__init__.py +0 -0
  237. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/decoder/test_mlp.py +0 -0
  238. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/__init__.py +0 -0
  239. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/test_pca.py +0 -0
  240. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/functional/__init__.py +0 -0
  241. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/logger/__init__.py +0 -0
  242. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/models/__init__.py +0 -0
  243. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/__init__.py +0 -0
  244. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_validator.py +0 -0
  245. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/__init__.py +0 -0
  246. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_arma.py +0 -0
  247. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_companion.py +0 -0
  248. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_kalman.py +0 -0
  249. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_structural.py +0 -0
  250. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/__init__.py +0 -0
  251. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_errors.py +0 -0
  252. {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dfm-python
3
- Version: 0.5.55
3
+ Version: 0.5.57
4
4
  Summary: Dynamic Factor Model (DFM) estimation and forecasting in Python
5
5
  Project-URL: Homepage, https://github.com/yourusername/dfm-python
6
6
  Project-URL: Documentation, https://github.com/yourusername/dfm-python#readme
@@ -8,7 +8,6 @@ Project-URL: Repository, https://github.com/yourusername/dfm-python
8
8
  Project-URL: Issues, https://github.com/yourusername/dfm-python/issues
9
9
  Author: Minkey Chang
10
10
  License: MIT
11
- License-File: LICENSE
12
11
  Keywords: dfm,dynamic-factor-model,econometrics,forecasting,time-series
13
12
  Classifier: Development Status :: 4 - Beta
14
13
  Classifier: Intended Audience :: Science/Research
@@ -176,7 +175,7 @@ dfm-python/
176
175
  │ └── dfm_python/
177
176
  │ ├── models/ # Model implementations (DFM, DDFM, KDFM)
178
177
  │ ├── config/ # Configuration schemas
179
- │ ├── datamodule/ # PyTorch Lightning DataModules
178
+ │ ├── datamodule/ # Data loading and preprocessing modules
180
179
  │ ├── trainer/ # Training procedures
181
180
  │ ├── ssm/ # State-space model components
182
181
  │ ├── dataset/ # Data loading and preprocessing
@@ -194,7 +193,7 @@ dfm-python/
194
193
  - **Structural identification**: Learnable structural shock identification (Cholesky, full, low-rank)
195
194
  - **Efficient computation**: Krylov FFT for O(T log T) forward pass
196
195
  - **Direct IRF computation**: Avoids numerical error accumulation
197
- - **Gradient descent training**: Uses PyTorch Lightning for training
196
+ - **Gradient descent training**: Uses PyTorch for training with custom logging
198
197
 
199
198
  ### DFM (Dynamic Factor Model)
200
199
 
@@ -207,7 +206,7 @@ dfm-python/
207
206
 
208
207
  - **Nonlinear encoder**: Neural network encoder for nonlinear factor extraction
209
208
  - **MCMC training**: Denoising training procedure
210
- - **PyTorch-based**: Full PyTorch implementation with Lightning support
209
+ - **PyTorch-based**: Full PyTorch implementation with custom logging system
211
210
 
212
211
  ## IRF Analysis: KDFM's PRIMARY CONTRIBUTION
213
212
 
@@ -118,7 +118,7 @@ dfm-python/
118
118
  │ └── dfm_python/
119
119
  │ ├── models/ # Model implementations (DFM, DDFM, KDFM)
120
120
  │ ├── config/ # Configuration schemas
121
- │ ├── datamodule/ # PyTorch Lightning DataModules
121
+ │ ├── datamodule/ # Data loading and preprocessing modules
122
122
  │ ├── trainer/ # Training procedures
123
123
  │ ├── ssm/ # State-space model components
124
124
  │ ├── dataset/ # Data loading and preprocessing
@@ -136,7 +136,7 @@ dfm-python/
136
136
  - **Structural identification**: Learnable structural shock identification (Cholesky, full, low-rank)
137
137
  - **Efficient computation**: Krylov FFT for O(T log T) forward pass
138
138
  - **Direct IRF computation**: Avoids numerical error accumulation
139
- - **Gradient descent training**: Uses PyTorch Lightning for training
139
+ - **Gradient descent training**: Uses PyTorch for training with custom logging
140
140
 
141
141
  ### DFM (Dynamic Factor Model)
142
142
 
@@ -149,7 +149,7 @@ dfm-python/
149
149
 
150
150
  - **Nonlinear encoder**: Neural network encoder for nonlinear factor extraction
151
151
  - **MCMC training**: Denoising training procedure
152
- - **PyTorch-based**: Full PyTorch implementation with Lightning support
152
+ - **PyTorch-based**: Full PyTorch implementation with custom logging system
153
153
 
154
154
  ## IRF Analysis: KDFM's PRIMARY CONTRIBUTION
155
155
 
@@ -0,0 +1,38 @@
1
+ # DDFM Configuration for Exchange Rate Dataset
2
+ # Based on original TensorFlow DDFM implementation (DDFM/run_exchange_rate_original.py)
3
+ # Data: 8 exchange rate series (AUD_USD, GBP_USD, CAD_USD, CHF_USD, CNY_USD, JPY_USD, SGD_USD, NZD_USD)
4
+ # Clock: Daily (d) - all series are daily frequency
5
+ # Date range: 1990-01-01 to 2010-10-10
6
+
7
+ # Neural Network Architecture (matching original TensorFlow DDFM)
8
+ encoder_layers: [16, 4] # Hidden layers: [16] -> latent: 4 (matching original structure_encoder=(16, 4))
9
+ activation: relu # Matching original link='relu'
10
+ use_batch_norm: true # Matching original batch_norm=True
11
+
12
+ # Training Parameters (matching original TensorFlow DDFM)
13
+ learning_rate: 0.005 # Matching original learning_rate=0.005
14
+ n_mc_samples: 10 # Number of MC samples per MCMC iteration (matching original epochs=10)
15
+ window_size: 100 # Time-step batch size for training (matching original batch_size=100)
16
+
17
+ # MCMC/Iterative Parameters (matching original TensorFlow DDFM)
18
+ max_epoch: 200 # Maximum MCMC iterations (matching original max_iter=200)
19
+ tolerance: 0.0005 # Convergence tolerance (matching original tolerance=0.0005)
20
+ disp: 10 # Display frequency for training progress (matching original disp=10)
21
+ seed: 3 # Random seed (matching original seed=3)
22
+
23
+ # Data Handling (used by Dataset, not Model)
24
+ clock: d # Daily clock frequency (all series are daily)
25
+ target_scaler: null # No target scaler - data should be pre-scaled before passing to Dataset
26
+
27
+ # Frequency mapping (all series are daily)
28
+ # If not specified, all series use clock frequency (d)
29
+ # Format: {"series_name": "frequency_code"}
30
+ # frequency:
31
+ # AUD_USD: d
32
+ # GBP_USD: d
33
+ # CAD_USD: d
34
+ # CHF_USD: d
35
+ # CNY_USD: d
36
+ # JPY_USD: d
37
+ # SGD_USD: d
38
+ # NZD_USD: d
@@ -0,0 +1,31 @@
1
+ # DDFM Configuration for Finance Dataset
2
+ # Data: Finance data with market_forward_excess_returns as target variable
3
+ # Clock: Monthly (m) - all series are monthly frequency
4
+
5
+ # Neural Network Architecture
6
+ encoder_layers: [64, 32, 2] # Hidden layers: [64, 32] -> latent: 2 factors
7
+ activation: relu # Activation function: 'tanh', 'relu', 'sigmoid'
8
+ use_batch_norm: true # Use batch normalization
9
+
10
+ # Training Parameters
11
+ learning_rate: 0.001 # Learning rate for optimizer
12
+ n_mc_samples: 1 # Number of MC samples per MCMC iteration (reduced for faster execution)
13
+ window_size: 100 # Time-step batch size for training
14
+
15
+ # MCMC/Iterative Parameters
16
+ max_epoch: 200 # Maximum MCMC iterations
17
+ tolerance: 0.0005 # Convergence tolerance
18
+ disp: 10 # Display frequency for training progress
19
+ seed: null # Random seed (None uses default)
20
+
21
+ # Data Handling (used by Dataset, not Model)
22
+ clock: m # Monthly clock frequency
23
+ target_scaler: standard # Scaler for target series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
24
+
25
+ # Frequency mapping (optional)
26
+ # If not specified, all series use clock frequency
27
+ # Format: {"series_name": "frequency_code"}
28
+ # frequency:
29
+ # gdp: q
30
+ # unemployment: m
31
+ # interest_rate: m
@@ -0,0 +1,55 @@
1
+ # DDFM Configuration for Macroeconomic Datasets
2
+ # Based on Korean economic indicators (KO* series)
3
+ # Data: 101 series, mixed weekly/monthly frequency (1985-04-05 to 2025-11-21)
4
+ # Clock: Weekly (w) - base frequency for latent factors
5
+ # Target: KOEQUIPTE (Investment, Equipment, Estimation, SA)
6
+
7
+ # Neural Network Architecture
8
+ encoder_layers: [64, 32, 2] # Hidden layers: [64, 32] -> latent: 2 factors
9
+ activation: relu # Activation function: 'tanh', 'relu', 'sigmoid'
10
+ use_batch_norm: true # Use batch normalization
11
+
12
+ # Training Parameters
13
+ learning_rate: 0.001 # Learning rate for optimizer
14
+ n_mc_samples: 1 # Number of MC samples per MCMC iteration (reduced for faster execution)
15
+ window_size: 100 # Time-step batch size for training
16
+
17
+ # MCMC/Iterative Parameters
18
+ max_epoch: 200 # Maximum MCMC iterations
19
+ tolerance: 0.0005 # Convergence tolerance
20
+ disp: 10 # Display frequency for training progress
21
+ seed: null # Random seed (None uses default)
22
+
23
+ # Data Handling (used by Dataset, not Model)
24
+ clock: w # Weekly clock frequency (base frequency for latent factors)
25
+ target_scaler: standard # Scaler for target series: 'standard', 'robust', 'minmax', 'maxabs', 'quantile', or null
26
+
27
+ # Frequency mapping for mixed-frequency macro data
28
+ # Clock is weekly (w), so monthly series are slower frequency
29
+ # Grouped format: frequencies are specified as lists grouped by frequency code
30
+ # Reduced set for faster testing (~50% reduction: 12 monthly series kept from original ~24)
31
+ frequency:
32
+ # Monthly series (slower than weekly clock) - typically end-of-month observations
33
+ # Essential series for testing
34
+ m:
35
+ - KOEMPTOTO # Total employment (monthly)
36
+ - KOHWRWEMP # Hours worked (monthly)
37
+ - KOIMPCONA # Investment, Construction (monthly)
38
+ - KOWRCCNSE # Consumption (monthly)
39
+ - KOCONPRCF # Production (monthly)
40
+ - KOCPCOREF # Consumer prices (monthly)
41
+ - KOCPEXFEF # Export prices (monthly)
42
+ - KOCREU..A # Credit (monthly)
43
+ - KOLRLTHH # Interest rates (monthly)
44
+ - KOBSIHAPR # Business survey (monthly)
45
+ - KOCNFCONR # Confidence (monthly)
46
+ - KOEQUIPTE # Investment, Equipment (monthly, target series)
47
+ # Weekly series (same as clock frequency)
48
+ w:
49
+ - KORFBEV # Retail, Food & Beverages (weekly)
50
+ - KORWHLS # Retail, Wholesale (weekly)
51
+ - KORMCMP # Retail, Miscellaneous & Comparison (weekly)
52
+ - KORELEC # Retail, Electronics (weekly)
53
+ - KORCNST # Retail, Construction (weekly)
54
+ - KORMACH # Retail, Machinery (weekly)
55
+ - KOROCOINF # Retail, Other Consumer & Information (weekly)
@@ -55,30 +55,32 @@ blocks:
55
55
 
56
56
  # Frequency mapping for mixed-frequency macro data
57
57
  # Clock is weekly (w), so monthly series are slower frequency
58
- # All frequencies must be explicitly specified
58
+ # Grouped format: frequencies are specified as lists grouped by frequency code
59
59
  # Reduced set for faster testing (~50% reduction: 18 monthly series kept from original ~36)
60
60
  frequency:
61
61
  # Monthly series (slower than weekly clock) - typically end-of-month observations
62
62
  # Block_Real series
63
- KOEMPTOTO: m # Total employment (monthly)
64
- KOHWRWEMP: m # Hours worked (monthly)
65
- KOIMPCONA: m # Investment, Construction (monthly)
66
- KOWRCCNSE: m # Consumption (monthly)
67
- KOCONPRCF: m # Production (monthly)
68
- # Block_Prices_Financial series
69
- KOCPCOREF: m # Consumer prices (monthly)
70
- KOCPEXFEF: m # Export prices (monthly)
71
- KOCREU..A: m # Credit (monthly)
72
- KOLRLTHH: m # Interest rates (monthly)
73
- KOBSIHAPR: m # Business survey (monthly)
74
- KOCNFCONR: m # Confidence (monthly)
75
- # Target series
76
- KOEQUIPTE: m # Investment, Equipment (monthly, target series)
63
+ m:
64
+ - KOEMPTOTO # Total employment (monthly)
65
+ - KOHWRWEMP # Hours worked (monthly)
66
+ - KOIMPCONA # Investment, Construction (monthly)
67
+ - KOWRCCNSE # Consumption (monthly)
68
+ - KOCONPRCF # Production (monthly)
69
+ # Block_Prices_Financial series
70
+ - KOCPCOREF # Consumer prices (monthly)
71
+ - KOCPEXFEF # Export prices (monthly)
72
+ - KOCREU..A # Credit (monthly)
73
+ - KOLRLTHH # Interest rates (monthly)
74
+ - KOBSIHAPR # Business survey (monthly)
75
+ - KOCNFCONR # Confidence (monthly)
76
+ # Target series
77
+ - KOEQUIPTE # Investment, Equipment (monthly, target series)
77
78
  # Weekly series (same as clock frequency)
78
- KORFBEV: w # Retail, Food & Beverages (weekly)
79
- KORWHLS: w # Retail, Wholesale (weekly)
80
- KORMCMP: w # Retail, Miscellaneous & Comparison (weekly)
81
- KORELEC: w # Retail, Electronics (weekly)
82
- KORCNST: w # Retail, Construction (weekly)
83
- KORMACH: w # Retail, Machinery (weekly)
84
- KOROCOINF: w # Retail, Other Consumer & Information (weekly)
79
+ w:
80
+ - KORFBEV # Retail, Food & Beverages (weekly)
81
+ - KORWHLS # Retail, Wholesale (weekly)
82
+ - KORMCMP # Retail, Miscellaneous & Comparison (weekly)
83
+ - KORELEC # Retail, Electronics (weekly)
84
+ - KORCNST # Retail, Construction (weekly)
85
+ - KORMACH # Retail, Machinery (weekly)
86
+ - KOROCOINF # Retail, Other Consumer & Information (weekly)