@@ -187,14 +187,17 @@ def default_sampler_config(self) -> Dict:
187
187
raise NotImplementedError
188
188
189
189
@abstractmethod
190
- def generate_and_preprocess_model_data (
190
+ def _generate_and_preprocess_model_data (
191
191
self , X : Union [pd .DataFrame , pd .Series ], y : pd .Series
192
192
) -> None :
193
193
"""
194
194
Applies preprocessing to the data before fitting the model.
195
195
if validate is True, it will check if the data is valid for the model.
196
196
sets self.model_coords based on provided dataset
197
197
198
+ In case of optional parameters being passed into the model, this method should implement the conditional
199
+ logic responsible for correct handling of the optional parameters, and including them into the dataset.
200
+
198
201
Parameters:
199
202
X : array, shape (n_obs, n_features)
200
203
y : array, shape (n_obs,)
@@ -203,10 +206,9 @@ def generate_and_preprocess_model_data(
203
206
--------
204
207
>>> @classmethod
205
208
>>> def generate_and_preprocess_model_data(self, X, y):
206
- >>> x = np.linspace(start=1, stop=50, num=100)
207
- >>> y = 5 * x + 3 + np.random.normal(0, 1, len(x)) * np.random.rand(100)*10 + np.random.rand(100)*6.4
208
- >>> X = pd.DataFrame(x, columns=['x'])
209
- >>> y = pd.Series(y, name='y')
209
+ coords = {
210
+ 'x_dim': X.dim_variable,
211
+ } #only include if applicable for your model
210
212
>>> self.X = X
211
213
>>> self.y = y
212
214
0 commit comments