File tree 1 file changed +9
-5
lines changed
pymc_experimental/statespace/models
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1148,6 +1148,7 @@ def __init__(
1148
1148
innovations : bool = True ,
1149
1149
name : Optional [str ] = None ,
1150
1150
state_names : Optional [list ] = None ,
1151
+ pop_state : bool = True ,
1151
1152
):
1152
1153
if name is None :
1153
1154
name = f"Seasonal[s={ season_length } ]"
@@ -1160,11 +1161,14 @@ def __init__(
1160
1161
)
1161
1162
state_names = state_names .copy ()
1162
1163
self .innovations = innovations
1163
-
1164
- # The first state doesn't get a coefficient, it is defined as -sum(state_coefs)
1165
- # TODO: Can I stash that information in the model somewhere so users don't have to know that?
1166
- state_0 = state_names .pop (0 )
1167
- k_states = season_length - 1
1164
+ self .pop_state = pop_state
1165
+
1166
+ if self .pop_state :
1167
+ # In traditional models, the first state isn't identified, so we can help out the user by automatically
1168
+ # discarding it.
1169
+ # TODO: Can this be stashed and reconstructed automatically somehow?
1170
+ state_names .pop (0 )
1171
+ k_states = season_length - 1
1168
1172
1169
1173
super ().__init__ (
1170
1174
name = name ,
You can’t perform that action at this time.
0 commit comments