[R] Kernlab: problem with small datasets

pablo.granitto@iasma.it pablo.granitto at iasma.it
Thu Jul 7 14:25:46 CEST 2005


Hi,

I found a small problem with kernlab. The problem, I think, is that the
3-fold cross-validation performed to estimate probabilities is not
class-balanced, so the classifier could find empty classes.
The following example (maybe a little forced) show the error:

data(glass)
set.seed(1)
model<-ksvm(Type~.,data=glass[c(1:2,75:76,165:166,180:181,190:191),],type="C-svc",kernel="vanilla",prob.model=TRUE)

Setting default kernel parameters
Error in indexes[[j]] : subscript out of bounds
In addition: Warning message:
Variable(s) `' constant. Cannot scale data. in: .local(x, ...)

HTH,
 Pablo




More information about the R-help mailing list