[R] Kernlab: problem with small datasets

From: <pablo.granitto_at_iasma.it>
Date: Thu 07 Jul 2005 - 22:25:46 EST

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 07 22:29:35 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:19 EST