Skip to content

Commit 19dcd39

Browse files
Format code with yapf, black, autopep8 and isort
1 parent 806c8fa commit 19dcd39

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

semisupervised/CoTraining.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def __init__(
8787
self.h1, self.h2 = configs
8888
except ValueError:
8989
raise AttributeError(
90-
"Classifiers and/or params were not correctly passed."
91-
)
90+
"Classifiers and/or params were not correctly passed.")
9291

9392
def fit(self, samples, y):
9493
"""

semisupervised/DemocraticCoLearning.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ def __init__(
9595
self.h1, self.h2, self.h3 = configs
9696
except ValueError:
9797
raise AttributeError(
98-
"Classifiers and/or params were not correctly passed."
99-
)
98+
"Classifiers and/or params were not correctly passed.")
10099

101100
def fit(self, samples, y):
102101
"""

semisupervised/TriTraining.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def __init__(
8888
self.hj, self.hk, self.hi = configs
8989
except ValueError:
9090
raise AttributeError(
91-
"Classifiers and/or params were not correctly passed."
92-
)
91+
"Classifiers and/or params were not correctly passed.")
9392

9493
self.random_state = (
9594
random_state

semisupervised/ensemble/_RESSEL.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ def _validate_params(self, base_estimator, labeled, unlabeled):
176176
)
177177
if not isinstance(unlabeled, pd.DataFrame):
178178
raise AttributeError(
179-
"Unlabeled samples object needs to be a Pandas DataFrame. "
180-
"Not a ", type(unlabeled),
179+
"Unlabeled samples object needs to be a Pandas DataFrame. " "Not a ",
180+
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,
224+
y_true=np.ravel(oob_i.iloc[:, -1:]),
225+
y_pred=y_pred,
225226
average="weighted",
226227
)
227228
best_c_i = self.ensemble[iteration]
@@ -270,7 +271,8 @@ def _robust_self_training(self, iteration, l_i, u_i, oob_i, d_class_i):
270271

271272
y_pred = self.ensemble[iteration].predict(oob_i.iloc[:, :-1])
272273
current_error_i = f1_score(
273-
y_true=np.ravel(oob_i.iloc[:, -1:]), y_pred=y_pred,
274+
y_true=np.ravel(oob_i.iloc[:, -1:]),
275+
y_pred=y_pred,
274276
average="weighted",
275277
)
276278

0 commit comments

Comments
 (0)