Description Usage Arguments Value Source References See Also Examples
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:
linear, sigmoidal, radial.
2^{-20}, 2^{-18}, <e2><80><a6>, 2^6 (not for the linear kernel)
In a first rough search step: 2^{-10}, 2^{-8}, <e2><80><a6>, 2^{10}.
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.
1 | tunedagsvm(testandtrainingsample, crossvalidationfolds = 10)
|
testandtrainingsample |
The provided test and training sample
( |
crossvalidationfolds |
A numeric value representing the number of folds (random subsets) to use during cross-validation. |
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.
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).
1 | #
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.