@@ -160,20 +160,6 @@ def fit(self, X: modALinput, y: modALinput, bootstrap: bool = False, **fit_kwarg
160
160
self .X_training , self .y_training = X , y
161
161
return self ._fit_to_known (bootstrap = bootstrap , ** fit_kwargs )
162
162
163
- def score (self , X : modALinput , y : modALinput , ** score_kwargs ) -> Any :
164
- """
165
- Interface for the score method of the predictor.
166
-
167
- Args:
168
- X: The samples for which prediction accuracy is to be calculated.
169
- y: Ground truth labels for X.
170
- **score_kwargs: Keyword arguments to be passed to the .score() method of the predictor.
171
-
172
- Returns:
173
- The score of the predictor.
174
- """
175
- return self .estimator .score (X , y , ** score_kwargs )
176
-
177
163
def teach (self , X : modALinput , y : modALinput , bootstrap : bool = False , only_new : bool = False , ** fit_kwargs ) -> None :
178
164
"""
179
165
Adds X and y to the known training data and retrains the predictor with the augmented dataset.
@@ -245,26 +231,6 @@ def fit(self, X: modALinput, y: modALinput, bootstrap: bool = False, **fit_kwarg
245
231
"""
246
232
return self ._fit_on_new (X , y , bootstrap = bootstrap , ** fit_kwargs )
247
233
248
- def score (self , X : modALinput , y : modALinput ) -> Any :
249
- """
250
- Interface for the score method of the predictor.
251
-
252
- Args:
253
- X: The samples for which prediction accuracy is to be calculated.
254
- y: Ground truth labels for X.
255
-
256
- Returns:
257
- The score of the predictor.
258
- """
259
- """
260
- sklearn does only accept tensors of different dim for X and Y, if we use
261
- Multilabel classifiaction. Using tensors of different sizes for more complex models (e.g. Transformers)
262
- requires to bypass the sklearn checks by directly calling the NeuralNets infer() function.
263
- """
264
- prediction = self .estimator .infer (X )
265
- criterion = self .estimator .criterion ()
266
- return criterion (prediction , y ).item ()
267
-
268
234
def teach (self , X : modALinput , y : modALinput , warm_start : bool = True , bootstrap : bool = False , ** fit_kwargs ) -> None :
269
235
"""
270
236
Adds X and y to the known training data and retrains the predictor with the augmented dataset.
0 commit comments