qtSVM: Quantile Regression

Description Usage Arguments Value Examples

View source: R/scenarios.R

Description

This routine performs non-parametric and quantile regression using SVMs. The tested estimators are therefore estimating the conditional tau-quantiles of Y given X. By default, estimators for five different tau values are computed. svmQuantileRegression is a simple alias of qtSVM.

Usage

1
2
3
4
5
qtSVM(x, y, ..., weights = c(0.05, 0.1, 0.5, 0.9, 0.95), clipping = -1,
  do.select = TRUE)

svmQuantileRegression(x, y, ..., weights = c(0.05, 0.1, 0.5, 0.9, 0.95),
  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.

weights

the quantiles that should be estimated

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.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
tt <- ttsplit(quakes)
model <- qtSVM(mag~., tt$train, display=1)
result <- test(model, tt$test)

errors(result)[2] ## is the same as
mean(ifelse(result[,2]<tt$test$mag, -.1,.9) * (result[,2]-tt$test$mag))

## End(Not run)

Example output

sh: 1: grep: Permission denied
sh: 1: /bin/cat: Permission denied
sh: 1: grep: Permission denied
sh: 1: /bin/cat: Permission denied

Welcome to SVM train (dim=4 size=800 decision_functions=0 cookie=1)
liquidSVM-train -r 1 -s -1 -S 3 -P 0 -f 3 5 -g 10 0.200000 5.000000 -l 10 0.001000 0.010000 -a 0 -w [ 0.05 0.1 0.5 0.9 0.95 ] -L 4 -d 1 -T 0 -GPU 0 
Assigning samples to cells for task 0.

Considering cell 1 out of 1 for task 1 out of 1.
Fold 1: training set size 640,   validation set size 160.
Fold 2: training set size 640,   validation set size 160.
Fold 3: training set size 640,   validation set size 160.
Fold 4: training set size 640,   validation set size 160.
Fold 5: training set size 640,   validation set size 160.
tpt: 0.01  tbt: 0.27  tnt: 0.01   vpt: 0.00  vbt: 0.09   it: 0.067  tt: 0.434  vt: 0.250   ii:  140077  ti:  213759  tu:  427518  vi: 803679   h2D: 0.094

Welcome to SVM select (dim=4 size=800 decision_functions=0 cookie=1)
liquidSVM-select -R 1 -W 1 -d 1 

Considering cell 1 out of 1 for task 1 out of 1.
Fold 1: best validation error 0.0301.
Fold 2: best validation error 0.0318.
Fold 3: best validation error 0.0293.
Fold 4: best validation error 0.0316.
Fold 5: best validation error 0.0302.

Warning: The best gamma was 0 times at the lower boundary and 3 times at the
upper boundary of your gamma grid. 5 times a gamma value was selected.

Warning: The best lambda was 0 times at the lower boundary and 2 times at the
upper boundary of your lambda grid. 5 times a lambda value was selected.

Welcome to SVM select (dim=4 size=800 decision_functions=5 cookie=1)
liquidSVM-select -R 1 -W 2 -d 1 

Considering cell 1 out of 1 for task 1 out of 1.
Fold 1: best validation error 0.0557.
Fold 2: best validation error 0.0598.
Fold 3: best validation error 0.0528.
Fold 4: best validation error 0.0561.
Fold 5: best validation error 0.0550.

Warning: The best gamma was 0 times at the lower boundary and 8 times at the
upper boundary of your gamma grid. 5 times a gamma value was selected.

Warning: The best lambda was 0 times at the lower boundary and 2 times at the
upper boundary of your lambda grid. 5 times a lambda value was selected.

Welcome to SVM select (dim=4 size=800 decision_functions=10 cookie=1)
liquidSVM-select -R 1 -W 3 -d 1 

Considering cell 1 out of 1 for task 1 out of 1.
Fold 1: best validation error 0.1321.
Fold 2: best validation error 0.1313.
Fold 3: best validation error 0.1174.
Fold 4: best validation error 0.1524.
Fold 5: best validation error 0.1284.

Warning: The best gamma was 0 times at the lower boundary and 13 times at the
upper boundary of your gamma grid. 5 times a gamma value was selected.

Warning: The best lambda was 0 times at the lower boundary and 2 times at the
upper boundary of your lambda grid. 5 times a lambda value was selected.

Welcome to SVM select (dim=4 size=800 decision_functions=15 cookie=1)
liquidSVM-select -R 1 -W 4 -d 1 

Considering cell 1 out of 1 for task 1 out of 1.
Fold 1: best validation error 0.0656.
Fold 2: best validation error 0.0689.
Fold 3: best validation error 0.0616.
Fold 4: best validation error 0.0872.
Fold 5: best validation error 0.0649.

Warning: The best gamma was 0 times at the lower boundary and 18 times at the
upper boundary of your gamma grid. 5 times a gamma value was selected.

Warning: The best lambda was 0 times at the lower boundary and 2 times at the
upper boundary of your lambda grid. 5 times a lambda value was selected.

Welcome to SVM select (dim=4 size=800 decision_functions=20 cookie=1)
liquidSVM-select -R 1 -W 5 -d 1 

Considering cell 1 out of 1 for task 1 out of 1.
Fold 1: best validation error 0.0375.
Fold 2: best validation error 0.0440.
Fold 3: best validation error 0.0369.
Fold 4: best validation error 0.0531.
Fold 5: best validation error 0.0391.

Warning: The best gamma was 0 times at the lower boundary and 23 times at the
upper boundary of your gamma grid. 5 times a gamma value was selected.

Warning: The best lambda was 0 times at the lower boundary and 2 times at the
upper boundary of your lambda grid. 5 times a lambda value was selected.
Warning messages:
1: In selectSVMs(model, weight_number = i) :
  Solution may not be optimal: try training again using max_gamma=25
2: In selectSVMs(model, weight_number = i) :
  Solution may not be optimal: try training again using max_gamma=25
3: In selectSVMs(model, weight_number = i) :
  Solution may not be optimal: try training again using max_gamma=25
4: In selectSVMs(model, weight_number = i) :
  Solution may not be optimal: try training again using max_gamma=25
5: In selectSVMs(model, weight_number = i) :
  Solution may not be optimal: try training again using max_gamma=25

Welcome to SVM test (using SVM with dim=4 trained on size=800 decision_functions=25 cookie=1)
liquidSVM-test -L 4 -v 1 1 -d 1 -T 0 -GPU 0 
Task 1: Test error 0.0307.
Task 2: Test error 0.0569.
Task 3: Test error 0.1362.
Task 4: Test error 0.0591.
Task 5: Test error 0.0368.
[1] 0.05689601
[1] 0.05689601

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