ROC-curves for comparison of tree-based models
It's time for you to repeat the previous exercises, now comparing the tree-based models. The pROC() is now loaded in your workspace. The PD-predictions for tree-based methods are stored in the objects
predictions_undersamplepredictions_priorpredictions_loss_matrixpredictions_weights
Diese Übung ist Teil des Kurses
Credit Risk Modeling in R
Anleitung zur Übung
- Construct the ROC-objects for the tree based methods using function
roc(response, predictor). - Use the previously created objects to construct ROC-curves. To draw them all on one plot, use
plot()for the first ROC-curve drawn (forROC_undersample), andlines()for the other three models to the same plot. Use thecol-argument to change the color of the curve ofROC_priorto blue,ROC_loss_matrixto red andROC_weightsto green. - To get a better idea of the performance of the ROC-curves, have a look at the AUC's using function
auc().
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Construct the objects containing ROC-information
ROC_undersample <-
ROC_prior <-
ROC_loss_matrix <-
ROC_weights <-
# Draw the ROC-curves in one plot
# Compute the AUCs