tunedagsvm: Tunes a Directed Acyclic Graph-Support Vector Machine.

Description Usage Arguments Value Source References See Also Examples

View source: R/tunedagsvm.R

Description

tunedagsvm constructs based on a provided test and training sample as returned by gettestandtrainingsampledf a directed acyclic graph- support vector machine (DAG-SVM) \insertCitePlatt.2000TraceIdentification in order to discriminate the classes in the provided test and training sample. This is done by implementing a simple grid search as suggested by \insertCiteChang.2001TraceIdentification. The DAG-SVM is tuned for the follwing parameters:

kernels:

linear, sigmoidal, radial.

gamma:

2^{-20}, 2^{-18}, <e2><80><a6>, 2^6 (not for the linear kernel)

C (cost):
  1. In a first rough search step: 2^{-10}, 2^{-8}, <e2><80><a6>, 2^{10}.

  2. In a following finer search step: \text{C}_{\text{initial}} - 1.2, \text{C}_{\text{initial}} - 1.0,<e2><80><a6>, \text{C}_{\text{initial}}, \text{C}_{\text{initial}} + 1.0, \text{C}_{\text{initial}} + 1.2

Tuning is done via random subset cross-validation. Tuning is done in parallel for each kernel. Each node of the DAG-SVM is trained separately and the function provides performance measures for the classification and a tuned model for each node and kernel.

Usage

1
tunedagsvm(testandtrainingsample, crossvalidationfolds = 10)

Arguments

testandtrainingsample

The provided test and training sample (data.frame objetc) as returned by gettestandtrainingsampledf.

crossvalidationfolds

A numeric value representing the number of folds (random subsets) to use during cross-validation.

Value

The function returns a list with two elements:

optimparam

A data.frame object containing for each node and kernel the tuned parameter values and various performance measures as returned by confusionMatrix.

svm_fit_list

A list with an element for each kernel and node of the constructed DAG-SVM. Each element represents the tuned SVM for each kernel and node. The elements are named as kernel_layer_node where kernel is the respective kernel, layer the index of the layer and node the index of the node in the layer.

Source

The function relies on the R packages raster (\insertCiteHijmans.2017TraceIdentification), e1071 (\insertCiteMeyer.2015TraceIdentification), caret (\insertCiteKuhn.2018TraceIdentification), Hmisc (\insertCiteHarrellJr.2018TraceIdentification), doParallel (\insertCiteWeston.2017TraceIdentification) and foreach (\insertCiteWeston.2017bTraceIdentification).

References

\insertAllCited

See Also

gettestandtrainingsampledf.

Examples

1
#

henningte/TraceIdentification documentation built on May 26, 2019, 6:50 p.m.