Trang 1
CS 229 – Machine Learning https://stanford.edu/~shervine VIP Cheatsheet: Machine Learning Tips r ROC – The receiver operating curve, also noted ROC, is the plot of TPR versus FPR by varying the threshold. These metrics are are summed up in the table below: Afshine Amidi and Shervine Amidi Metric Formula Equivalent TP True Positive Rate Recall, sensitivity August 12, 2018 TP + FN TPR FP False Positive Rate 1-specificity TN + FP Metrics FPR Given a set of data points {x(1), ..., x(m)}, where each x(i) has n features, associated to a set of r AUC – The area under the receiving operating curve, also noted AUC or AUROC, is the outcomes {y(1), ..., y(m)}, we want to assess a given classifier that learns how to predict y from area below the ROC as shown in the following figure: x. Classification In a context of a binary classification, here are the main metrics that are important to track to assess the performance of the model. r Confusion matrix – The confusion matrix is used to have a more complete picture when assessing the performance of a model. It is defined as follows: Predicted class + – TP FN Regression + False Negatives True Positives Type II error r Basic metrics – Given a regression model f, the following metrics are commonly used to Actual class assess the performance of the model: FP TN – False Positives Total sum of squares Explained sum of squares Residual sum of squares True Negatives Type I error ∑m ∑m ∑m SS = (y − y)2 SS = (f(x ) − y)2 SS = (y − f(x ))2 tot i reg i res i i r Main metrics – The following metrics are commonly used to assess the performance of classification models: i=1 i=1 i=1 Metric Formula Interpretation r Coefficient of determination – The coefficient of determination, often noted R2 or r2, TP + TN provides a measure of how well the observed outcomes are replicated by the model and is defined Accuracy Overall performance of model as follows: TP + TN + FP + FN 2 SSres TP R = 1 − Precision How accurate the positive predictions are SStot TP + FP TP r Main metrics – The following metrics are commonly used to assess the performance of Recall Coverage of actual positive sample regression models, by taking into account the number of variables n that they take into consid- TP + FN Sensitivity eration: TN Specificity Coverage of actual negative sample Mallow’s Cp AIC BIC Adjusted R2 TN + FP 2TP SS + 2(n + 1)̂σ2 [ ] (1 − R2)(m − 1) F1 score Hybrid metric useful for unbalanced classes res 2 (n + 2) − log(L) log(m)(n + 2) − 2 log(L) 1 − 2TP + FP + FN m m − n − 1 Stanford University 1 Fall 2018

Comments (0)
No comments yet. Be the first!