init.liquidSVM: Initialize an SVM object.

Description Usage Arguments Details Value Methods (by class) See Also Examples

View source: R/liquidSVM.R

Description

Should only be used by experts! This initializes a svm object and allocates in C++ an SVM model to which it keeps a reference.

Usage

1
2
3
4
5
6
7
8
9
init.liquidSVM(x, y, ...)

## S3 method for class 'formula'
init.liquidSVM(x, y, ..., d = NULL)

## Default S3 method:
init.liquidSVM(x, y, scenario = NULL,
  useCells = NULL, ..., sampleWeights = NULL, groupIds = NULL,
  ids = NULL, d = NULL)

Arguments

x

either a formula or the features

y

either the data or the labels corresponding to the features x. It can be a character in which case the data is loaded using liquidData. If it is of type liquidData then after training and selection the model is tested using the testing data (y$test).

...

configuration parameters, see Configuration. Can be threads=2, display=1, gpus=1, etc.

d

level of display information

scenario

configures the model for a learning scenario: E.g. scenario='ls', scenario='mc', scenario='npl', scenario='qt' etc. Unlike the specialized functions qtSVM, exSVM, nplSVM etc. this does not trigger the correct select

useCells

if TRUE partitions the problem (equivalent to partition_choice=6)

sampleWeights

vector of weights for every sample or NULL (default) [currently has no effect]

groupIds

vector of integer group ids for every sample or NULL (default). If not NULL this will do group-wise folds, see folds_kind='GROUPED'.

ids

vector of integer ids for every sample or NULL (default) [currently has no effect]

Details

Since it binds heap memory it has to be released using clean.liquidSVM which is also performed at garbage collection.

The training data can either be provided using a formula and a corresponding data.frame or the features and the labels are given directly.

Value

an object of type svm

Methods (by class)

See Also

svm, predict.liquidSVM, test.liquidSVM and clean.liquidSVM

Examples

1
2
modelTrees <- init.liquidSVM(Height ~ Girth + Volume, trees[1:20, ])  # least squares
modelIris <- init.liquidSVM(Species ~ ., iris)  # multiclass classification

liquidSVM documentation built on Sept. 15, 2019, 1:02 a.m.