Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ETS model #369

Merged
merged 21 commits into from
Oct 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Draft example notebook
jessegrabowski committed Oct 13, 2024
commit eb500fe0155fcdfbd8b96b4cebec2e0f24e7e2cd
2 changes: 1 addition & 1 deletion pymc_experimental/statespace/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pymc_experimental.statespace.core.compile import compile_statespace
from pymc_experimental.statespace.models import structural
from pymc_experimental.statespace.models.ETS import BayesianETS
from pymc_experimental.statespace.models.SARIMAX import BayesianSARIMA
from pymc_experimental.statespace.models.VARMAX import BayesianVARMAX
from pymc_experimental.statespace.utils import compile_statespace

__all__ = ["structural", "BayesianSARIMA", "BayesianVARMAX", "BayesianETS", "compile_statespace"]
3 changes: 2 additions & 1 deletion pymc_experimental/statespace/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pymc_experimental.statespace.core.compile import compile_statespace
from pymc_experimental.statespace.core.representation import PytensorRepresentation
from pymc_experimental.statespace.core.statespace import PyMCStateSpace

__all__ = ["PytensorRepresentation", "PyMCStateSpace"]
__all__ = ["PytensorRepresentation", "PyMCStateSpace", "compile_statespace"]
2 changes: 1 addition & 1 deletion pymc_experimental/statespace/core/statespace.py
Original file line number Diff line number Diff line change
@@ -461,7 +461,7 @@ def add_default_priors(self) -> None:

def make_and_register_variable(
self, name, shape: int | tuple[int, ...] | None = None, dtype=floatX
) -> Variable:
) -> pt.TensorVariable:
"""
Helper function to create a pytensor symbolic variable and register it in the _name_to_variable dictionary

4 changes: 2 additions & 2 deletions pymc_experimental/statespace/models/SARIMAX.py
Original file line number Diff line number Diff line change
@@ -334,8 +334,8 @@ def param_dims(self):
"seasonal_ma_params": (SEASONAL_MA_PARAM_DIM,),
}
if self.k_endog == 1:
coord_map["sigma_state"] = ()
coord_map["sigma_obs"] = ()
coord_map["sigma_state"] = None
coord_map["sigma_obs"] = None
if not self.measurement_error:
del coord_map["sigma_obs"]
if self.p == 0:
3 changes: 0 additions & 3 deletions pymc_experimental/statespace/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from pymc_experimental.statespace.utils.compile import compile_statespace

__all__ = ["compile_statespace"]