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@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.