3.8 Expectation, Variance, and Covariance . . . . . . . . . . . . . . . . . . . 41
3.9 Information Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.10 Common Probability Distributions . . . . . . . . . . . . . . . . . . . . . 44
3.10.1 Bernoulli Distribution . . . . . . . . . . . . . . . . . . . . . . . . 44
3.10.2 Multinoulli Distribution . . . . . . . . . . . . . . . . . . . . . . . 44
3.10.3 Gaussian Distribution . . . . . . . . . . . . . . . . . . . . . . . . 45
3.10.4 Dirac Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.10.5 Mixtures of Distributions and Gaussian Mixture . . . . . . . . . 48
3.11 Useful Properties of Common Functions . . . . . . . . . . . . . . . . . . 48
3.12 Bayes’ Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.13 Technical Details of Continuous Variables . . . . . . . . . . . . . . . . . 51
3.14 Example: Naive Bayes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4 Numerical Computation 56
4.1 Overflow and Underflow . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.2 Poor Conditioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3 Gradient-Based Optimization . . . . . . . . . . . . . . . . . . . . . . . . 58
4.4 Constrained Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.5 Example: Linear Least Squares . . . . . . . . . . . . . . . . . . . . . . . 68
5 Machine Learning Basics 70
5.1 Learning Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.1.1 The Task, T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.1.2 The Performance Measure, P . . . . . . . . . . . . . . . . . . . . 72
5.1.3 The Experience, E . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.2 Example: Linear Regression . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.3 Generalization, Capacity, Overfitting and Underfitting . . . . . . . . . . 76
5.3.1 Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.3.2 Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.3.3 Occam’s Razor, Underfitting and Overfitting . . . . . . . . . . . 78
5.4 Estimating and Monitoring Generalization Error . . . . . . . . . . . . . 81
5.5 Estimators, Bias, and Variance . . . . . . . . . . . . . . . . . . . . . . . 83
5.5.1 Point Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.5.2 Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.5.3 Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.5.4 Trading off Bias and Variance and the Mean Squared Error . . . 85
5.5.5 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.6 Maximum Likelihood Estimation . . . . . . . . . . . . . . . . . . . . . . 87
5.6.1 Properties of Maximum Likelihood . . . . . . . . . . . . . . . . . 87
5.6.2 Regularized Likelihood . . . . . . . . . . . . . . . . . . . . . . . . 87
5.7 Bayesian Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.8 Supervised Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.8.1 Estimating Conditional Expectation by Minimizing Squared Error 88
2