lecture 7 cross validation
play

Lecture 7: Cross-Validation Instructor: Prof. Shuai Huang - PowerPoint PPT Presentation

Lecture 7: Cross-Validation Instructor: Prof. Shuai Huang Industrial and Systems Engineering University of Washington Underfit, Good fit, and Overfit 2 = 0 + 1 1 + 2 2 + 11 1 2


  1. Lecture 7: Cross-Validation Instructor: Prof. Shuai Huang Industrial and Systems Engineering University of Washington

  2. Underfit, Good fit, and Overfit 𝑔 π’š 𝑔 π’š 2 = 𝛾 0 + 𝛾 1 𝑦 1 + 𝛾 2 𝑦 2 + 𝛾 11 𝑦 1 2 𝑔 π’š = 𝛾 0 + 𝛾 1 𝑦 1 + 𝛾 2 𝑦 2 = 𝛾 0 + 𝛾 1 𝑦 1 + 𝛾 2 𝑦 2 + 𝛾 11 𝑦 1 2 + 𝛾 12 𝑦 1 𝑦 2 + 𝛾 112 𝑦 1 2 𝑦 2 + 𝛾 22 𝑦 2 2 + 𝛾 12 𝑦 1 𝑦 2 + 𝛾 22 𝑦 2 2 + β‹― + 𝛾 122 𝑦 1 𝑦 2

  3. Danger of R-squared β€’ When number of variables increases, in theory, the R- squared won’t decrease; in practice, it always increases. Thus, it is not a good metric to take into consideration of model complexity 𝑆 2 = 1 βˆ’ 𝑇𝑇𝐹 π‘‡π‘‡π‘ˆ β€’ This is because that: ST is always fixed, while SSE could only decrease if more variables are put into the model even if these new added variables have no relationship with the outcome variable

  4. Danger of R- squared (cont’d) β€’ Further, the R-squared is compounded by the variance of predictors as well. As the underlying regression model is 𝑍 = π›Ύπ‘Œ + πœ— , β€’ The variance of 𝑍 , 𝑀𝑏𝑠 𝑍 = 𝛾 2 𝑀𝑏𝑠 π‘Œ + 𝑀𝑏𝑠(πœ—) . The R-squared takes the form as 𝛾 2 𝑀𝑏𝑠 π‘Œ R-squared= 𝛾 2 𝑀𝑏𝑠 π‘Œ +𝑀𝑏𝑠(πœ—) . β€’ Thus, it seems that R-squared is not only impacted by how well π‘Œ can predict 𝑍 , but also by the variance of π‘Œ as well.

  5. The truth about training error β€’ Just as the R-squared, it will continue to decrease if the model is mathematically more complex (therefore, more able to shape itself to make its prediction correct on data points that are due to noise)

  6. Fix R-squared: AIC/BIC/? IC… β€’ The definition of AIC (Akaike Information Criterion) 𝐡𝐽𝐷 = 2𝑙 βˆ’ 2 ln ΰ·  𝑀 β€’ The definition of BIC (Bayesian Information Criterion) 𝐢𝐽𝐷 = ln 𝑂 𝑙 βˆ’ 2 ln ΰ·  𝑀

  7. Training and testing data β€’ A simple strategy: if a model is good, then it should perform well on an unseen testing data (that represents the future data – which is of course unseen in the model training stage)

  8. K-Fold cross-validation β€’ For example, K=4

  9. Random sampling method β€’ How to conduct the training/testing data scheme, when we only have access to a dataset (usually we take this dataset as β€œtraining data” – a concept taken for granted)?

  10. Other dimensions of β€œerror” β€’ The TP, FP, FN, TN

  11. The ROC curve (Receiver Operating Characteristics) β€’ Consider a logistic regression model

  12. R lab β€’ Download the markdown code from course website β€’ Conduct the experiments β€’ Interpret the results β€’ Repeat the analysis on other datasets

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend