Re: [R] stringdot

From: Nair, Murlidharan T <mnair_at_iusb.edu>
Date: Wed, 25 Jun 2008 13:18:40 -0400

I tried the following

data(promotergene)

## train svm using custom kernel
stringkernel<-stringdot(length = 4, lambda = 0.5, type = "sequence", normalized = TRUE) gene <- ksvm(Class~.,data=promotergene,kernel=stringkernel,C=10,cross=5)

I get the following error

cannot allocate vector of size 1.2 Gb.

Is my usage wrong ?. I am running this under linux serve 6850 which has about 8Gb memory Any would be appreciated.
Cheers../Murli



From: r-help-bounces_at_r-project.org [r-help-bounces_at_r-project.org] On Behalf Of Nair, Murlidharan T [mnair_at_iusb.edu] Sent: Wednesday, June 25, 2008 9:44 AM
To: r-help_at_stat.math.ethz.ch
Subject: [R] stringdot

Hi!!

I am trying to figure out how to use the string kernel "stringdot" in kernlab.

k <- function(x,y) {
  (sum(x*y) +1)*exp(-0.001*sum((x-y)^2)) }
class(k) <- "kernel"

data(promotergene)

## train svm using custom kernel

gene.k <- ksvm(Class~.,data=promotergene,kernel=k,C=10,cross=5) # works fine in this case

gene.rbf <- ksvm(Class~.,data=promotergene,kernel="rbfdot",C=10,cross=5)# works fine with the rbf kernel

gene.string <- ksvm(Class~.,data=promotergene,kernel="stringdot",C=10,cross=5) # this give the following error

#Error in match.arg(kernel, c("rbfdot", "polydot", "tanhdot", "vanilladot", :
# 'arg' should be one of “rbfdot”, “polydot”, “tanhdot”, “vanilladot”, “laplacedot”, “besseldot”, “anovadot”, “splinedot”, “matrix”

What am I doing wrong here?

Thanks ../Murli



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 25 Jun 2008 - 17:26:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 25 Jun 2008 - 17:31:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive