[R] kernlab`s custom kernel of ksvm freeze

okabes envy721c at naver.com
Mon Aug 27 10:26:36 CEST 2012


Hello, together

I'm trying to use user defined kernel. I know that kernlab offer user
defined kernel(custom kernel functions) in R. 
I used data spam including package kernlab.

(number of variables=58 number of examples =4061)

i'm user defined kernel's form,

kp=function(d,e){

as=v*d
bs=v*e
cs=as-bs
cs=as.matrix(cs)

exp(-(norm(cs,"F")^2)/2)
}

class(kp)="kernel" 

It is the transformed kernel for gaussian kernel.

v is the continuously changed values that are inverse of standard deviation
vector about each variables. 
(ex: v=(0.1666667,........0.1666667)`, length(v)= 57)

training set defined 60% of spam data. 
(preserving the proportions of the different classes.)

if data's type is spam, than data`s type = 1 for train svm (else -1)

m=ksvm(xtrain,ytrain,type="C-svc",kernel=kp,C=10) 

But, this step is not working. always Waiting for a response.

So, I ask you this problem, why? 

number of examples are too big? 

Is there any other R package that can train SVMs for user defined kernel?

I want to your answer.

Thanks in advance!




--
View this message in context: http://r.789695.n4.nabble.com/kernlab-s-custom-kernel-of-ksvm-freeze-tp4641393.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list