search for: kernelmatrix

Displaying 8 results from an estimated 8 matches for "kernelmatrix".

2010 Feb 23
0
BUG with LSSVM in R:
...g. with Iris data in R, keep reducing prediction cases one-by-one, you will see the discrepancy I am talking about. In my own data, this discrepancy between odd and even number of cases is enhanced by a huge factor. Thanks, Parmee iris <- unique(iris) rbf <- rbfdot(0.5) lssvm> k <- kernelMatrix(rbf, as.matrix(iris[,-5])) lssvm> klir <- lssvm(k, iris[, 5]) lssvm> pre <- predict(klir, k) > ktest <- as.kernelMatrix(k[1:148,]) > pretest <- predict(klir, ktest) > table(pretest,iris[1:148,5]) pretest setosa versicolor virginica setosa 50...
2009 Nov 29
2
kernlab's ksvm method freeze
...cid strings. I am using a custom kernel, so i use the kernel="matrix" option of the ksvm method. My (normalized) kernel matrix is of size 1309*1309, my results vector has the same length. I am using C-svc. My kernlab call is something similiar to this: ksvm(kernel="matrix", kernelMatrix, trainingDataYs, type="C-svc", cross=10, C=2) To this point, everything works fine. But now, i want to do a search for a good C Parameter, so I call the ksvm method multiple times in a loop, with changing parameters. This loop freezes after a few iterations. The following simple examp...
2010 Sep 24
0
kernlab:ksvm:eps-svr: bug?
...t","polydot","tanhdot","vanilladot","laplacedot","besseldot","anovadot","splinedot","matrix")) 78 79 if(kernel == "matrix") 80 if(dim(x)[1]==dim(x)[2]) 81 return(ksvm(as.kernelMatrix(x), y = y, type = type, C = C, nu = nu, epsilon = epsilon, prob.model = prob.model, class.weights = class.weights, cross = cross, fit = fit, cache = cache, tol = tol, shrinking = shrinking, ...)) 82 else 83 stop(" kernel matrix not square!") 84 85 i...
2007 Aug 08
0
ksvm-kernel
HI I am new to R. I have one problem in the predict function of the kernlab. I want to use ksvm and predict with kernelmatrix (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(pro...
2012 Sep 13
0
I need help for svm package kernlab in R
...library(kernlab) m=ksvm(xtrain,ytrain,type="C-svc",kernel=custom function, C=10) alpha(m) alphaindex(m) I can get alpha value and alpha index about package. 1. Assumption that number of sample are 20. number of support vectors are 15. then rest 5`s alphas are 0? 2. I want use kernelMatrix xtrain=as.matrix(xtrain) k=KernelMatrix(custom function, xtrain) it is k equal kernel matrix? thanks for your attention. wait your reply -- View this message in context: http://r.789695.n4.nabble.com/I-need-help-for-svm-package-kernlab-in-R-tp4642996.html Sent from the R help mailing list...
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"
2007 Dec 17
0
kernlab and gram matrix
...ion about the R package kernlab. I use kernlab as a library in a C++ program. The host application defines a graph kernel (defined by me), generates a gram matrix and trains kernlab directly on this gram matrix, like this: regm<-ksvm(K,y,kernel="matrix"), where K is the n x n gram kernelMatrix of my kernel, and y is the R-vector of quantitative target values. So, to make sure you got it: I don't want kernlab to compute the kernel values by itself. Rather, this is a task for the host application. Learning (see above) works well, but how do I predict a new instance? I couldn't...
2010 Apr 06
3
svm of e1071 package
Hello List, I am having a great trouble using svm function in e1071 package. I have 4gb of data that i want to use to train svm. I am using Amazon cloud, my Amazon Machine Image(AMI) has 34.2 GB of memory. my R process was killed several times when i tried to use 4GB of data for svm. Now I am using a subset of that data and it is only 1.4 GB. i remove all unnecessary objects before calling