skglm
skglm copied to clipboard
FEAT add sparse_coef_ property for ElasticNet and Lasso
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)