Skip to content

Commit ea5d367

Browse files
authored
docs: remove LogisticRegression normal_equation strategy (#753)
1 parent 39d7013 commit ea5d367

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bigframes/ml/linear_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def __init__(
195195
self,
196196
*,
197197
optimize_strategy: Literal[
198-
"auto_strategy", "batch_gradient_descent", "normal_equation"
198+
"auto_strategy", "batch_gradient_descent"
199199
] = "auto_strategy",
200200
fit_intercept: bool = True,
201201
l1_reg: Optional[float] = None,

tests/system/large/ml/test_linear_model.py

-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ def test_logistic_regression_customized_params_fit_score(
192192
f"{dataset_id}.temp_configured_logistic_reg_model"
193193
in reloaded_model._bqml_model.model_name
194194
)
195-
# TODO(garrettwu) optimize_strategy isn't logged in BQML
196-
# assert reloaded_model.optimize_strategy == "BATCH_GRADIENT_DESCENT"
197195
assert reloaded_model.fit_intercept is False
198196
assert reloaded_model.class_weight == "balanced"
199197
assert reloaded_model.calculate_p_values is False

third_party/bigframes_vendored/sklearn/linear_model/_logistic.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ class LogisticRegression(LinearClassifierMixin, BaseEstimator):
2626
Args:
2727
optimize_strategy (str, default "auto_strategy"):
2828
The strategy to train logistic regression models. Possible values are
29-
"auto_strategy", "batch_gradient_descent", "normal_equation". Default
30-
to "auto_strategy".
29+
"auto_strategy" and "batch_gradient_descent". The two are equilevant since
30+
"auto_strategy" will fall back to "batch_gradient_descent". The API is kept
31+
for consistency.
32+
Default to "auto_strategy".
3133
fit_intercept (default True):
3234
Default True. Specifies if a constant (a.k.a. bias or intercept)
3335
should be added to the decision function.

0 commit comments

Comments
 (0)