[R] kernlab's ksvm method freeze
Heiko Strathmann
heiko.strathmann at googlemail.com
Sun Nov 29 14:21:11 CET 2009
Hello,
I am using kernlab to do some binary classification on aminoacid
strings.
I am using a custom kernel, so i use the kernel="matrix" option of the
ksvm method.
My (normalized) kernel matrix is of size 1309*1309, my results vector
has the same length.
I am using C-svc.
My kernlab call is something similiar to this:
ksvm(kernel="matrix", kernelMatrix, trainingDataYs, type="C-svc",
cross=10, C=2)
To this point, everything works fine.
But now, i want to do a search for a good C Parameter, so I call the
ksvm method multiple times in a loop, with changing parameters.
This loop freezes after a few iterations.
The following simple example also freezes after few iterations (the
number varies). See that the ksvm call is always the same in every
iteration:
for (i in c(1:20)) {
print(i)
ksvm(kernel="matrix", kernelMatrix, trainingDataYs,
type="C-svc",
cross=10, C=2)
}
Does anybody have an idea what causes this? I am new to R and kernlab,
perhaps i missed something?
I put my workspace online, which contains the kernel matrix and the
training labels. Simply load workspace, kernlab library and paste the
example code to reproduce:
http://www-stud.uni-due.de/~sfhestra/
I am using R version 2.10.0 and kernlab 0.9-9.
Thanks for your help!
Regards,
Heiko Strathmann
More information about the R-help
mailing list