Questions tagged [kernlab]

The kernlab package for R provides kernel-based machine learning methods for classification, regression and clustering.

The kernlab package for R provides kernel-based machine learning methods for classification, regression, clustering, novelty detection, quantile regression and dimensionality reduction. Among other methods kernlab includes Support Vector Machines, Spectral Clustering, Kernel PCA, Gaussian Processes and a QP solver.

Resources:

84 questions
0
votes
0 answers

How to determine the coefficient of svm classifiers for linear kernels in R?

I am using the kernlab package for svm in R.I am using the linear kernel so that I can directly check the importance of the feature vectors, that is my variables.Using the coefficients of these feature vectors,I am required to calculate the weight…
0
votes
1 answer

How to get ksvm to predict non-scaled values after scaled training

When I run an SVM with ksvm from the kernlab package, all the outputs from the predict command on my final model are scaled. I know this is because I initiate scaled = T but I also know scaling your data is preferred in SVM modeling. How can I…
gtnbz2nyt
  • 1,465
  • 3
  • 17
  • 33
0
votes
1 answer

Editing default functions: Changing the default color of plot function in kernlab in R

Per the example in the kernlab documentation, plot makes a nice figure of the decision weights and boundary of an SVM model. require(kernlab) x<- rbind(matrix(rnorm(n=120,mean=-1,sd=2),,2),matrix(rnorm(120,mean=3,sd=2),,2)) y <-…
user1795995
  • 51
  • 1
  • 2
0
votes
1 answer

Error in outer() function in R for a specific case

I have a matrix X of dimensions 942*50. I want to create an affinity matrix with the Gaussian RBF Kernel. ie, for every pair of rows in the X matrix, I want to compute exp(-sigma*norm(x_i-x_j)^2) where x_i and x_j are rows of the X matrix and i,j…
user2878729
  • 61
  • 1
  • 5
0
votes
1 answer

kernelMatrix function in kernlab doesn't return anything

Am I missing something obvious? This works fine: library(kernlab) kernelMatrix(rbfdot(1), c(1,2,3)) Returning: An object of class "kernelMatrix" [,1] [,2] [,3] [1,] 1.00000000 0.3678794 0.01831564 [2,] 0.36787944 1.0000000…
stackoverflax
  • 1,077
  • 3
  • 11
  • 25
0
votes
1 answer

R ksvm kernlab unused arguments

I'm learning how to use ksvm from kernlab to do classification. I've played with some examples (i.e. iris etc). However, when I try with my data, I keep getting an error: Error in rbfdot(length = 4, lambda = 0.5) : unused argument(s) (length = 4,…
FX_Ng
  • 1
  • 1
  • 2
-1
votes
2 answers

R: Spectral clustering for text classification

I am using the tm package to create a corpus of documents and I want to use spectral clustering (kernlab package) for text classification. So, if I have a corpus my_corpus = VCorpus(DirSource(directory="C:/Users/me/Desktop/Documents",…
vdvaxel
  • 667
  • 1
  • 14
  • 41
-1
votes
2 answers

Kernel for classification of variable length sequences of factors in kernlab

Which is the best approach to define a suitable kernel for classification of variable length sequences of factors. I'm using kernlab with R. Thanks!
user1234299
  • 1,017
  • 1
  • 8
  • 14
1 2 3 4 5
6