[R] ksvm

2013-03-18 Thread Li, Yan
Hi All, I'm developing a ksvm application. I need to use the results obtained from ksvm in R to construct or restore the ksvm formula and further use this formula to predict new data. The ksvm class contains xmatrix, ymatrix, coefficients, alpha, b and fitted value. Taking linear svm as an exa

[R] ksvm and predict

2011-09-20 Thread Juan
Hello, I am using the kernlab package to do regression. I have a data frame called Data6 which looks like this: head(Data6) WA PO ZA ZB ZC ZD KL 1 2.955447 6.378324 14.10622 0.134343 0.247120 0.734810 4.05988 2 2.939718 6.344122 14.03528 0.127512 0.

[R] ksvm problem

2010-10-29 Thread Neeti
Hi to all! When I use the example from kernlab::ksvm this works fine.. Give me the result… > filter <- > ksvm(type~.,data=spamtrain,kernel="rbfdot",kpar=list(sigma=0.05),C=5,cross=3) But as soon as I change the type data as follows > type_train<-spamtrain[,ncol(spamtrain)] > filter <- > ks

Re: [R] ksvm question -- help! line search failed...

2009-07-07 Thread Steve Lianoglou
I guess this is going to be hard to debug w/o knowing more about your data. How big is your dataset? * How many observations? * How many predictors/features per observation? How many classes are in the data? Can you make a small reproducible example? Does your now cleaned data work w/ e1071

Re: [R] ksvm question -- help! line search failed...

2009-07-07 Thread Michael
I got the data working, but now I got another problem with KSVM: line search fails -2.793708 -0.5831701 1.870406e-05 -5.728611e-06 -5.059796e-08 -3.761822e-08 -7.308871e-13Error in prob.model(object)[[p]]$A : $ operator is invalid for atomic vectors On Tue, Jul 7, 2009 at 6:45 PM, Steve Lian

Re: [R] ksvm question -- help! cannot get program to run...

2009-07-07 Thread Steve Lianoglou
Hi, On Jul 7, 2009, at 6:44 PM, Michael wrote: What's wrong? Very sad about this... model <- ksvm(x=mytraindata[, -1], y=factor(mytraindata[, 1]), prob.model=T) Error in .local(x, ...) : x and y don't match. Same problem you're having with the svm in e1071: I bet your data is wonky. s

[R] ksvm question -- help! cannot get program to run...

2009-07-07 Thread Michael
What's wrong? Very sad about this... model <- ksvm(x=mytraindata[, -1], y=factor(mytraindata[, 1]), prob.model=T) Error in .local(x, ...) : x and y don't match. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] ksvm accessing the slots of S4 object

2008-09-14 Thread Nair, Murlidharan T
I am using kernlab to build svm models. I am not sure how to access the different slots of the object. For instance if I want to get the nuber of support vectors for each of model I am building and store it in a vector. >ksvm.model <- ksvm(Class ~ ., data = somedata,kernel = "vanilladot", cross