diff --git a/bigframes/ml/linear_model.py b/bigframes/ml/linear_model.py index 32168e9a34..0816ef9b24 100644 --- a/bigframes/ml/linear_model.py +++ b/bigframes/ml/linear_model.py @@ -195,7 +195,7 @@ def __init__( self, *, optimize_strategy: Literal[ - "auto_strategy", "batch_gradient_descent", "normal_equation" + "auto_strategy", "batch_gradient_descent" ] = "auto_strategy", fit_intercept: bool = True, l1_reg: Optional[float] = None, diff --git a/tests/system/large/ml/test_linear_model.py b/tests/system/large/ml/test_linear_model.py index eaf666fd50..0cc9fc5353 100644 --- a/tests/system/large/ml/test_linear_model.py +++ b/tests/system/large/ml/test_linear_model.py @@ -192,8 +192,6 @@ def test_logistic_regression_customized_params_fit_score( f"{dataset_id}.temp_configured_logistic_reg_model" in reloaded_model._bqml_model.model_name ) - # TODO(garrettwu) optimize_strategy isn't logged in BQML - # assert reloaded_model.optimize_strategy == "BATCH_GRADIENT_DESCENT" assert reloaded_model.fit_intercept is False assert reloaded_model.class_weight == "balanced" assert reloaded_model.calculate_p_values is False diff --git a/third_party/bigframes_vendored/sklearn/linear_model/_logistic.py b/third_party/bigframes_vendored/sklearn/linear_model/_logistic.py index 49198eb9bd..c52a37018c 100644 --- a/third_party/bigframes_vendored/sklearn/linear_model/_logistic.py +++ b/third_party/bigframes_vendored/sklearn/linear_model/_logistic.py @@ -26,8 +26,10 @@ class LogisticRegression(LinearClassifierMixin, BaseEstimator): Args: optimize_strategy (str, default "auto_strategy"): The strategy to train logistic regression models. Possible values are - "auto_strategy", "batch_gradient_descent", "normal_equation". Default - to "auto_strategy". + "auto_strategy" and "batch_gradient_descent". The two are equilevant since + "auto_strategy" will fall back to "batch_gradient_descent". The API is kept + for consistency. + Default to "auto_strategy". fit_intercept (default True): Default True. Specifies if a constant (a.k.a. bias or intercept) should be added to the decision function.