Compute quantile regression via accelerated gradient descent using Huber approximation, warm start based on data subset
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | fit_approx_quantile_model(
  X,
  y,
  X_sub,
  y_sub,
  tau,
  init_beta,
  mu = 1e-15,
  maxiter = 100000L,
  beta_tol = 1e-04,
  check_tol = 1e-06,
  intercept = 1L,
  num_samples = 1000,
  warm_start = 1L,
  scale = 1L,
  lambda = 0,
  min_delta = 1e-10
)
 | 
| X | design matrix | 
| y | outcome vector | 
| X_sub | subset of X matrix to use for "warm start" regression | 
| y_sub | subset of y to use for "warm start" regression | 
| tau | target quantile | 
| init_beta | initial guess at beta | 
| mu | neighborhood over which to smooth | 
| maxiter | maximum number of iterations to run | 
| beta_tol | tolerance for largest element of gradient, used for early stopping | 
| check_tol | loss function change tolerance for early stopping | 
| intercept | location of the intercept column, using R's indexing | 
| num_samples | number of samples used for subset of matrix used for warm start | 
| warm_start | integer indicating whether to "warm up" on a subsample of the data | 
| scale | whether to scale x & y variables | 
| lambda | optional lasso penalty weight | 
| min_delta | smallest allowed step size for gradient descent | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.