Skip to content
Prev 256991 / 398506 Next

prediction error in ROCR package when sampled y consists of only one class

On 15.04.2011 17:00, Soyeon Kim wrote:
If this is the output for your y, it is not even a classification task, 
since your y is probably numeric rather than a factor.

Hence:
1. make it a factor with the desired number of levels.
2. in this case, the only useful prediction is class "0", hence you can 
easily special case and predict the only available class if only one is 
present.

Best wishes,
Uwe Ligges