@@ -89,7 +89,7 @@ def _data_setter(self, X) -> None:
89
89
This method is used internally to register new data for the model for
90
90
prediction.
91
91
"""
92
- with self . model :
92
+ with self :
93
93
pm .set_data ({"X" : X })
94
94
95
95
def fit (self , X , y , coords : Optional [Dict [str , Any ]] = None ) -> None :
@@ -105,7 +105,7 @@ def fit(self, X, y, coords: Optional[Dict[str, Any]] = None) -> None:
105
105
random_seed = None
106
106
107
107
self .build_model (X , y , coords )
108
- with self . model :
108
+ with self :
109
109
self .idata = pm .sample (** self .sample_kwargs )
110
110
self .idata .extend (pm .sample_prior_predictive (random_seed = random_seed ))
111
111
self .idata .extend (
@@ -125,7 +125,7 @@ def predict(self, X):
125
125
"""
126
126
127
127
self ._data_setter (X )
128
- with self . model : # sample with new input data
128
+ with self : # sample with new input data
129
129
post_pred = pm .sample_posterior_predictive (
130
130
self .idata , var_names = ["y_hat" , "mu" ], progressbar = False
131
131
)
@@ -354,7 +354,7 @@ def fit(self, X, Z, y, t, coords, priors):
354
354
distributions.
355
355
"""
356
356
self .build_model (X , Z , y , t , coords , priors )
357
- with self . model :
357
+ with self :
358
358
self .idata = pm .sample (** self .sample_kwargs )
359
359
self .idata .extend (pm .sample_prior_predictive ())
360
360
self .idata .extend (
0 commit comments