skglm icon indicating copy to clipboard operation
skglm copied to clipboard

FEAT add sparse_coef_ property for ElasticNet and Lasso

Open mathurinm opened this issue 10 months ago • 0 comments

Sklearn ElasticNet (and its Lasso which inherits from it) exposes a sparse_coef_ attribute after fitting : https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/linear_model/_coordinate_descent.py#L1122

we don't

@Badr-MOUFAD suggested we implement one for compatibility reasons ; we never had any complaint about it but if we claim 100% compat with sklearn, I agree we need it. sklearn LogisticRegression doesn't have it, so I'd just implement it for our Lasso and ElasticNet (not other estimators)

mathurinm avatar Apr 02 '24 07:04 mathurinm