Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 757 Bytes

Buzz_score_example.md

File metadata and controls

28 lines (20 loc) · 757 Bytes

Buzz scoring example

Example scoring (making predictions with) the Buzz data set.

First attach the randomForest package and load the model and test data.

suppressPackageStartupMessages(library("randomForest"))

lst <- readRDS("thRS500.RDS")
varslist <- lst$varslist
fmodel <- lst$fmodel
buzztest <- lst$buzztest
rm(list = "lst")

Now show the quality of our model on held-out test data.

buzztest$prediction <- predict(fmodel, newdata = buzztest, type = "prob")[, 2, drop = TRUE]

WVPlots::ROCPlot(buzztest, "prediction", 
                 "buzz", 1, 
                 "ROC curve estimating quality of model predictions on held-out data")