Skip to content

Commit ce03e54

Browse files
add dual_gap_ attribute (scikit-learn#17882)
1 parent 0efd08b commit ce03e54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sklearn/linear_model/_coordinate_descent.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,10 @@ class Lasso(ElasticNet):
977977
coef_ : ndarray of shape (n_features,) or (n_targets, n_features)
978978
parameter vector (w in the cost function formula)
979979
980+
dual_gap_ : float or ndarray of shape (n_targets,)
981+
Given param alpha, the dual gaps at the end of the optimization,
982+
same shape as each observation of y.
983+
980984
sparse_coef_ : sparse matrix of shape (n_features, 1) or \
981985
(n_targets, n_features)
982986
``sparse_coef_`` is a readonly property derived from ``coef_``

0 commit comments

Comments
 (0)