Metrics (2) 썸네일형 리스트형 [R] Assessment of the Performance of Classifier 1. Two types of Missclassification errors We can change the two error rates by changing the thershold from 0.5 to some other value in [0, 1]. \(\hat{Pr}(Default = Yes|Balance, Student) \ge \alpha\) \(\alpha\) is a threshold. If \(\alpha\) ↑, FN increase while FP decrease. If \(\alpha\) ↓, FN decrease while FP increase. 2. [Ex] Changes in errors along with Thresholds thresholds [R] Useful Functions for Regression Problems 1. model.matrix() Make dummy variable with category and intercept : model.matrix(~., x) Make dummy variable with category not intercept : mdoel.matirx(~., x)[, -1] Make prediciton from regsubsets, glm, or lm function : model.matrix(~., x) %*% coef(g, id=i) Make prediction from glmnet : model.matrix(~., x) %*% coef(g, s=g$lambda[0]) The model.matrix function convert original data into categorical.. 이전 1 다음