ii CONTENTS
II The Classic Regression Models 23
4 Notation 24
4.1 Notation for Structured Data . . . . . . . . . . . . . . . . . . 24
5 Linear Regression 26
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Coefficient Estimation: Bayesian Formulation . . . . . . . . . 29
5.2.1 Generic setup . . . . . . . . . . . . . . . . . . . . . . . 29
5.2.2 Ideal Gaussian World . . . . . . . . . . . . . . . . . . 30
5.3 Coefficient Estimation: Optimization Formulation . . . . . . 33
5.3.1 The least squares problem and the singular value de-
composition . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3.2 Overfitting examples . . . . . . . . . . . . . . . . . . . 39
5.3.3 L
2
regularization . . . . . . . . . . . . . . . . . . . . . 43
5.3.4 Choosing the regularization parameter . . . . . . . . . 44
5.3.5 Numerical techniques . . . . . . . . . . . . . . . . . . 46
5.4 Variable Scaling and Transformations . . . . . . . . . . . . . 47
5.4.1 Simple variable scaling . . . . . . . . . . . . . . . . . . 48
5.4.2 Linear transformations of variables . . . . . . . . . . . 51
5.4.3 Nonlinear transformations and segmentation . . . . . 52
5.5 Error Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.6 End Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6 Logistic Regression 55
6.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.1.1 Presenter’s viewpoint . . . . . . . . . . . . . . . . . . 55
6.1.2 Classical viewpoint . . . . . . . . . . . . . . . . . . . . 56
6.1.3 Data generating viewpoint . . . . . . . . . . . . . . . . 57
6.2 Determining the regression coefficient w . . . . . . . . . . . . 58
6.3 Multinomial logistic regression . . . . . . . . . . . . . . . . . 61
6.4 Logistic regression for classification . . . . . . . . . . . . . . . 62
6.5 L1 regularization . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.6 Numerical solution . . . . . . . . . . . . . . . . . . . . . . . . 66
6.6.1 Gradient descent . . . . . . . . . . . . . . . . . . . . . 67
6.6.2 Newton’s method . . . . . . . . . . . . . . . . . . . . . 68
6.6.3 Solving the L1 regularized problem . . . . . . . . . . . 70
6.6.4 Common numerical issues . . . . . . . . . . . . . . . . 70
6.7 Model evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.8 End Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
评论0
最新资源