Displaying 20 results from an estimated 800 matches similar to: "I need help for svm package kernlab in R"
2010 Sep 24
0
kernlab:ksvm:eps-svr: bug?
Hi,
A. In a nutshell:
The training error, obtained as "error (ret)", from the return value
of a ksvm () call for a eps-svr model is (likely) being computed
wrongly. "nu-svr" and "eps-bsvr" suffer from this as well.
I am attaching three files: (1) ksvm.R from the the kernlab package,
un-edited, (2) ksvm_eps-svr.txt: (for easier reading) containing only
eps-svr
2012 Aug 27
0
kernlab`s custom kernel of ksvm freeze
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)
}
2009 Nov 29
2
kernlab's ksvm method freeze
Hello,
I am using kernlab to do some binary classification on aminoacid
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,
2011 May 26
0
R svm prediction kernlab
Hi All,
I am using ksvm method in kernlab R package for support vector
machines. I learned the multiclass one-against-one svm from training data
and using it to classify new datapoints. But I want to update/finetune the
'svm weights' based on some criteria and use the updated svm weights in the
predict method framework. I don't know if its possible or not, how do
classify new
2011 Aug 26
1
kernlab: ksvm() bug?
Hello all,
I'm trying to run a gird parameter search for a svm.
Therefore I'M using the ksvm function from the kernlab package.
----
svp <- ksvm(Ktrain,ytrain,type="nu-svc",nu=C)
----
The problem is that the optimization algorithm does not return
for certain parameters.
I tried to use setTimeLimit() but that doesn't seem to help.
I suspect that ksvm() calls c code that
2007 Dec 17
0
kernlab and gram matrix
Hi, this is a question 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.
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) <-
2008 Sep 14
0
ksvm accessing the slots of S4 object
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 = 10, type ="C-svc")
>names(attributes(ksvm.model))
[1] "param"
2007 Oct 23
1
Compute R2 and Q2 in PLS with pls.pcr package
Dear list
I am using the mvr function of the package pls.pcr to compute PLS
resgression using a X matrix of gene expression variables and a Y matrix
of medical varaibles.
I would like to obtain the R2 (sum of squares captured by the model) and
Q2 (proportion of total sum of squares captured in leave-one-out cross
validation) of the model.
I am not sure if there are specific slots in the
2009 Apr 28
1
kernlab - custom kernel
hi,
I am using R's "kernlab" package, exactly i am doing classification using
ksvm(.) and predict.ksvm(.).I want use of custom kernel. I am getting some
error.
# Following R code works (with promotergene dataset):
library("kernlab")
s <- function(x, y) {
sum((x*y)^1.25)
}
class(s) <- "kernel"
data("promotergene")
gene <- ksvm(Class ~ .,
2010 Aug 16
0
Help for using nnet in R for NN training and testing
Hello,
I want to use nnet package in R, to train and simulate a NN and get the
value of MSE.
I am reading in a file which has 19 input variables and one output variable
and has a total of 2000 observations. The first column in the file is a
column just for giving the serial numbers of the observations.
I have already read in the file and also extracted the different values into
the matrices to
2007 Oct 30
0
kernlab/ ksvm: class.weights & prob.model in binary classification
Hello list,
I am faced with a two-class classification problem with highly asymetric
class sizes (class one: 99%, class two: 1%).
I'd like to obtain a class probability model, also introducing available
information on the class prior.
Calling kernlab/ksvm with the line
>
ksvm_model1<-ksvm(as.matrix(slides), as.factor(Class), class.weights= c("0"
=99, "1" =1),
2007 Aug 14
0
kernlab ksvm() cross-validation prediction response vector
Hello,
I would like to know, whether 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
2011 May 28
0
how to train ksvm with spectral kernel (kernlab) in caret?
Hello all,
I would like to use the train function from the caret package to
train a svm with a spectral kernel from the kernlab package. Sadly
a svm with spectral kernel is not among the many methods in caret...
using caret to train svmRadial:
------------------
library(caret)
library(kernlab)
data(iris)
TrainData<- iris[,1:4]
TrainClasses<- iris[,5]
set.seed(2)
2009 Oct 06
0
Kernlab: multidimensional targets in rvm(), ksvm(), gausspr()
Hi there,
I'm trying to do a regression experiment on a multidimensional
dataset where both x and y in the model are multidimensional
vectors.
I'm using R version 2.9.2, updated packages, on a Linux box.
I've tried gausspr(), ksvm() and rvm(), and the models are
computed fine, but I'm always getting the same error message
when I try to use predict():
"Error in
2007 Sep 12
0
one-class SVM in kernlab
Hello,
I'm trying 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:
>
2012 Aug 19
1
kernlab | ksvm error
Dear list,
I am using the ksvm function from kernlab as follows:
(1) learning
> svm.pol4 <- ksvm(class.labs ~ ., data = train.data, prob.model = T, scale
= T, kernel = "polydot")
(2) prediction
> svm.pol.prd4 <- predict(svm.pol4, train.data, type = "probabilities")[,2]
But unfortunately, when calling the prediction, once in every 10s of times
(using the exact
2006 Nov 27
0
kernlab 0.9-0 on CRAN
A new version of kernlab has just been released.
kernlab is a kernel-based Machine Learning package for R.
kernlab includes the following functions:
o ksvm() : Support Vector Machines for classification, regression,
novelty detection, native multi-class classification, support
for class-probability output and confidence intervals in
regression.
o gausspr()
2006 Nov 27
0
kernlab 0.9-0 on CRAN
A new version of kernlab has just been released.
kernlab is a kernel-based Machine Learning package for R.
kernlab includes the following functions:
o ksvm() : Support Vector Machines for classification, regression,
novelty detection, native multi-class classification, support
for class-probability output and confidence intervals in
regression.
o gausspr()
2006 Nov 24
1
How to find AUC in SVM (kernlab package)
Dear all,
I was wondering if someone can help me. I am learning SVM for
classification in my research with kernlab package. I want to know about
classification performance using Area Under Curve (AUC). I know ROCR
package can do this job but I found all example in ROCR package have
include prediction, for example, ROCR.hiv {ROCR}. My problem is how to
produce prediction in SVM and to find