Skip to content

Decision Trees

  • Each attribute (or independent variable) forms a node and evaluating it leads to the next node in the tree
  • The root node is determined using either of:
    • GINI index: 1−(Pyes)2−(Pno)21 - (P_{yes})^2 - (P_{no})^2 where PP is probability of having the TrueTrue outcome
    • Entropy of Gain index
  • evaluate model’s accuracy; some popular ones
  • AUC - ROC: Area under the curve, Receiver Operating Characteristic; measures accuracy of the model (TN+TP)(TN+TP+FP+FN)\frac{(TN+TP)}{(TN+TP+FP+FN)}
  • Confusion Matrix {True,False}{Positive,Negative} combinations
    • Recall/Sensitivity (SN): gives an indication % of all true positives that model could recognize
    • Precision: gives an indication of % of predicted positives were true positives
    • Specificity:
  • F1 Score
  • Accuracy: R2=1−RSSTSSR^2 = 1 - \frac{RSS}{TSS}
    • Residual Sum of Squares: RSS=∑(Yi−Yfitted)2RSS = \sum(Y_i - Y_{fitted})^2
    • Total Sum of Squares: TSS=∑(Yi−Ymean)2TSS = \sum(Y_i - Y_{mean})^2
    • a relative metric, always between 0 and 1, closer to 1 => better model
  • RMSE: Root-Mean-Squared Error, if xix_i is actual and xi^\hat{x_i} is predicted value then: ∑i=1n(xi−xi^)2N\sqrt{\sum_{i=1}^n \frac{{(x_i - \hat{x_i})}^2}{N}}
    • an absolute number, lower value => better model