Displaying 5 results from an estimated 5 matches for "promotergen".
Did you mean:
promotergene
2008 Jun 25
1
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=promotergen...
2009 Apr 28
1
kernlab - custom kernel
hi,
I am using R's "kernlab" package, exactly i am doing classification using
ksvm(.) and predict.ksvm(.).I want use of custom kernel. I am getting some
error.
# Following R code works (with promotergene dataset):
library("kernlab")
s <- function(x, y) {
sum((x*y)^1.25)
}
class(s) <- "kernel"
data("promotergene")
gene <- ksvm(Class ~ ., data = promotergene,
kernel = s, C = 10, cross = 5)
gene
pred<-predict(gene, promotergene[c(6), -1])
# but the same c...
2009 Dec 25
2
Help with SVM package Kernlab
...lied only to factors with 2 or more levels
The training file is a data frame with 501 columns: Col 1 is "Class" which
is "+" or "-" and Cols V1 to V500 are "A/C/G/T" . There are 200 seq's for
training (100 + and - each). this is very similar to the "promotergene" data
set included as example with the package.
The model that I have generated is as follows:
modelforSVM <- ksvm(Class ~ ., data = train500, kernel = "rbfdot", kpar =
"automatic", C = 60, cross = 3, prob.model = TRUE)
The testSeq is a vector of 500 characters caste...
2007 Aug 08
0
ksvm-kernel
...rix (S4 method for signature 'kernelMatrix')
#executing the following sentences
library(kernlab)
# identity kernel
k <- function(x,y) {
n<-length(x)
cont<-0
for(i in 1:n){
if(x[i]==y[i]){
cont<-cont+1
}
}
cont
}
class(k) <- "kernel"
data(promotergene)
ind <- sample(1:dim(promotergene)[1],20)
genetrain <- promotergene[-ind, -1]
genetest <- promotergene[ind,-1 ]
kx <- kernelMatrix(k, as.matrix(genetrain))
y<-as.vector(promotergene[-ind,1 ])
#y<-as.factor(promotergene[-ind,1 ])
y
gene1 <- ksvm(kx, y, type="C-svc"...
2009 Oct 04
3
error installing/compiling kernlab
Hi everybody,
I''m using R on a 64-bit Ubuntu 9.04 (Jaunty). I prefer to install R
packages from source, even if they are available in Synaptic. The
problem is that I can''t install/compile kernlab. Everything works fine
until it gets to the lazy loading part:
** preparing package for lazy loading
Creating a new generic function for "terms" in "kernlab"