Class "kqr"
The Kernel Quantile Regression object class class
Objects can be created by calls of the form new("kqr", ...)
. or by calling the kqr
function
kernelf
:: Object of class "kfunction"
contains the kernel function usedkpar
:: Object of class "list"
contains the kernel parameter usedcoef
:: Object of class "ANY"
containing the model parametersparam
:: Object of class "list"
contains the cost parameter C and tau parameter usedkcall
:: Object of class "list"
contains the used function callterms
:: Object of class "ANY"
contains the terms representation of the symbolic model used (when using a formula)xmatrix
:: Object of class "input"
containing the data matrix usedymatrix
:: Object of class "output"
containing the response matrixfitted
:: Object of class "output"
containing the fitted valuesalpha
:: Object of class "listI"
containing the computes alpha valuesb
:: Object of class "numeric"
containing the offset of the model.scaling
: Object of class "ANY"
containing the scaling coefficients of the data (when case scaled = TRUE
is used).error
:: Object of class "numeric"
containing the training errorcross
:: Object of class "numeric"
containing the cross validation errorn.action
:: Object of class "ANY"
containing the action performed in NAnclass
:: Inherited from class vm
, not used in kqrlev
:: Inherited from class vm
, not used in kqrtype
:: Inherited from class vm
, not used in kqrsignature(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 errorsignature(object = "kqr")
: returns the training errorsignature(object = "vm")
: returns the fitted valuessignature(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
kqr
, vm-class
, ksvm-class
# 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)
Useful links