getOptParam: Get the optimal SVM hyperparameters of a classification...

Description Usage Arguments Value Examples

View source: R/stats.R

Description

To allow detailed reporting of the methods used to create classifiers, the getOptParam function retrieves the optimum hyperparameters for each SVM within an ensemble classifier, built using cfBuild.

Usage

1
getOptParam(ensObj)

Arguments

ensObj

The classification ensemble (in the form of an R list) as generated by cfBuild

Value

Returns a matrix containing the optimal gamma and optimal cost for each SVM in the classification ensemble. For information about what these hyperparameters are and how they are determined, see the documentation for cfBuild.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
data(iris)

irisClass <- iris[,5]
irisData  <- iris[,-5]

ens <- cfBuild(irisData, irisClass, bootNum = 100, ensNum = 100, parallel = TRUE, 
               cpus = 4, type = "SOCK")

# Get the optimal SVM hyperparameters of the classification ensemble
optParam <- getOptParam(ens)
optParam

## End(Not run)

classyfire documentation built on May 29, 2017, 11:05 p.m.