Skip to content

docs: remove the unavailable LogisticRegression normal_equation strategy #753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bigframes/ml/linear_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions tests/system/large/ml/test_linear_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down