nckqr {fastkqr} | R Documentation |
Solve the non-crossing kernel quantile regression
Description
Trains the kernel quantile regression
Usage
nckqr(
x,
y,
lambda1,
lambda2,
tau,
delta = 0.125,
eps = 1e-08,
maxit = 5e+06,
gam = 1e-07,
sigma = NULL,
kernel = "rbfdot",
is_exact = FALSE
)
Arguments
x |
A numerical input matrix. The dimension is |
y |
Response variable. The length is |
lambda1 |
A user-supplied |
lambda2 |
A user-supplied |
tau |
A user-supplied |
delta |
The smoothing index for |
eps |
Stopping criterion. |
maxit |
Maximum number of iterates. |
gam |
A small number for numerical stability. |
sigma |
Kernel bandwidth. |
kernel |
Name of kernel function. Default is "Gaussian". |
is_exact |
Exact or approximated solutions. |
Details
The function implements the majorization-minimization method to solve non-crossing kernel quantile regression.
Value
An object with S3 class nckqr
alpha |
An |
tau |
The |
lambda1 |
The |
lambda2 |
The |
delta |
The smoothing index. |
npass |
The total number of iterates used to train the classifier. |
jerr |
Warnings and errors; 0 if none. |
info |
A list includes some settings used to fit this object: |
.
Examples
library(MASS)
lambda2 <- 1e-4
tau <- c(0.1, 0.3, 0.5, 0.7, 0.9)
lambda1 <- 10^seq(-8, 2, length.out=10)
data(GAGurine)
x <- as.matrix(GAGurine$Age)
y <- GAGurine$GAG
fit <- nckqr(x ,y, lambda1 = lambda1 , lambda2 = lambda2, tau = tau)