Re: [R] prediction error in ROCR package when sampled y consists of only one class

2011-04-15 Thread Saeed Abu Nimeh
Try performing stratified sampling when doing cv. cran.r-project.org/web/packages/ipred On Fri, Apr 15, 2011 at 11:00 AM, Soyeon Kim wrote: > Dear R users, > > Hi. I am using prediction function in ROCR package. > y consists of two classes 0 and 1. > However, since I am using cross-validation, a

Re: [R] prediction error in ROCR package when sampled y consists of only one class

2011-04-15 Thread Uwe Ligges
On 15.04.2011 17:00, Soyeon Kim wrote: Dear R users, Hi. I am using prediction function in ROCR package. y consists of two classes 0 and 1. However, since I am using cross-validation, a sampled small number of y may consist of only one class y [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

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

2011-04-15 Thread Soyeon Kim
Dear R users, Hi. I am using prediction function in ROCR package. y consists of two classes 0 and 1. However, since I am using cross-validation, a sampled small number of y may consist of only one class >y [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 In this case, prediction function gives an erro