search for: kpar

Displaying 12 results from an estimated 12 matches for "kpar".

Did you mean: gpar
2012 Apr 27
2
Where would i put feature requests for a library?
...he code of one of the libraries (not core), or, in my current case, would wish something minor changed for convenience, where can i get contact? Can i put it in the "official" bug repository? (Problem discription for anyone interested: Why call the default function kpca for a matrix with kpar=list(sigma=0.2), instead of putting this default sigma into the rbfkernel and using kpar=list()? Anytime i call kpca with a kernel without sigma, i have to supply kpar=list() or get an error. )
2012 Jul 31
1
kernlab kpca predict
...ats 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"] wit...
2010 Sep 24
0
kernlab:ksvm:eps-svr: bug?
...scal <- 1 844 error(ret) <- drop((scal^2)*crossprod(fitted(ret) - y)/m) 845 } 846 } C. Finally, an example (taken from ?ksvm): require (kernlab) seed (1234) x <- seq(-20,20,0.1); x <- x[x != 0] y <- sin(x)/x + rnorm(400,sd=0.03) regm <- ksvm(x,y,epsilon=0.01,kpar=list(sigma=16),cross=3) te <- crossprod (fitted(regm)-y)/400 s <- (scaling(regm)$y.scale[["scaled:scale"]])^2 error (regm) # 0.03891344 te # 0.0008958718 te * s # 6.37252e-05 te / s # 0.01259449 These numbers can also be seen in the trace_output_concise.t...
2009 Dec 25
2
Help with SVM package Kernlab
...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 that I can ge...
2007 Sep 12
0
one-class SVM in kernlab
...m() 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 Objective...
2012 Nov 15
1
Can't see what i did wrong..
with pred.pca<-predict(splits[[i]]$pca,trainingData at samples)[,1:nPCs] dframe<-as.data.frame(cbind(pred.pca,class=isExplosive(trainingData,2))); results[[i]]$classifier<-ksvm(class~.,data=dframe,scaled=T,kernel="polydot",type="C-svc", C=C,kpar=list(degree=degree,scale=scale,offset=offset),prob.model=T) and a degree of 5 i get an error of 0 reported by the ksvm object. But when doing pred.pca<-predict(splits[[i]]$pca,trainingData at samples)[,1:nPCs] pred.svm<-kernlab::predict(results[[i]]$classifier,pred.pca,type="probabilit...
2007 Aug 14
0
kernlab ksvm() cross-validation prediction response vector
...e 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
2008 Sep 14
0
ksvm accessing the slots of S4 object
...param" "scaling" "coef" "alphaindex" "b" [6] "obj" "SVindex" "nSV" "prior" "prob.model" [11] "alpha" "type" "kernelf" "kpar" "xmatrix" [16] "ymatrix" "fitted" "lev" "nclass" "error" [21] "cross" "n.action" "terms" "kcall" "class" >ksvm.model Support Vector Machi...
2009 Dec 24
0
Error with Package "Kernlab" for SVM prediction
...s: 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 is much appre...
2010 Aug 29
0
SVM comparison
...;m trying to run an epsilon regression model, and am comparing the results between e1071 and kernlab. I believe that I'm calling the ksvm and svm functions the same way but I'm getting different results: library(e1071); library(kernlab) ksvm(x=1:100, y=(1:100)/5, type="eps-svr", kpar=list(sigma=1)) svm(x=1:100, y=(1:100)/5, type="eps-regression", gamma=0.5) I get a different number of support vectors and different fitted values. Am I doing something wrong? Thanks, Sean [[alternative HTML version deleted]]
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 Oct 31
1
R-help Digest, Vol 92, Issue 31
...bject: [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: infinite recu...