@@ -171,13 +171,13 @@ def _validate_params(self, base_estimator, labeled, unlabeled):
171171 """
172172 if not isinstance (labeled , pd .DataFrame ):
173173 raise AttributeError (
174- "Labeled samples object needs to be a " " Pandas DataFrame. Not a " ,
174+ "Labeled samples object needs to be a Pandas DataFrame. Not a " ,
175175 type (labeled ),
176176 )
177177 if not isinstance (unlabeled , pd .DataFrame ):
178178 raise AttributeError (
179- "Unlabeled samples object needs to be a " " Pandas DataFrame. Not a " ,
180- type (unlabeled ),
179+ "Unlabeled samples object needs to be a Pandas DataFrame. "
180+ "Not a " , type (unlabeled ),
181181 )
182182 if labeled .shape [1 ] != unlabeled .shape [1 ] + 1 :
183183 raise ValueError (
@@ -221,7 +221,8 @@ def _robust_self_training(self, iteration, l_i, u_i, oob_i, d_class_i):
221221
222222 y_pred = self .ensemble [iteration ].predict (oob_i .iloc [:, :- 1 ])
223223 best_error_i = f1_score (
224- y_true = np .ravel (oob_i .iloc [:, - 1 :]), y_pred = y_pred , average = "weighted"
224+ y_true = np .ravel (oob_i .iloc [:, - 1 :]), y_pred = y_pred ,
225+ average = "weighted" ,
225226 )
226227 best_c_i = self .ensemble [iteration ]
227228
@@ -269,7 +270,8 @@ def _robust_self_training(self, iteration, l_i, u_i, oob_i, d_class_i):
269270
270271 y_pred = self .ensemble [iteration ].predict (oob_i .iloc [:, :- 1 ])
271272 current_error_i = f1_score (
272- y_true = np .ravel (oob_i .iloc [:, - 1 :]), y_pred = y_pred , average = "weighted"
273+ y_true = np .ravel (oob_i .iloc [:, - 1 :]), y_pred = y_pred ,
274+ average = "weighted" ,
273275 )
274276
275277 if current_error_i < best_error_i :
@@ -313,7 +315,7 @@ def predict(self, samples):
313315 samples = samples .to_numpy ()
314316 if len (self .ensemble ) == 0 :
315317 raise InterruptedError (
316- "To be able to predict, fitting is needed " " to be already done."
318+ "To be able to predict, fitting is needed to be already done."
317319 )
318320 c_pred = []
319321 for classifier in self .ensemble :
0 commit comments