kqr-class {kernlab} | R Documentation |
The Kernel Quantile Regression object class
Objects can be created by calls of the form new("kqr", ...)
.
or by calling the kqr
function
kernelf
:"kfunction"
contains
the kernel function usedkpar
:"list"
contains the
kernel parameter used param
:"list"
contains the
cost parameter C and tau parameter used kcall
:"list"
contains the used
function call terms
:"ANY"
contains the
terms representation of the symbolic model used (when using a formula)xmatrix
:"input"
containing
the data matrix used ymatrix
:"output"
containing the
response matrixfitted
:"output"
containing the
fitted values alpha
:"listI"
containing the
computes alpha values b
:"numeric"
containg the
offset of the model.scaling
"ANY"
containing
the scaling coefficients of the data (when case scaled = TRUE
is used).error
:"numeric"
containing the
training errorcross
:"numeric"
containing the
cross validation errorn.action
:"ANY"
containing the
action performed in NA signature(object = "kqr")
: returns the
coefficients (alpha) of the modelsignature(object = "kqr")
: returns the alpha
vector (identical to coef
)signature(object = "kqr")
: returns the offset beta
of the model.signature(object = "kqr")
: returns the cross
validation error signature(object = "kqr")
: returns the
training error signature(object = "vm")
: returns the fitted values signature(object = "kqr")
: returns the call performedsignature(object = "kqr")
: returns the
kernel function usedsignature(object = "kqr")
: returns the kernel
parameter usedsignature(object = "kqr")
: returns the
cost regularization parameter C and tau usedsignature(object = "kqr")
: returns the
data matrix usedsignature(object = "kqr")
: returns the
response matrix usedsignature(object = "kqr")
: returns the
scaling coefficients of the data (when scaled = TRUE
is used)
Alexandros Karatzoglou
alexandros.karatzoglou@ci.tuwien.ac.at
# 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)