Dear all,
I am using kernlab package in R, and I have amino acid sequences with different
lenghts as input for a SVM and I need to go through this sequences using
windows (sliding or fixed) of size X.
Does anyone has any suggestions about which function I should use?
I thought I could use strin
dnesday, June 25, 2008 9:44 AM
To: [EMAIL PROTECTED]
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)
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
3 matches
Mail list logo