Evaluation

Metrics

Classification

Confusion Matrix


source
MetricDefFormula
Type I Errorreject mathematical expression or equation
Type II Erroraccept mathematical expression or equation
Accuracy% of correct predictionsmathematical expression or equation
Precision% of actual Ps among predicted Psmathematical expression or equation
Recall/Sensitivity% of predicted Ps among actual Psmathematical expression or equation
Specificity% of predicted Ns among actual Nsmathematical expression or equation
F1-scoreBalance tradeoff between precision & recallmathematical expression or equation
**F mathematical expression or equation

ROC & AUC


source
  • TPR (True Positive Rate): = Recall, mathematical expression or equation
  • FPR (False Positive Rate): = 1 – Specificity, mathematical expression or equation
  • Classification threshold: anything above this defined value is classified as 1, mathematical expression or equation (default 0.5)
  • ROC (Receiver Operating Characteristic): performance at different classification thresholds
  • AUC (Area Under the Curve): sum up performance across all classification thresholds
    • mathematical expression or equation : random guess (worst)
    • mathematical expression or equation : all correct (best)
    • mathematical expression or equation : all wrong (reverse)

 

Regression

Errors

Basically loss functions.

MetricDefFormula
MAEMean of Residualsmathematical expression or equation
MSEVariance of Residualsmathematical expression or equation
RMSEStandard deviation of Residualsmathematical expression or equation

Notes:

  • MAE is robust against outliers, but MAE doesn’t penalize large errors heavily and is not differentiable.
  • MSE penalizes large errors heavily and is differentiable, but MSE is sensitive to outliers.
  • RMSE has the same units as the dependent variables, so it is generally more preferred than both.

Explained Variance

MetricDefFormula
Explained Variance% of mathematical expression or equation
mathematical expression or equation
Adjusted mathematical expression or equation

Notes:

  • Explained variance measures how well the independent variables explain the variance in dependent variables.
  • mathematical expression or equation is also called Coefficient of Determination, or Goodness of Fit, because it can capture how well unseen samples are likely to be predicted by the model.
  • Adjusted mathematical expression or equation s increases, which is undesired due to redundancy.
  • Adjusted mathematical expression or equation .