
Last chance! 50% off unlimited learning
Sale ends in
Should only be used by experts!
This initializes a svm
object and allocates in C++ an SVM model to which it keeps a reference.
init.liquidSVM(x, y, ...)# S3 method for formula
init.liquidSVM(x, y, ..., d = NULL)
# S3 method for default
init.liquidSVM(x, y, scenario = NULL,
useCells = NULL, ..., sampleWeights = NULL, groupIds = NULL,
ids = NULL, d = NULL)
either a formula or the features
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 train
ing and select
ion
the model is test
ed using the testing data (y$test
).
configuration parameters, see Configuration. Can be threads=2, display=1, gpus=1,
etc.
level of display information
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
if TRUE
partitions the problem (equivalent to partition_choice=6
)
vector of weights for every sample or NULL
(default) [currently has no effect]
vector of integer group ids for every sample or NULL
(default).
If not NULL
this will do group-wise folds, see folds_kind='GROUPED'
.
vector of integer ids for every sample or NULL
(default) [currently has no effect]
an object of type svm
formula
: Initialize SVM model using a a formula and data
default
: Initialize SVM model using a data frame and a label vector
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.
# NOT RUN {
modelTrees <- init.liquidSVM(Height ~ Girth + Volume, trees[1:20, ]) # least squares
modelIris <- init.liquidSVM(Species ~ ., iris) # multiclass classification
# }
Run the code above in your browser using DataLab