I'm having some difficulties applying the method performance of ROCR
library.
#EX1
model <- glm(Good.Loan ~ ., data=trainSet, family=binomial(link="logit"))
testSet$predGood.Loan <- predict(model,newdata=testSet)
pred <- prediction(predictions = testSet$predGood.Loan, labels =
testSet$Good.Loan)
perf <- performance(pred, measure = "tpr", x.measure = "fpr")
#EX2
model <- C5.0(CostumerClass ~ ., data = trainSet)
predictedCostumerClass<- predict(model , testSet)
pred <- prediction(predictions = predictedCostumerClass, labels =
testSet$CostumerClass)
perf <- performance(pred, measure = "tpr", x.measure = "fpr")
In Ex1
, I'm building my model using a generalized Linear Model and then applying the performance method. And it's ok. When I try to use the same thing using a c5.0 model I get the error
Format of predictions is invalid.
The closest help that I could find was in this article.
I can't find what format it's required for the performance method, or if my prediction needs something else.