search for: rbfdot

Displaying 14 results from an estimated 14 matches for "rbfdot".

2012 May 05
2
Pasting with Quotes
Hello useRs! So, I have a random question. I'm trying to build a character string, then evaluate it. I think an example would be the easiest way to explain: kern.vec = c("rbfdot","polydot") for( j in 1:length( kern.vec ) ) { formula = paste("ksvm( ind ~ . , data=d.temp[,c(ind_col,dep_cols)], kernel =",kern.vec[j],", prob.model=T )") svm = eval( parse( text=formula ) ) ... } The problem I always seem to...
2008 Jun 25
1
stringdot
...nction(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=promotergene,kernel="stringdot",C=10,cross=5) # this give the following error #Error in match.arg(kernel, c("rbfdot", "polydot", "tanhdot", "vanilladot", : #...
2009 Oct 23
1
Data format for KSVM
...071 library. it works. I want to try using the KSVM library instead. The same data used wiht e1071 gives me an error with KSVM. My data is a data.frame. sample code: svm_formula <- formula(y ~ a + B + C) svm_model <- ksvm(formula, data=train_data, type="C-svc", kernel="rbfdot", C=1) I get the following error: "object is not a matrix" So I tried this: svm_model <- ksvm(formula, data=as.matrix(train_data), type="C-svc", kernel="rbfdot", C=1, scaled=FALSE) Now I get this error: "Error in model.fram.definition(data = list(v1...
2009 Dec 25
2
Help with SVM package Kernlab
...0 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 casted as a data.frame. I tried adding the Class column as well later to the testSeq data frame but got the same error. I am using R with windows, 32 bit, version 2.9.0 Any help t...
2012 Jul 31
1
kernlab kpca predict
...m not sure whats wrong at the moment. I haven't any predict functions written by myself in the workspace either. I've tested it with using the matrix version and the dataframe/formula version on kpca. data(iris) test <- sample(1:150,20) kpc <- kpca(~.,data=iris[-test,-5],kernel="rbfdot",kpar=list(sigma=0.2),features=2) emb <- predict(kpc,iris[test,-5]) Error in UseMethod("predict") : no applicable method for 'predict' applied to an object of class "c('kpca', 'prc')" str(kpc) Formal class 'kpca' [package "kernlab...
2007 Sep 12
0
one-class SVM in kernlab
...to using ksvm() in the kernlab package to fit a one-class SVC, but I get a strage result on the cross-validation error estimate. For example, consider this code: data(spam) classifier <- ksvm(type~.,data=spam[which(spam[,'type']=='spam'),], type="one-svc",kernel="rbfdot",kpar=list(sigma=0.1),nu=0.05,cross=10) what I get is: > classifier Support Vector Machine object of class "ksvm" SV type: one-svc (novelty detection) parameter : nu = 0.05 Gaussian Radial Basis kernel function. Hyperparameter : sigma = 0.1 Number of Support Vectors : 660...
2007 Aug 14
0
kernlab ksvm() cross-validation prediction response vector
...hether for the support vector classification function ksvm() the response values stored in object at ymatrix are cross validated outputs/predictions: Example code from package kernlab, function ksvm: library(kernlab) ## train a support vector machine filter <- ksvm(type~.,data=spam,kernel="rbfdot",kpar=list(sigma=0.05),C=5,cross=3) filter filter at ymatrix if not: what is the easiest way to obtain x-fold cross validated predicted values of the instances of a data set ? Does it have to be implemented by oneself? thanks a lot again best regards Bj?rn
2009 Dec 24
0
Error with Package "Kernlab" for SVM prediction
...ith 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) 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 casted as a data.frame. I tried adding the Class column as well later to the testSeq data frame but got the same error. I am using R with windows, 32 bit, version 2.9.0 Any help i...
2010 Feb 23
0
BUG with LSSVM in R:
...samples. Why? Here I provide e.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 versicolo...
2011 Dec 08
0
SVM performance using laplace kernel is too slow
...g at 25% and RAM utilization is a mere 17% ... it's not a hardware bottleneck. Similar calculations using data mining algorithms in SQL Server analysis services run about 40x faster. Through trial and error, we discovered that the laplacedot kernel gives us the best results by a wide margin. Rbfdot is about 15% less accurate, but twice as fast (but still too slow). The best performance is vanilladot. It runs more or less instantly but the accuracy is way too low to use. We'd ideally like to use the laplacedot kernel but to do so we need a massive speedup. Does anyone have any ideas on...
2009 Sep 06
2
Regarding SVM using R
Hi Abbas, Before I try to give you answers, I just want to mention that you should send R related reqests to the R-help list, and not me personally because (i) there's a greater likelihood that it will get answered in a timely manner, and (ii) people who might have a similar problem down the road might benefit from any answer via searching the list archives ... anyway: On Sep 5, 2009, at
2010 Sep 24
0
kernlab:ksvm:eps-svr: bug?
..., subset, na.action = na.omit, scaled = TRUE){ ... 38 }) 39 ... 47 setMethod("ksvm",signature(x="matrix"), 48 function (x, 49 y = NULL, 50 scaled = TRUE, 51 type = NULL, 52 kernel = "rbfdot", 53 kpar = "automatic", 54 C = 1, 55 nu = 0.2, 56 epsilon = 0.1, 57 prob.model = FALSE, 58 class.weights = NULL, 59 cross = 0, 60 fit = TRU...
2013 Nov 15
1
Inconsistent results between caret+kernlab versions
I'm using caret to assess classifier performance (and it's great!). However, I've found that my results differ between R2.* and R3.* - reported accuracies are reduced dramatically. I suspect that a code change to kernlab ksvm may be responsible (see version 5.16-24 here: http://cran.r-project.org/web/packages/caret/news.html). I get very different results between caret_5.15-61 +
2010 Oct 31
1
R-help Digest, Vol 92, Issue 31
...roject.org Subject: [R] ksvm problem Message-ID: <1288363149599-3019212.post@n4.nabble.com> Content-Type: text/plain; charset=UTF-8 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 <- >ksvm(type_train,data=spamtrain,kernel="rbfdot",kpar=list(sigma=0.05),C=5,cross=3) >) Error: evaluation nested too deeply: in...