selectsvmkernel: Tuning SVM kernel. Trains SVMs with a range of kernels...

Description Usage Arguments Value Examples

View source: R/hyperparameters.R

Description

Tuning SVM kernel. Trains SVMs with a range of kernels (linear, polynomial degree 2, 3 and 4, radial and sigmoid) using cross validation so the optimal kernel can be chosen (using the resulting plots). If specified (by showplots=FALSE) the plots are saved as jpegs.

Usage

1
selectsvmkernel(data, title, showplots = TRUE, output_prefix = "")

Arguments

data

Dataset: dataframe containing classification column and all other column features. Both the training and test datasets will be taken from this dataset.

title

Title to be used for the resulting boxplot

showplots

TRUE if plots should be shown in standard output, FALSE is plots should be saved as jpg files.

output_prefix

Prefix used for saving plots. If showplots==FALSE then plots are saved here. Otherwise, standard output.

Value

Dataframe containing test and training accuracy, sensitivity and specificity

Examples

1
2
3
4
5
data = read.csv(paste(system.file('samples/subsamples', package = "feamiR"),'/sample0.csv',sep=''))
data = rbind(head(data,50),tail(data,50))
data$classification = as.factor(data$classification)
data = data[,2:ncol(data)]
selectsvmkernel(data,'SVM boxplots')

feamiR documentation built on Jan. 19, 2021, 9:08 a.m.