From 8c1924f71f3e789c0f40c6691418895f848e1f0a Mon Sep 17 00:00:00 2001 From: sentient07 Date: Thu, 9 Mar 2017 23:59:31 +0100 Subject: [PATCH] Removed wrong warning message about alpha in ElasticNet --- sklearn/linear_model/cd_fast.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/linear_model/cd_fast.pyx b/sklearn/linear_model/cd_fast.pyx index c56d7975fc6e6..6641a8f966287 100644 --- a/sklearn/linear_model/cd_fast.pyx +++ b/sklearn/linear_model/cd_fast.pyx @@ -217,8 +217,8 @@ def enet_coordinate_descent(np.ndarray[floating, ndim=1] w, cdef floating *R_data = R.data cdef floating *XtA_data = XtA.data - if alpha == 0: - warnings.warn("Coordinate descent with alpha=0 may lead to unexpected" + if alpha == 0 and beta == 0: + warnings.warn("Coordinate descent with no regularization may lead to unexpected" " results and is discouraged.") with nogil: