A sparse linear model uses many zero coefficients alongside nonzero ones. A zero weight removes that feature’s contribution, producing a leaner and more interpretable model. section 9.1.3
Read the learned coefficients as feature effects:
- In logistic regression, convert weight wi to odds with e^wi: positive weights increase positive-class odds, negative weights decrease them, and zero weights have no effect. section 9.1.3
- Use L1 regularization, including LASSO or elastic net, to encourage as many coefficients as possible to become zero. section 9.4.1
- Scale features before interpreting coefficients; otherwise variables with larger numerical ranges can dominate weight learning. section 9.1.3
Breast-cancer diagnosis
Standardize the breast-cancer data, fit scikit-learn logistic regression with an L1 penalty, and inspect the coefficients. Positive, negative, and zero weights respectively show increased odds, decreased odds, and no contribution to diagnosis.
