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

Support Vector Machine issue with caret (R)

So I am training a linear support vector machine on my dataset using lssvm function from kernlab package. I get this error that I don't understand: Error in G[(kadv + 1):n, 1:kadv - 1, drop = FALSE] : subscript out of bounds I can't seem…
amr95
  • 23
  • 4
0
votes
1 answer

ERROR: compilation failed for package 'kernlab'; appears to fail when running some function 'dcauchy'

I'm getting an error while trying to install kernlab for R. My R version is 3.5.2. My OS is ChromeOS 108.0.5359.58 beta (64-bit), with Debian 10 (buster). Processor is an intel m3-8100Y (64-bit). The error I'm getting doesn't seem to have been…
Alvin H.
  • 1
  • 2
0
votes
2 answers

Install R package error - compilation failed in Ubuntu 18.04

I try to install R packages by using devtools (for specific version) but got some errors. I have to install packages that's specific version and use specific R version (4.1.*) plz. R, devtools version R version : 4.1.3 devtools: 2.4.4 Install…
0
votes
1 answer

Kernlab: missing value where TRUE/FALSE needed?

I want to perform sample classification using the ksvm function from the kernlab library. library(kernlab) # PCA analysis on the first 3 component vectors pca <- prcomp(t(top.ranked.genes)) dat.loadings <- pca$x[, 1:3] # Sample…
melil
  • 81
  • 8
0
votes
1 answer

Make program based on kernlab function run faster

For a range I want to identify where changes in distribution happens and where that value is the maximum. Currently I am using a kernel maximum discrepancy test for every value in the range and I am taking the 200 values before and after that value…
A4747
  • 85
  • 8
0
votes
1 answer

R: ksvm function - error: object is not a matrix

I seem to be encountering an error using the ksvm function. Each time I try to run the below code I get an error message Error in model.frame.default(data = ..1, formula = x) : object is not a matrix I have asked colleagues, but no one seems able…
Adit2789
  • 139
  • 1
  • 5
  • 15
0
votes
1 answer

Finding optimal k values for KNN using data splitting

I am trying to do an assignment for data splitting (training set, validation set, and test set) to find the most suitable classifier --in this case, k, since I am using k-nearest neighbors (kknn function, part of kernlab package). However, when I…
Deemy
  • 1
  • 1
0
votes
1 answer

For Loop for Function not appending list / dataframe

I am trying to complete a homework assignment for a class in Analytics. We are using the kknn (K nearest neighbor) function for classification. Anyway, the for loop does not seem to be iterating through the i values as I am intending: I first tried…
Deemy
  • 1
  • 1
0
votes
2 answers

Error installing Kernlab from Source on MacOS X (lazy loading failed)

I have been trying to install the R package, Kernlab from source, but I have been running into problems. At first, I had some error related to gfortran, so I downloaded the GNU fortran compiler from http://r.research.att.com/tools/ Then when I type…
lalas
  • 763
  • 1
  • 7
  • 10
0
votes
1 answer

what parameters stepAIC accepts?

I am using stepAIC() function from library (MASS). And per the documentation it says that I can pass an 'object': a model of an appropriate class. This is used as the initial model in the stepwise search. What is an appropriate class? I created…
Chicago1988
  • 970
  • 3
  • 14
  • 35
0
votes
1 answer

Suppressing output in slidify if neither "invisible()", "echo=F", "warning=F" or "error=F" work?

I want to suppress the message "Setting default kernel parameters", but none of the options discussed here are doing the job that is "echo=F", "warning=F", "message=F" or the use of "invisible". What else can I do? The info-string really disturbs…
CodingButStillAlive
  • 733
  • 2
  • 8
  • 22
0
votes
1 answer

Kernel-PCA, KPCA: embed new data, error

I want to apply KPCA on my training data before I pass it to my SVM which seems to work fine with kernlab. Afterwards I want to embed my testing input into the new space in order to make prediction with my SVM. The documentary recommends to use the…
Deniz
  • 1
0
votes
1 answer

How can I extract training error from kernlab?

The following code: portuguese_scores = read.table("https://raw.githubusercontent.com/JimGorman17/Datasets/master/student-por.csv",sep=";",header=TRUE) portuguese_scores <- portuguese_scores[,!names(portuguese_scores) %in% c("school", "age", "G1",…
Jim G.
  • 15,141
  • 22
  • 103
  • 166
0
votes
0 answers

Kernel PCA error in R package Kernlab

I'm attempting to study Kernel PCA in a dataset and I have been trying the Kernlab package for R. The package has a method called "kpca". It works pretty well when I use it in R shell calling each command at a time. However, to make the process…
Thiago
  • 694
  • 3
  • 12
  • 26
0
votes
0 answers

R - One Class SVM classification with multiple predictions

I have a matrix of X rows and 5 columns with data. I'm trying to use the function One-class SVM with the library kernlab and e1071. First, I'm training the classifier 200 rows with values "TRUE" and then, I classify the rest of rows (74). My problem…
user3886573
  • 73
  • 1
  • 2
  • 11