pymc-extras 0.4.1__py3-none-any.whl → 0.5.0__py3-none-any.whl
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.
- pymc_extras/inference/__init__.py +8 -1
- pymc_extras/inference/dadvi/__init__.py +0 -0
- pymc_extras/inference/dadvi/dadvi.py +261 -0
- pymc_extras/inference/fit.py +5 -0
- pymc_extras/inference/laplace_approx/find_map.py +16 -8
- pymc_extras/inference/laplace_approx/idata.py +5 -2
- pymc_extras/inference/laplace_approx/laplace.py +1 -0
- pymc_extras/statespace/models/DFM.py +849 -0
- pymc_extras/statespace/models/SARIMAX.py +4 -4
- pymc_extras/statespace/models/VARMAX.py +7 -7
- pymc_extras/statespace/utils/constants.py +3 -1
- {pymc_extras-0.4.1.dist-info → pymc_extras-0.5.0.dist-info}/METADATA +1 -1
- {pymc_extras-0.4.1.dist-info → pymc_extras-0.5.0.dist-info}/RECORD +15 -12
- {pymc_extras-0.4.1.dist-info → pymc_extras-0.5.0.dist-info}/WHEEL +0 -0
- {pymc_extras-0.4.1.dist-info → pymc_extras-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -17,7 +17,7 @@ from pymc_extras.statespace.utils.constants import (
|
|
|
17
17
|
ALL_STATE_AUX_DIM,
|
|
18
18
|
ALL_STATE_DIM,
|
|
19
19
|
AR_PARAM_DIM,
|
|
20
|
-
|
|
20
|
+
EXOG_STATE_DIM,
|
|
21
21
|
MA_PARAM_DIM,
|
|
22
22
|
OBS_STATE_DIM,
|
|
23
23
|
SARIMAX_STATE_STRUCTURES,
|
|
@@ -315,7 +315,7 @@ class BayesianSARIMAX(PyMCStateSpace):
|
|
|
315
315
|
def data_info(self) -> dict[str, dict[str, Any]]:
|
|
316
316
|
info = {
|
|
317
317
|
"exogenous_data": {
|
|
318
|
-
"dims": (TIME_DIM,
|
|
318
|
+
"dims": (TIME_DIM, EXOG_STATE_DIM),
|
|
319
319
|
"shape": (None, self.k_exog),
|
|
320
320
|
}
|
|
321
321
|
}
|
|
@@ -403,7 +403,7 @@ class BayesianSARIMAX(PyMCStateSpace):
|
|
|
403
403
|
"ma_params": (MA_PARAM_DIM,),
|
|
404
404
|
"seasonal_ar_params": (SEASONAL_AR_PARAM_DIM,),
|
|
405
405
|
"seasonal_ma_params": (SEASONAL_MA_PARAM_DIM,),
|
|
406
|
-
"beta_exog": (
|
|
406
|
+
"beta_exog": (EXOG_STATE_DIM,),
|
|
407
407
|
}
|
|
408
408
|
if self.k_endog == 1:
|
|
409
409
|
coord_map["sigma_state"] = None
|
|
@@ -438,7 +438,7 @@ class BayesianSARIMAX(PyMCStateSpace):
|
|
|
438
438
|
if self.Q > 0:
|
|
439
439
|
coords.update({SEASONAL_MA_PARAM_DIM: list(range(1, self.Q + 1))})
|
|
440
440
|
if self.k_exog > 0:
|
|
441
|
-
coords.update({
|
|
441
|
+
coords.update({EXOG_STATE_DIM: self.exog_state_names})
|
|
442
442
|
return coords
|
|
443
443
|
|
|
444
444
|
def _stationary_initialization(self):
|
|
@@ -14,7 +14,7 @@ from pymc_extras.statespace.utils.constants import (
|
|
|
14
14
|
ALL_STATE_AUX_DIM,
|
|
15
15
|
ALL_STATE_DIM,
|
|
16
16
|
AR_PARAM_DIM,
|
|
17
|
-
|
|
17
|
+
EXOG_STATE_DIM,
|
|
18
18
|
MA_PARAM_DIM,
|
|
19
19
|
OBS_STATE_AUX_DIM,
|
|
20
20
|
OBS_STATE_DIM,
|
|
@@ -342,7 +342,7 @@ class BayesianVARMAX(PyMCStateSpace):
|
|
|
342
342
|
if isinstance(self.exog_state_names, list):
|
|
343
343
|
info = {
|
|
344
344
|
"exogenous_data": {
|
|
345
|
-
"dims": (TIME_DIM,
|
|
345
|
+
"dims": (TIME_DIM, EXOG_STATE_DIM),
|
|
346
346
|
"shape": (None, self.k_exog),
|
|
347
347
|
}
|
|
348
348
|
}
|
|
@@ -350,7 +350,7 @@ class BayesianVARMAX(PyMCStateSpace):
|
|
|
350
350
|
elif isinstance(self.exog_state_names, dict):
|
|
351
351
|
info = {
|
|
352
352
|
f"{endog_state}_exogenous_data": {
|
|
353
|
-
"dims": (TIME_DIM, f"{
|
|
353
|
+
"dims": (TIME_DIM, f"{EXOG_STATE_DIM}_{endog_state}"),
|
|
354
354
|
"shape": (None, len(exog_names)),
|
|
355
355
|
}
|
|
356
356
|
for endog_state, exog_names in self.exog_state_names.items()
|
|
@@ -399,10 +399,10 @@ class BayesianVARMAX(PyMCStateSpace):
|
|
|
399
399
|
coords.update({MA_PARAM_DIM: list(range(1, self.q + 1))})
|
|
400
400
|
|
|
401
401
|
if isinstance(self.exog_state_names, list):
|
|
402
|
-
coords[
|
|
402
|
+
coords[EXOG_STATE_DIM] = self.exog_state_names
|
|
403
403
|
elif isinstance(self.exog_state_names, dict):
|
|
404
404
|
for name, exog_names in self.exog_state_names.items():
|
|
405
|
-
coords[f"{
|
|
405
|
+
coords[f"{EXOG_STATE_DIM}_{name}"] = exog_names
|
|
406
406
|
|
|
407
407
|
return coords
|
|
408
408
|
|
|
@@ -428,12 +428,12 @@ class BayesianVARMAX(PyMCStateSpace):
|
|
|
428
428
|
del coord_map["x0"]
|
|
429
429
|
|
|
430
430
|
if isinstance(self.exog_state_names, list):
|
|
431
|
-
coord_map["beta_exog"] = (OBS_STATE_DIM,
|
|
431
|
+
coord_map["beta_exog"] = (OBS_STATE_DIM, EXOG_STATE_DIM)
|
|
432
432
|
elif isinstance(self.exog_state_names, dict):
|
|
433
433
|
# If each state has its own exogenous variables, each parameter needs it own dim, since we expect the
|
|
434
434
|
# dim labels to all be different (otherwise we'd be in the list case).
|
|
435
435
|
for name in self.exog_state_names.keys():
|
|
436
|
-
coord_map[f"beta_{name}"] = (f"{
|
|
436
|
+
coord_map[f"beta_{name}"] = (f"{EXOG_STATE_DIM}_{name}",)
|
|
437
437
|
|
|
438
438
|
return coord_map
|
|
439
439
|
|
|
@@ -12,7 +12,9 @@ MA_PARAM_DIM = "lag_ma"
|
|
|
12
12
|
SEASONAL_AR_PARAM_DIM = "seasonal_lag_ar"
|
|
13
13
|
SEASONAL_MA_PARAM_DIM = "seasonal_lag_ma"
|
|
14
14
|
ETS_SEASONAL_DIM = "seasonal_lag"
|
|
15
|
-
|
|
15
|
+
FACTOR_DIM = "factor"
|
|
16
|
+
ERROR_AR_PARAM_DIM = "error_lag_ar"
|
|
17
|
+
EXOG_STATE_DIM = "exogenous"
|
|
16
18
|
|
|
17
19
|
NEVER_TIME_VARYING = ["initial_state", "initial_state_cov", "a0", "P0"]
|
|
18
20
|
VECTOR_VALUED = ["initial_state", "state_intercept", "obs_intercept", "a0", "c", "d"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymc-extras
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: A home for new additions to PyMC, which may include unusual probability distribitions, advanced model fitting algorithms, or any code that may be inappropriate to include in the pymc repository, but may want to be made available to users.
|
|
5
5
|
Project-URL: Documentation, https://pymc-extras.readthedocs.io/
|
|
6
6
|
Project-URL: Repository, https://github.com/pymc-devs/pymc-extras.git
|
|
@@ -15,12 +15,14 @@ pymc_extras/distributions/transforms/__init__.py,sha256=FUp2vyRE6_2eUcQ_FVt5Dn0-
|
|
|
15
15
|
pymc_extras/distributions/transforms/partial_order.py,sha256=oEZlc9WgnGR46uFEjLzKEUxlhzIo2vrUUbBE3vYrsfQ,8404
|
|
16
16
|
pymc_extras/gp/__init__.py,sha256=sFHw2y3lEl5tG_FDQHZUonQ_k0DF1JRf0Rp8dpHmge0,745
|
|
17
17
|
pymc_extras/gp/latent_approx.py,sha256=cDEMM6H1BL2qyKg7BZU-ISrKn2HJe7hDaM4Y8GgQDf4,6682
|
|
18
|
-
pymc_extras/inference/__init__.py,sha256=
|
|
19
|
-
pymc_extras/inference/fit.py,sha256=
|
|
18
|
+
pymc_extras/inference/__init__.py,sha256=hI3yqfEVzoUNlCpL1z579F9EqM-NlPTzMfHj8IKY-xE,1009
|
|
19
|
+
pymc_extras/inference/fit.py,sha256=hNTqLms_mTdjfnCEVIHMcMiPZ3fkU3HEEkbt6LWWhLw,1443
|
|
20
|
+
pymc_extras/inference/dadvi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
pymc_extras/inference/dadvi/dadvi.py,sha256=eUMManCDwPNuyxPU5fETF6H5AkqB3a5VPtT7aCwyMJA,7978
|
|
20
22
|
pymc_extras/inference/laplace_approx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
-
pymc_extras/inference/laplace_approx/find_map.py,sha256=
|
|
22
|
-
pymc_extras/inference/laplace_approx/idata.py,sha256
|
|
23
|
-
pymc_extras/inference/laplace_approx/laplace.py,sha256=
|
|
23
|
+
pymc_extras/inference/laplace_approx/find_map.py,sha256=8ebnnHBVuFlAIAElkipT8njOvVSkuq0T28UMqhvQQPU,14446
|
|
24
|
+
pymc_extras/inference/laplace_approx/idata.py,sha256=--2QKYGb-o7uFUtTMrIxWGKfE-6uxJGbRONMZKc1HMk,13362
|
|
25
|
+
pymc_extras/inference/laplace_approx/laplace.py,sha256=nRbtpmlI4GY2h26slXBOvSJLufN5s40yvxYxPTF--i8,18808
|
|
24
26
|
pymc_extras/inference/laplace_approx/scipy_interface.py,sha256=qMxYodmmxaUGsOp1jc7HxBJc6L8NnmFT2Fd4UNNXu2c,8835
|
|
25
27
|
pymc_extras/inference/pathfinder/__init__.py,sha256=FhAYrCWNx_dCrynEdjg2CZ9tIinvcVLBm67pNx_Y3kA,101
|
|
26
28
|
pymc_extras/inference/pathfinder/importance_sampling.py,sha256=NwxepXOFit3cA5zEebniKdlnJ1rZWg56aMlH4MEOcG4,6264
|
|
@@ -48,9 +50,10 @@ pymc_extras/statespace/filters/distributions.py,sha256=-s1c5s2zm6FMc0UqKSrWnJzIF
|
|
|
48
50
|
pymc_extras/statespace/filters/kalman_filter.py,sha256=rgpgF4KZXX5M8yRwblrt2SEINKgoXgiKNfKkbl7ZU9Y,31464
|
|
49
51
|
pymc_extras/statespace/filters/kalman_smoother.py,sha256=5jlSZAPveJzD5Q8omnpn7Gb1jgElBMgixGR7H9zoH8U,4183
|
|
50
52
|
pymc_extras/statespace/filters/utilities.py,sha256=iwdaYnO1cO06t_XUjLLRmqb8vwzzVH6Nx1iyZcbJL2k,1584
|
|
53
|
+
pymc_extras/statespace/models/DFM.py,sha256=Ibwdq6SBs24nX9I1KVwVK8o8CTnw2Baw97giccPoYNc,37435
|
|
51
54
|
pymc_extras/statespace/models/ETS.py,sha256=08sbiuNvKdxcgKzS7jWj-z4jf-su73WFkYc8sKkGdEs,28538
|
|
52
|
-
pymc_extras/statespace/models/SARIMAX.py,sha256=
|
|
53
|
-
pymc_extras/statespace/models/VARMAX.py,sha256=
|
|
55
|
+
pymc_extras/statespace/models/SARIMAX.py,sha256=Y_s9g9-BlQp2U5yJHpLhO1tX_Jamis046voCRpvAl-M,25100
|
|
56
|
+
pymc_extras/statespace/models/VARMAX.py,sha256=Kc-46MuNcpI05TnHw7bhJXlYd0L8W_5Gh_Sh7Hnvoa4,25954
|
|
54
57
|
pymc_extras/statespace/models/__init__.py,sha256=DUwPrwfnz9AUbgZOFvZeUpWEw5FiPAK5X9x7vZrRWqY,319
|
|
55
58
|
pymc_extras/statespace/models/utilities.py,sha256=jpUYByAy6rMFP7l56uST1SEYchRa-clsFQ-At_1NLSw,27123
|
|
56
59
|
pymc_extras/statespace/models/structural/__init__.py,sha256=jvbczE1IeNkhW7gMQ2vF2BhhKHeYyfD90mV-Awko-Vs,811
|
|
@@ -64,7 +67,7 @@ pymc_extras/statespace/models/structural/components/measurement_error.py,sha256=
|
|
|
64
67
|
pymc_extras/statespace/models/structural/components/regression.py,sha256=27PRV9I64_VXIyjUi7pRr_gbk7sSI5DfJ4FBAbq5WCM,9856
|
|
65
68
|
pymc_extras/statespace/models/structural/components/seasonality.py,sha256=soXJIZ2xewUhSUb5s2MGnxvnQCcir7ZgbgkSr94xEvc,26987
|
|
66
69
|
pymc_extras/statespace/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
|
-
pymc_extras/statespace/utils/constants.py,sha256
|
|
70
|
+
pymc_extras/statespace/utils/constants.py,sha256=Dj1XpY_u5EliyStGrEFq5jmA5d_EMHCT4teaifxiTko,2577
|
|
68
71
|
pymc_extras/statespace/utils/coord_tools.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
72
|
pymc_extras/statespace/utils/data_tools.py,sha256=Tomur7d8WCKlMXUCrPqufqVTKUe_nLLCHdipsM9pmaI,6620
|
|
70
73
|
pymc_extras/utils/__init__.py,sha256=yxI9cJ7fCtVQS0GFw0y6mDGZIQZiK53vm3UNKqIuGSk,758
|
|
@@ -72,7 +75,7 @@ pymc_extras/utils/linear_cg.py,sha256=KkXhuimFsrKtNd_0By2ApxQQQNm5FdBtmDQJOVbLYk
|
|
|
72
75
|
pymc_extras/utils/model_equivalence.py,sha256=8QIftID2HDxD659i0RXHazQ-l2Q5YegCRLcDqb2p9Pc,2187
|
|
73
76
|
pymc_extras/utils/prior.py,sha256=QlWVr7uKIK9VncBw7Fz3YgaASKGDfqpORZHc-vz_9gQ,6841
|
|
74
77
|
pymc_extras/utils/spline.py,sha256=qGq0gcoMG5dpdazKFzG0RXkkCWP8ADPPXN-653-oFn4,4820
|
|
75
|
-
pymc_extras-0.
|
|
76
|
-
pymc_extras-0.
|
|
77
|
-
pymc_extras-0.
|
|
78
|
-
pymc_extras-0.
|
|
78
|
+
pymc_extras-0.5.0.dist-info/METADATA,sha256=QgyaW4YCVtVl6FpnEITD06o_Vrzek8RJYHY1pr2Rdok,18898
|
|
79
|
+
pymc_extras-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
80
|
+
pymc_extras-0.5.0.dist-info/licenses/LICENSE,sha256=WjiLhUKEysJvy5e9jk6WwFv9tmAPtnov1uJ6gcH1kIs,11720
|
|
81
|
+
pymc_extras-0.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|