8000 Apply suggestions from code review · scikit-learn/scikit-learn@89339b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 89339b4

Browse files
authored
Apply suggestions from code review
1 parent 5537b6b commit 89339b4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

sklearn/linear_model/_bayes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ class BayesianRidge(RegressorMixin, LinearModel):
3333
3434
Parameters
3535
----------
36-
max_iter : int, default=300
36+
max_iter : int, default=None
3737
Maximum number of iterations over the complete dataset before
38-
stopping independently of any early stopping criterion.
38+
stopping independently of any early stopping criterion. If `None`, it
39+
corresponds to `max_iter=300`.
3940
4041
.. versionchanged:: 1.3
4142

sklearn/linear_model/tests/test_bayes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ def test_dtype_correctness(Estimator):
294294
np.testing.assert_allclose(coef_32, coef_64, rtol=1e-4)
295295

296296

297+
# TODO(1.5) remove
297298
def test_bayesian_ridge_n_iter_deprecated():
298-
# check the deprecation warning of n_iter
299-
# TODO(1.5) remove
299+
"""Check the deprecation warning of `n_iter`."""
300300
depr_msg = (
301301
"'n_iter' was renamed to 'max_iter' in version 1.3 and will be removed in 1.5"
302302
)
@@ -307,8 +307,9 @@ def test_bayesian_ridge_n_iter_deprecated():
307307
est.fit(X, y)
308308

309309

310+
# TODO(1.5) remove
310311
def test_bayesian_ridge_max_iter_and_n_iter_both_set():
311-
# TODO(1.5) remove
312+
"""Check that we raise an error if both `max_iter` and `n_iter` are set."""
312313
"""Check that a ValueError is raised when both `max_iter` and `n_iter` are set."""
313314
err_msg = (
314315
"Both `n_iter` and `max_iter` attributes were set. Attribute"

0 commit comments

Comments
 (0)
0