From bcad7b208ee42b2149c4feb8d87744b22a0311fe Mon Sep 17 00:00:00 2001 From: Eliandro Melo <99908664+ERJLM@users.noreply.github.com> Date: Tue, 21 Jan 2025 04:02:16 +0100 Subject: [PATCH] Fix 'learner__loss' value in param_grid of basis.py Updated the value of the 'learner__loss' key in the param_grid of basis.py. The previous value ('log') was incorrect, and was leading to the following error: "The 'loss' parameter of SGDClassifier must be a str among {'hinge', 'modified_huber', 'huber', 'squared_error', 'epsilon_insensitive', 'squared_epsilon_insensitive', 'perceptron', 'squared_hinge', 'log_loss'}. Got 'log' instead." The current value ('log_loss') works as expected. --- src/jenga/basis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jenga/basis.py b/src/jenga/basis.py index 806ad8d..d56912c 100644 --- a/src/jenga/basis.py +++ b/src/jenga/basis.py @@ -300,7 +300,7 @@ def _get_pipeline_grid_scorer_tuple( """ param_grid = { - 'learner__loss': ['log'], + 'learner__loss': ['log_loss'], 'learner__penalty': ['l2'], 'learner__alpha': [0.00001, 0.0001, 0.001, 0.01] } @@ -419,7 +419,7 @@ def _get_pipeline_grid_scorer_tuple( """ param_grid = { - 'learner__loss': ['log'], + 'learner__loss': ['log_loss'], 'learner__penalty': ['l2'], 'learner__alpha': [0.00001, 0.0001, 0.001, 0.01] }