Chapter 5 Quiz: Linear & Logistic Regression

Chapter 4: Linear Models — Regression and Classification

Learning objectives

  • Test your understanding of linear regression, logistic regression, and scikit-learn implementation

This quiz covers both the lecture material and lab exercises from Chapter 5.

Key Concepts Review

  • Linear Regression: y^=wTx+b\hat{y} = \mathbf{w}^T\mathbf{x} + b. MSE cost. Normal equation: w=(XTX)1XTy\mathbf{w} = (X^TX)^{-1}X^Ty.
  • Logistic Regression: Sigmoid σ(z)=11+ez\sigma(z) = \frac{1}{1+e^{-z}}. Binary cross-entropy loss.
  • Evaluation: MSE, MAE, R2=1SSres/SStotR^2 = 1 - SS_{res}/SS_{tot}. For classification: precision, recall, F1.
  • Regularization: Ridge (L2) shrinks weights; Lasso (L1) drives some to zero.

References

  • Hastie, T., Tibshirani, R., Friedman, J. (2009). The Elements of Statistical Learning (2nd ed.), ch. 3 & 4. Springer.
  • James, G., Witten, D., Hastie, T., Tibshirani, R. (2021). An Introduction to Statistical Learning (2nd ed.), ch. 3 & 4. Springer.
  • Pedregosa, F., et al. (2011). Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.