Skip to content

Commit

Permalink
Merge pull request #3993 from nzw0301/resolve-deprecated-message-from…
Browse files Browse the repository at this point in the history
…-sklearn

Use `log_loss` instead of deprecated `log` since `sklearn` 1.1
  • Loading branch information
contramundum53 committed Sep 12, 2022
2 parents 45b0a1c + 98c9fee commit 09e3dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorial/20_recipes/006_user_defined_pruner.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def objective(trial):
iris.data, iris.target, train_size=100, test_size=50, random_state=0
)

loss = trial.suggest_categorical("loss", ["hinge", "log", "perceptron"])
loss = trial.suggest_categorical("loss", ["hinge", "log_loss", "perceptron"])
alpha = trial.suggest_float("alpha", 0.00001, 0.001, log=True)
clf = SGDClassifier(loss=loss, alpha=alpha, random_state=0)
score = 0
Expand Down

0 comments on commit 09e3dd9

Please sign in to comment.