Learn R Programming

ddgraph (version 1.16.0)

recalculateSVMparams: Calculate SVM hyperparameters based on grid search

Description

Find the cost/gamma parameters based on a grid search by best AUC and by limiting the number of support vectors. Currently only supports discreet binary data.

Usage

recalculateSVMparams(cost.range, gamma.range, d, class.weight=1/table(convertToFactor(d$class)), kernel="radial", max.prop.SV=0.9)

Arguments

cost.range
the range of cost parameter values to evaluate
gamma.range
the range of gamma parameter values to evaluate
d
the data.frame with variables as columns, the class labels must be labelled with "class"
class.weight
the class weights to use (if there is an large bias for positive/negative class)
kernel
kernel type to use (takes valid package e1071 names like "radial")
max.prop.SV
the maximal proportion of support vectors to number of data points (rows in d)

Value