predict.liquidSVM: Predicts labels of new data using the selected SVM.

Description Usage Arguments Details Value See Also Examples

View source: R/liquidSVM.R

Description

After training and selection the SVM provides means to compute predictions for new input features. If you have also labels consider using test.liquidSVM.

Usage

1
2
## S3 method for class 'liquidSVM'
predict(object, newdata, ...)

Arguments

object

the SVM model as returned by init.liquidSVM

newdata

data frame of features to predict. If it has all the explanatory variables of formula, then the respective subset is taken.

...

other parameters passed to test.liquidSVM

Details

In the multi-result learning scenarios this returns all the predictions corresponding to the different quantiles, expectiles, etc. For multi-class classification, if the model was setup with predict.prob=TRUE Then this will return only the probability columns and not the prediction.

Value

the predicted values of test

See Also

init.liquidSVM and test.liquidSVM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
## Multiclass classification
modelIris <- svm(Species ~ ., iris)
y <- predict(modelIris, iris)

## Least Squares
modelTrees <- svm(Height ~ Girth + Volume, trees)
y <- predict(modelTrees, trees)
plot(trees$Height, y)

## End(Not run)

Example output

Warning message:
In (function (model, command.args = NULL, ..., d = NULL, warn.suboptimal = getOption("liquidSVM.warn.suboptimal",  :
  Solution may not be optimal: try training again using max_gamma=25

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