Learn R Programming

liquidSVM (version 1.2.4)

lsSVM: Least Squares Regression

Description

This routine performs non-parametric least squares regression using SVMs. The tested estimators are therefore estimating the conditional means of Y given X. svmRegression is a simple alias of lsSVM.

Usage

lsSVM(x, y, ..., clipping = -1, do.select = TRUE)

svmRegression(x, y, ..., clipping = -1, do.select = TRUE)

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.

clipping

absolute value where the estimated labels will be clipped. -1 (the default) leads to an adaptive clipping value, whereas 0 disables clipping.

do.select

if TRUE also does the whole selection for this model

Value

an object of type svm. Depending on the usage this object has also $train_errors, $select_errors, and $last_result properties.

Details

This is the default for svm if the labels are not a factor.

Examples

Run this code
# NOT RUN {
tt <- ttsplit(quakes)
model <- lsSVM(mag~., tt$train, display=1)
result <- test(model, tt$test)

errors(result) ## is the same as
mean( (tt$test$mag-result)^2 )
# }

Run the code above in your browser using DataLab