You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -30,7 +30,7 @@ In this case-study we are going to forecast the paths of hurricanes by applying
30
30
As a brief introduction to SSMs the general idea is that we have two equations that define our system.<br>
31
31
The state equation [1] and the observation equation [2]. $$x_{t+1} = A_{t}x_{t} + c_{t} + R_{t}\epsilon_{t} [1]$$$$y_{t} = Z_{t}x_{t} + d_{t} + \eta_{t} [2]$$
32
32
33
-
The process/state covariance is given by $\eta_{t} \sim N(0, Q_{t})$ where $Q_{t}$ is the process/state noise and the observation/measurement covariance is given by $\epsilon_{t} \sim N(0, H_{t})$ where $H_{t}$ describe the noise in the measurement device or procedure.
33
+
The process/state covariance is given by $\epsilon_{t} \sim N(0, Q_{t})$ where $Q_{t}$ is the process/state noise and the observation/measurement covariance is given by $\eta_{t} \sim N(0, H_{t})$ where $H_{t}$ describe the noise in the measurement device or procedure.
34
34
35
35
We have the following matrices:
36
36
|State Equation variables|Definition|
@@ -475,7 +475,7 @@ class SimpleSSM(PyMCStateSpace):
The last 2 columns we added indicates what states our exogenous variable affects, and the last 2 rows indicates that the processes of our exogenous parameters are constant.
800
800
801
-
$$R = \begin{bmatrix} 1&0&0&0&0&0&0&0\\
802
-
0&1&0&0&0&0&0&0 \\
803
-
0&0&1&0&0&0&0&0 \\
804
-
0&0&0&1&0&0&0&0 \\
805
-
0&0&0&0&1&0&0&0 \\
806
-
0&0&0&0&0&1&0&0 \\
807
-
0&0&0&0&0&0&0&0 \\
808
-
0&0&0&0&0&0&0&0
801
+
$$R = \begin{bmatrix} 1&0&0&0&0&0 \\
802
+
0&1&0&0&0&0 \\
803
+
0&0&1&0&0&0 \\
804
+
0&0&0&1&0&0 \\
805
+
0&0&0&0&1&0 \\
806
+
0&0&0&0&0&1 \\
807
+
0&0&0&0&0&0 \\
808
+
0&0&0&0&0&0
809
809
\end{bmatrix}$$
810
810
811
811
The addition to the R matrix imply that the exogenous parameters do not exhibit any process noise.
@@ -894,7 +894,7 @@ class ExogenousSSM(PyMCStateSpace):
894
894
[0, (delta_t**2) / 2, 0, delta_t, 0, 1],
895
895
]
896
896
)
897
-
self.ssm["obs_cov", :, :] = np.eye(2) * 0.1
897
+
self.ssm["obs_cov", :, :] = np.eye(2) * 0.5
898
898
899
899
@property
900
900
def data_names(self) -> list[str]:
@@ -917,7 +917,7 @@ class ExogenousSSM(PyMCStateSpace):
@@ -948,7 +948,7 @@ class ExogenousSSM(PyMCStateSpace):
948
948
# pymc_extras.statespace.utils.constants
949
949
950
950
return {
951
-
"x0": (ALL_STATE_DIM,),
951
+
"x0": (self.k_states - self.k_exog,),
952
952
"P0": (ALL_STATE_DIM, ALL_STATE_AUX_DIM),
953
953
"acceleration_noise": (1,),
954
954
"beta_wind": ("wind_dims",),
@@ -1027,7 +1027,226 @@ with pm.Model(coords=exog_ssm.coords) as exogenous:
1027
1027
As we suspected, the maximum sustained wind does not add any information to our model concerning the path or the speed that the hurricane travels. We confirm our hypothesis by looking at our beta parameter distributions; which are centered at zero.
0 commit comments