50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

classyfire (version 0.1-2)

getOptParam: Get the optimal SVM hyperparameters of a classification ensemble

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

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

Run this code
## 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)

Run the code above in your browser using DataLab