From 4bc025a27b8f6e177cf0e6acabea2b0f08abed45 Mon Sep 17 00:00:00 2001 From: Patrick Olden Date: Thu, 23 Nov 2017 10:25:14 +0000 Subject: [PATCH 1/2] update sag solver docs (#10150) --- sklearn/linear_model/sag.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sklearn/linear_model/sag.py b/sklearn/linear_model/sag.py index 9bf807a18238c..c28aadcfa391b 100644 --- a/sklearn/linear_model/sag.py +++ b/sklearn/linear_model/sag.py @@ -131,7 +131,12 @@ def sag_solver(X, y, sample_weight=None, loss='log', alpha=1., beta=0., *loss='multinomial'* alpha : float, optional - Constant that multiplies the regularization term. Defaults to 1. + L2 regularization term in the objective function + (0.5 * alpha * || W ||_F^2). Defaults to 1. + + beta : float, optional + L1 regularization term in the objective function (beta * || W ||_1). + Only applied if is_saga set to True. Defaults to 0. max_iter : int, optional The max number of passes over the training data if the stopping From 11211be476144614d6ce4c4db9b0756e41cc6cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 23 Nov 2017 13:02:08 +0100 Subject: [PATCH 2/2] tweak --- sklearn/linear_model/sag.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sklearn/linear_model/sag.py b/sklearn/linear_model/sag.py index c28aadcfa391b..39b817da1b0e2 100644 --- a/sklearn/linear_model/sag.py +++ b/sklearn/linear_model/sag.py @@ -132,11 +132,12 @@ def sag_solver(X, y, sample_weight=None, loss='log', alpha=1., beta=0., alpha : float, optional L2 regularization term in the objective function - (0.5 * alpha * || W ||_F^2). Defaults to 1. + ``(0.5 * alpha * || W ||_F^2)``. Defaults to 1. beta : float, optional - L1 regularization term in the objective function (beta * || W ||_1). - Only applied if is_saga set to True. Defaults to 0. + L1 regularization term in the objective function + ``(beta * || W ||_1)``. Only applied if ``is_saga`` is set to True. + Defaults to 0. max_iter : int, optional The max number of passes over the training data if the stopping