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
1
vote
1 answer

gausspr function from R package kernlab hangs on linear kernel

I am experimenting with gaussian process model and in particular the implementation in the kernlab R package. I found the model fitting hangs when excised with linear kernels. Profiling shows it is busy doing matrix multiplication via operator…
pacifly
  • 51
  • 1
  • 4
1
vote
2 answers

Error in if (any(co)) { : missing value where TRUE/FALSE needed In addition: Warning messages: 1: In FUN(newX[, i], ...) : NAs introduced by coercion

I am working with a dataset that has approximately 150000 rows and 25 columns. The data consist of numerical and factor variables. Factor variables are both text and numbers and I need all of them. The depended variable is a factor with 20 levels. I…
Alex
  • 131
  • 2
  • 10
1
vote
1 answer

Error with tuning custom SVM model in caret

I'm having trouble with my custom training model in the caret package. I need to do a SVM regression and I want to find all the parameters of the SVM model - cost, sigma and epsilon. The built-in version has only cost and sigma. I have already found…
Steven
  • 15
  • 1
  • 7
1
vote
1 answer

R package mlr: option for custom kernels in classif.ksvm

I want to build an svm with a custom kernel. Usually I use the R package kernlab for that. Since, I want to try out different kernels and tune the hyper-parameters, I wanted to use the nice package mlr. However, as far as I can see, it doesn't…
afh
  • 13
  • 2
1
vote
1 answer

Error using kernlab package with precomputed kernels

I have been using the kernlab package and been facing issues using ksvm/predict function with precomputed kernels. The error message I have got is: > ksvm.mod <- ksvm(trainingset.outer, traininglabels.outer, kernel = "matrix",type="C-svc", C = 60,…
Prradep
  • 5,506
  • 5
  • 43
  • 84
1
vote
0 answers

How can I compute the classifying function of svm in multiclass case manually without using the built in function in R?

I know that multi-class svm based on one versus one scheme is based on the voting method. The output of this sterategy is predicted label. I need to compute the amount of classification function , that in binary case, easily can be obtained by…
1
vote
1 answer

Gaussian process classification with R kernlab package: issue predicting test set larger than training set

I'm using gausspr function from the kernlab package for Gaussian process classification, and running into the following error message: Error in votematrix[i, ret > 0] : (subscript) logical subscript too long anytime I try to use the classifier…
Ana
  • 83
  • 1
  • 1
  • 4
1
vote
1 answer

Class Weight Syntax in Kernlab?

Hi I am trying out classification for imbalanced dataset in R using kernlab package, as the class distribution is not 1:1 I am using the option of class.weights in the ksvm() function call however I do not get any difference in the classification…
Shreyas Karnik
  • 3,953
  • 5
  • 27
  • 26
1
vote
1 answer

confusionMatrix for a classifier in R

I am using the confusionMatrix function from the caret library in R to evaluate the performance of a couple of methods such as (elasticnet from glmnet library, gaussian processors from kernlib, randomforest ) on a two class data. I can see sometimes…
Areza
  • 5,623
  • 7
  • 48
  • 79
1
vote
1 answer

R package kernlab installation issue

I am facing issues while installing the kernlab R package on CentOS using the following command: install.packages("/home/R_Libraries/kernlab_0.9-20.tar.gz", repos = NULL, type="source") I get the following error: Error in dyn.load(file, DLLpath =…
Ravi
  • 3,223
  • 7
  • 37
  • 49
1
vote
2 answers

caret function 'train' failing for bagged svm

I am using bioconductor package MLSeq on Ubuntu with R version 3.1.2 . I have tried running through the example provided by the package, and that work just fine. However, I want to use the bagsvm method for the classify function, so at chunk 14, I…
Barker
  • 2,074
  • 2
  • 17
  • 31
1
vote
1 answer

All Vs All classification with kernlab R

I could not find any documentation on how to perform All vs All multi-class classification with kernlab package in R. Any kind of help would be appreciated.
Darshan
  • 25
  • 6
1
vote
1 answer

Invalid probability model for large support vector machines using ksvm in R

I train support vector machines using the ksvm function from the kernlab package in R, on large numbers of observations (300k) with not very many features (1-8). I want to use the resulting probability model, but for large data sets, the resulting…
roelandvanbeek
  • 659
  • 8
  • 20
0
votes
0 answers

How to predict from trained kernlab SVR model in R?

I have a trained SVR model using the caret package in R. I trained the model for numerical prediction. I used the RBF kernel. I can get the coefficients, support vectors, and parameters from the trained model. uptakemodel <- train(uptake ~ ., data =…
MAJ
  • 437
  • 5
  • 17
0
votes
0 answers

Model Achieves 100% Accuracy Incorrectly

I'm building an SVM prediction model in R and the dataset isn't supposed to lend itself to models with great accuracy/beta so I'm supposed to end with a poorly optimized model and spend time optimizing it. But it predicts at 100% accuracy with a…
ApeX
  • 1