Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

The ROC Curve

[width=0.8]rplot-rocr-survey-tpfp


pdf("graphics/rplot-rocr-survey-tpfp.pdf")
library(rpart)
library(ROCR)
load("survey.Rdata")
survey.rp <- rpart(Salary.Group ~ ., data=survey)
survey.pred <- predict(survey.rp, data=survey)
pred <- prediction(survey.pred[,2], survey$Salary.Group)
perf <- performance(pred, "tpr", "fpr")
plot(perf)
dev.off()

http://rattle.togaware.com/code/rplot-rocr-survey-tpfp.R



Copyright © 2004-2006 [email protected]
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.