kernlab (version 0.9-13)

kqr-class: Class "kqr"

Description

The Kernel Quantile Regression object class

Arguments

Objects from the Class

Objects can be created by calls of the form new("kqr", ...). or by calling the kqr function

See Also

kqr, vm-class, ksvm-class

Examples

Run this code
# create data
x <- sort(runif(300))
y <- sin(pi*x) + rnorm(300,0,sd=exp(sin(2*pi*x)))

# first calculate the median
qrm <- kqr(x, y, tau = 0.5, C=0.15)

# predict and plot
plot(x, y)
ytest <- predict(qrm, x)
lines(x, ytest, col="blue")

# calculate 0.9 quantile
qrm <- kqr(x, y, tau = 0.9, kernel = "rbfdot", kpar= list(sigma=10), C=0.15)
ytest <- predict(qrm, x)
lines(x, ytest, col="red")

# print model coefficients and other information
coef(qrm)
b(qrm)
error(qrm)
kernelf(qrm)

Run the code above in your browser using DataCamp Workspace