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
Este ejercicio forma parte del curso
Credit Risk Modeling in R
Instrucciones del ejercicio
- 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().
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# 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