multqrsvm: Fits multiple Quantile Regression SVM

Description Usage Arguments Details Value References Examples

View source: R/multqrsvm.R

Description

Fits multiple Quantile Regression SVM

Usage

1
2
3
multqrsvm(x, y, kernel = "rbfdot", cost = 1, tau = c(0.05, 0.25, 0.5,
  0.75, 0.95), sigma = 5, degree = 2, scale = 1, offset = 1,
  order = 1, doPar = FALSE, clustnum = 2)

Arguments

x

An n X m matrix containing the predictors (n= number of observatiosn, m = number of predictors) .

y

The Response onto which the qrsvm shall be fitted

kernel

a string giving the type of kernels from package kernlab to use f.e. "rbfdot" for Radial Basis Function Kernel. All Kernels except "stringdot" supported.

cost

The Cost parameter see f.e. package "e1071" and "kernlab"

tau

The Quantile that shall be estimated. A Vector of values (0<=tau<=1)

sigma

A possible tuning parameter for specific Kernelfunctions, see package kernlab.

degree

A possible tuning parameter for specific Kernelfunctions, see package kernlab.

scale

A possible tuning parameter for specific Kernelfunctions, see package kernlab.

offset

A possible tuning parameter for specific Kernelfunctions, see package kernlab.

order

A possible tuning parameter for specific Kernelfunctions, see package kernlab.

doPar

Should a parallel backend be used. Logical.

clustnum

The number of parallel tasks to use given doPar==TRUE. Default = 2.

Details

There is no preimplemented scaling of the input variables which should be considered beforehand. Also optimization is based on "quadprog:solve.QP" function which can be considerably slow compared to other SVM implementations.

Value

An object of class "qrsvm"

References

"Nonparametric Quantile Regression" by I.Takeuchi, Q.V. Le, T. Sears, A.J. Smola (2004)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n<-200

x<-as.matrix(seq(-2,2,length.out = n))
y<-rnorm(n)*(0.3+abs(sin(x)))

plot(x,y)

models<-list()
quant<-c(0.01,0.25,0.5,0.75,0.99)
models<-multqrsvm(x,y,tau = quant, doPar=FALSE, sigma = 1)
for(i in 1:length(models)){
 lines(x, models[[i]]$fitted, col="red")
}

Example output



qrsvm documentation built on May 2, 2019, 4:02 p.m.

Related to multqrsvm in qrsvm...