svmOptimisation: svm parameter optimisation

View source: R/machinelearning-functions-svm.R

svmOptimisationR Documentation

svm parameter optimisation

Description

Classification parameter optimisation for the support vector machine algorithm.

Usage

svmOptimisation(
  object,
  fcol = "markers",
  cost = 2^(-4:4),
  sigma = 10^(-3:2),
  times = 100,
  test.size = 0.2,
  xval = 5,
  fun = mean,
  seed,
  verbose = TRUE,
  ...
)

Arguments

object

An instance of class "MSnSet".

fcol

The feature meta-data containing marker definitions. Default is markers.

cost

The hyper-parameter. Default values are 2^-4:4.

sigma

The hyper-parameter. Default values are 10^(-2:3).

times

The number of times internal cross-validation is performed. Default is 100.

test.size

The size of test data. Default is 0.2 (20 percent).

xval

The n-cross validation. Default is 5.

fun

The function used to summarise the xval macro F1 matrices.

seed

The optional random number generator seed.

verbose

A logical defining whether a progress bar is displayed.

...

Additional parameters passed to svm from package e1071.

Details

Note that when performance scores precision, recall and (macro) F1 are calculated, any NA values are replaced by 0. This decision is motivated by the fact that any class that would have either a NA precision or recall would result in an NA F1 score and, eventually, a NA macro F1 (i.e. mean(F1)). Replacing NAs by 0s leads to F1 values of 0 and a reduced yet defined final macro F1 score.

Value

An instance of class "GenRegRes".

Author(s)

Laurent Gatto

See Also

svmClassification and example therein.


lgatto/pRoloc documentation built on Oct. 23, 2024, 12:51 a.m.