diff --git a/examples/pytorch/metapath2vec/test.py b/examples/pytorch/metapath2vec/test.py index 7ed86685aef5..3134c386d283 100644 --- a/examples/pytorch/metapath2vec/test.py +++ b/examples/pytorch/metapath2vec/test.py @@ -98,9 +98,9 @@ random_state=0, solver="lbfgs" ).fit(venue_training, venue_label) y_pred_venue = clf_venue.predict(venue_testing) - clf_author = LogisticRegression( - random_state=0, solver="lbfgs" - ).fit(author_training, author_label) + clf_author = LogisticRegression(random_state=0, solver="lbfgs").fit( + author_training, author_label + ) y_pred_author = clf_author.predict(author_testing) macro_average_venue += f1_score( venue_true, y_pred_venue, average="macro" diff --git a/examples/pytorch/node2vec/model.py b/examples/pytorch/node2vec/model.py index 2dce23225d3e..282799bbe1fb 100644 --- a/examples/pytorch/node2vec/model.py +++ b/examples/pytorch/node2vec/model.py @@ -190,9 +190,9 @@ def evaluate(self, x_train, y_train, x_val, y_val): x_train, y_train = x_train.cpu().numpy(), y_train.cpu().numpy() x_val, y_val = x_val.cpu().numpy(), y_val.cpu().numpy() - lr = LogisticRegression( - solver="lbfgs", max_iter=150 - ).fit(x_train, y_train) + lr = LogisticRegression(solver="lbfgs", max_iter=150).fit( + x_train, y_train + ) return lr.score(x_val, y_val)