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.
- {dfm_python-0.5.55 → dfm_python-0.5.57}/PKG-INFO +4 -5
- {dfm_python-0.5.55 → dfm_python-0.5.57}/README.md +3 -3
- dfm_python-0.5.57/config/ddfm_exchange.yaml +38 -0
- dfm_python-0.5.57/config/ddfm_finance.yaml +31 -0
- dfm_python-0.5.57/config/ddfm_macro.yaml +55 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/config/dfm_macro.yaml +24 -22
- dfm_python-0.5.57/data/exchange_rate.csv +7589 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/pyproject.toml +2 -1
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/__init__.py +19 -49
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/__init__.py +7 -12
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/adapter.py +63 -7
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/constants.py +149 -10
- dfm_python-0.5.57/src/dfm_python/config/schema/__init__.py +19 -0
- dfm_python-0.5.57/src/dfm_python/config/schema/block.py +122 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/schema/model.py +40 -11
- dfm_python-0.5.57/src/dfm_python/config/schema/params.py +279 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/schema/results.py +121 -92
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/config/types.py +57 -28
- dfm_python-0.5.57/src/dfm_python/dataset/__init__.py +21 -0
- dfm_python-0.5.57/src/dfm_python/dataset/ddfm_dataset.py +393 -0
- 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
- dfm_python-0.5.57/src/dfm_python/dataset/time.py +97 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/decoder/__init__.py +3 -1
- dfm_python-0.5.57/src/dfm_python/decoder/base.py +78 -0
- dfm_python-0.5.57/src/dfm_python/decoder/linear.py +72 -0
- dfm_python-0.5.57/src/dfm_python/decoder/mlp.py +128 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/encoder/__init__.py +9 -9
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/encoder/pca.py +6 -5
- dfm_python-0.5.57/src/dfm_python/encoder/simple_autoencoder.py +292 -0
- dfm_python-0.5.57/src/dfm_python/functional/__init__.py +11 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/functional/dfm_block.py +65 -14
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/functional/em.py +580 -223
- dfm_python-0.5.57/src/dfm_python/logger/__init__.py +63 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/logger/inference_logger.py +41 -29
- dfm_python-0.5.57/src/dfm_python/logger/logger.py +271 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/logger/train_logger.py +81 -68
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/models/__init__.py +2 -10
- dfm_python-0.5.57/src/dfm_python/models/base.py +292 -0
- dfm_python-0.5.57/src/dfm_python/models/ddfm.py +982 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/models/dfm.py +576 -384
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/estimator.py +281 -52
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/stability.py +133 -167
- dfm_python-0.5.57/src/dfm_python/numeric/statistic.py +353 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/tent.py +16 -6
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/validator.py +159 -8
- dfm_python-0.5.57/src/dfm_python/ssm/__init__.py +29 -0
- dfm_python-0.5.57/src/dfm_python/ssm/kalman.py +564 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/__init__.py +20 -38
- dfm_python-0.5.57/src/dfm_python/utils/checkpoint.py +295 -0
- dfm_python-0.5.57/src/dfm_python/utils/helper.py +110 -0
- dfm_python-0.5.57/src/dfm_python/utils/loss.py +100 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/misc.py +73 -150
- dfm_python-0.5.57/src/dfm_python/utils/validation.py +54 -0
- dfm_python-0.5.57/src/test/config/schema/test_model.py +61 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/schema/test_results.py +41 -92
- dfm_python-0.5.57/src/test/config/test_adapter.py +231 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/test_constants.py +102 -13
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/test_types.py +6 -23
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/conftest.py +13 -4
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/dataset/test_dataloader.py +9 -4
- dfm_python-0.5.57/src/test/dataset/test_dataset.py +69 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/dataset/test_process.py +44 -40
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/decoder/test_linear.py +6 -6
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/test_base.py +0 -1
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/test_simple_encoder.py +34 -57
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/functional/test_dfm_block.py +17 -20
- dfm_python-0.5.57/src/test/functional/test_em.py +878 -0
- dfm_python-0.5.57/src/test/logger/test_inference_logger.py +17 -0
- dfm_python-0.5.57/src/test/logger/test_logger.py +146 -0
- dfm_python-0.5.57/src/test/logger/test_train_logger.py +18 -0
- dfm_python-0.5.57/src/test/models/test_base.py +161 -0
- dfm_python-0.5.57/src/test/models/test_ddfm.py +488 -0
- dfm_python-0.5.57/src/test/models/test_ddfm_batchnorm_placement.py +179 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/models/test_dfm.py +104 -26
- dfm_python-0.5.57/src/test/models/test_tensorflow_batchnorm_comparison.py +266 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_builder.py +2 -1
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_estimator.py +4 -3
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_stability.py +54 -52
- dfm_python-0.5.57/src/test/numeric/test_tent.py +135 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_common.py +142 -5
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_helper.py +3 -32
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_metric.py +11 -1
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_misc.py +6 -6
- dfm_python-0.5.57/src/test/utils/test_tensor_utils.py +57 -0
- dfm_python-0.5.57/tutorial/tutorial_exchange_ddfm.py +330 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_finance_ddfm.py +74 -52
- {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_finance_dfm.py +17 -18
- dfm_python-0.5.57/tutorial/tutorial_illness_ddfm.py +284 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_macro_ddfm.py +58 -39
- {dfm_python-0.5.55 → dfm_python-0.5.57}/tutorial/tutorial_macro_dfm.py +20 -20
- {dfm_python-0.5.55 → dfm_python-0.5.57}/uv.lock +1 -1
- dfm_python-0.5.55/LICENSE +0 -21
- dfm_python-0.5.55/config/ddfm_finance.yaml +0 -35
- dfm_python-0.5.55/config/ddfm_macro.yaml +0 -63
- dfm_python-0.5.55/lightning_logs/ddfm/version_10/checkpoints/ddfm-epoch=00-train_loss=0.6495.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_10/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_11/checkpoints/ddfm-epoch=00-train_loss=0.8428.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_11/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_12/checkpoints/ddfm-epoch=00-train_loss=0.8959.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_12/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_13/checkpoints/ddfm-epoch=00-train_loss=0.7644.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_13/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_14/checkpoints/ddfm-epoch=00-train_loss=0.7935.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_14/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_15/checkpoints/ddfm-epoch=00-train_loss=0.6240.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_15/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_16/checkpoints/ddfm-epoch=00-train_loss=0.9689.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_16/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_17/checkpoints/ddfm-epoch=00-train_loss=0.9336.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_17/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_18/checkpoints/ddfm-epoch=00-train_loss=0.8481.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_18/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_19/checkpoints/ddfm-epoch=00-train_loss=0.6991.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_19/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_20/checkpoints/ddfm-epoch=00-train_loss=0.9289.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_20/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_21/checkpoints/ddfm-epoch=00-train_loss=0.8253.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_21/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_22/checkpoints/ddfm-epoch=00-train_loss=0.8933.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_22/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_5/checkpoints/ddfm-epoch=00-train_loss=0.8292.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_5/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_7/checkpoints/ddfm-epoch=00-train_loss=0.8216.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_7/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_8/checkpoints/ddfm-epoch=00-train_loss=0.6088.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_8/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/ddfm/version_9/checkpoints/ddfm-epoch=00-train_loss=0.6595.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/ddfm/version_9/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/trainer/version_0/checkpoints/kdfm-epoch=01-train_loss=9750156656246784.0000.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_0/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_1/checkpoints/kdfm-epoch=00-train_loss=inf.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_1/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/trainer/version_10/checkpoints/kdfm-epoch=01-train_loss=0.2948.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_10/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_11/checkpoints/kdfm-epoch=01-train_loss=0.2337.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_11/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_12/checkpoints/kdfm-epoch=01-train_loss=0.2372.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_12/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_13/checkpoints/kdfm-epoch=01-train_loss=0.3323.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_13/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_14/checkpoints/kdfm-epoch=01-train_loss=0.0895.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_14/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_2/checkpoints/kdfm-epoch=00-train_loss=11076925440424673280.0000.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_2/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_3/checkpoints/kdfm-epoch=01-train_loss=3466010845203398656.0000.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_3/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_4/checkpoints/kdfm-epoch=01-train_loss=89213903044608.0000.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_4/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_5/checkpoints/kdfm-epoch=01-train_loss=1842788085222342656.0000.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_5/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_6/checkpoints/kdfm-epoch=00-train_loss=28594968117244854272.0000.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_6/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_7/checkpoints/kdfm-epoch=00-train_loss=inf.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_7/metrics.csv +0 -2
- dfm_python-0.5.55/lightning_logs/trainer/version_8/checkpoints/kdfm-epoch=01-train_loss=457264.4062.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_8/metrics.csv +0 -3
- dfm_python-0.5.55/lightning_logs/trainer/version_9/checkpoints/kdfm-epoch=01-train_loss=0.3095.ckpt +0 -0
- dfm_python-0.5.55/lightning_logs/trainer/version_9/metrics.csv +0 -3
- dfm_python-0.5.55/src/dfm_python/config/schema/__init__.py +0 -17
- dfm_python-0.5.55/src/dfm_python/config/schema/block.py +0 -64
- dfm_python-0.5.55/src/dfm_python/datamodule/__init__.py +0 -31
- dfm_python-0.5.55/src/dfm_python/datamodule/base.py +0 -618
- dfm_python-0.5.55/src/dfm_python/datamodule/ddfm_dm.py +0 -276
- dfm_python-0.5.55/src/dfm_python/datamodule/kdfm_dm.py +0 -180
- dfm_python-0.5.55/src/dfm_python/dataset/__init__.py +0 -60
- dfm_python-0.5.55/src/dfm_python/dataset/dataloader.py +0 -142
- dfm_python-0.5.55/src/dfm_python/dataset/dataset.py +0 -158
- dfm_python-0.5.55/src/dfm_python/dataset/process.py +0 -435
- dfm_python-0.5.55/src/dfm_python/decoder/linear.py +0 -68
- dfm_python-0.5.55/src/dfm_python/decoder/mlp.py +0 -137
- dfm_python-0.5.55/src/dfm_python/encoder/simple_encoder.py +0 -474
- dfm_python-0.5.55/src/dfm_python/encoder/variational_encoder.py +0 -0
- dfm_python-0.5.55/src/dfm_python/functional/__init__.py +0 -13
- dfm_python-0.5.55/src/dfm_python/functional/irf.py +0 -305
- dfm_python-0.5.55/src/dfm_python/functional/krylov.py +0 -124
- dfm_python-0.5.55/src/dfm_python/logger/__init__.py +0 -53
- dfm_python-0.5.55/src/dfm_python/logger/logger.py +0 -147
- dfm_python-0.5.55/src/dfm_python/models/base.py +0 -471
- dfm_python-0.5.55/src/dfm_python/models/ddfm.py +0 -1888
- dfm_python-0.5.55/src/dfm_python/models/kdfm.py +0 -1968
- dfm_python-0.5.55/src/dfm_python/ssm/__init__.py +0 -19
- dfm_python-0.5.55/src/dfm_python/ssm/arma.py +0 -0
- dfm_python-0.5.55/src/dfm_python/ssm/companion.py +0 -995
- dfm_python-0.5.55/src/dfm_python/ssm/kalman.py +0 -432
- dfm_python-0.5.55/src/dfm_python/ssm/structural.py +0 -298
- dfm_python-0.5.55/src/dfm_python/trainer/__init__.py +0 -683
- dfm_python-0.5.55/src/dfm_python/trainer/ddfm.py +0 -656
- dfm_python-0.5.55/src/dfm_python/trainer/dfm.py +0 -154
- dfm_python-0.5.55/src/dfm_python/trainer/kdfm.py +0 -137
- dfm_python-0.5.55/src/dfm_python/utils/common.py +0 -403
- dfm_python-0.5.55/src/dfm_python/utils/helper.py +0 -200
- dfm_python-0.5.55/src/dfm_python/utils/tensor_utils.py +0 -199
- dfm_python-0.5.55/src/dfm_python/utils/validation.py +0 -121
- dfm_python-0.5.55/src/test/config/schema/test_model.py +0 -22
- dfm_python-0.5.55/src/test/config/test_adapter.py +0 -90
- dfm_python-0.5.55/src/test/datamodule/__init__.py +0 -2
- dfm_python-0.5.55/src/test/datamodule/test_base.py +0 -109
- dfm_python-0.5.55/src/test/datamodule/test_ddfm_dm.py +0 -27
- dfm_python-0.5.55/src/test/datamodule/test_dfm_dm.py +0 -26
- dfm_python-0.5.55/src/test/datamodule/test_kdfm_dm.py +0 -27
- dfm_python-0.5.55/src/test/dataset/test_dataset.py +0 -53
- dfm_python-0.5.55/src/test/encoder/test_variational_encoder.py +0 -27
- dfm_python-0.5.55/src/test/functional/test_em.py +0 -57
- dfm_python-0.5.55/src/test/functional/test_irf.py +0 -132
- dfm_python-0.5.55/src/test/functional/test_krylov.py +0 -39
- dfm_python-0.5.55/src/test/logger/test_inference_logger.py +0 -18
- dfm_python-0.5.55/src/test/logger/test_logger.py +0 -28
- dfm_python-0.5.55/src/test/logger/test_train_logger.py +0 -18
- dfm_python-0.5.55/src/test/models/test_base.py +0 -385
- dfm_python-0.5.55/src/test/models/test_ddfm.py +0 -232
- dfm_python-0.5.55/src/test/models/test_kdfm.py +0 -411
- dfm_python-0.5.55/src/test/numeric/test_tent.py +0 -69
- dfm_python-0.5.55/src/test/trainer/__init__.py +0 -2
- dfm_python-0.5.55/src/test/trainer/test_ddfm.py +0 -34
- dfm_python-0.5.55/src/test/trainer/test_dfm.py +0 -39
- dfm_python-0.5.55/src/test/trainer/test_kdfm.py +0 -39
- dfm_python-0.5.55/src/test/utils/test_tensor_utils.py +0 -175
- dfm_python-0.5.55/tutorial/tutorial_finance_kdfm.py +0 -285
- dfm_python-0.5.55/tutorial/tutorial_macro_kdfm.py +0 -310
- {dfm_python-0.5.55 → dfm_python-0.5.57}/.git +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/.gitignore +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/.python-version +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/MANIFEST.in +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/config/dfm_finance.yaml +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/data/finance.csv +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/data/macro.csv +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/encoder/base.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/numeric/builder.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/errors.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/dfm_python/utils/metric.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/schema/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/config/schema/test_block.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/dataset/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/decoder/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/decoder/test_mlp.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/encoder/test_pca.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/functional/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/logger/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/models/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/numeric/test_validator.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_arma.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_companion.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_kalman.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/ssm/test_structural.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/__init__.py +0 -0
- {dfm_python-0.5.55 → dfm_python-0.5.57}/src/test/utils/test_errors.py +0 -0
- {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.
|
|
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/ #
|
|
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
|
|
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
|
|
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/ #
|
|
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
|
|
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
|
|
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
|
-
#
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
#
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
#
|
|
76
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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)
|