| Title: | Quantile-Based Discriminant Analysis for High-Dimensional Imbalanced Classification |
|---|---|
| Description: | Implements quantile-based discriminant analysis (QuanDA) for imbalanced classification in high-dimensional, low-sample-size settings. The method fits penalized quantile regression directly on discrete class labels and tunes the quantile level to reflect class imbalance. |
| Authors: | Qian Tang [aut, cre], Yuwen Gu [aut], Boxiang Wang [aut] |
| Maintainer: | Qian Tang <[email protected]> |
| License: | GPL-2 |
| Version: | 1.0.0 |
| Built: | 2026-05-23 07:55:15 UTC |
| Source: | https://github.com/cran/QuanDA |
A list containing predictor matrix X and binary response y.
data(breast)data(breast)
This data frame contains the following:
x |
gene expression levels. |
y |
Disease state that is coded as 1 and -1 |
data(breast)data(breast)
Produces fitted values for new predictor data using a fitted 'quanda()' object.
## S3 method for class 'quanda' predict(object, newx, type = c("class", "loss"), ...)## S3 method for class 'quanda' predict(object, newx, type = c("class", "loss"), ...)
object |
Fitted 'quanda()' object from which predictions are to be derived. |
newx |
Matrix of new predictor values for which predictions are desired. This must be a matrix and is a required argument. |
type |
Type of prediction required. Type '"class"' produces the predicted binary class labels and
type '"loss"' returns the fitted values. Default is |
... |
Not used. |
Numeric vector of length n_new.
data(breast) X <- as.matrix(X) y <- as.numeric(as.character(y)) y[y==-1]=0 fit <- quanda(X, y)data(breast) X <- as.matrix(X) y <- as.numeric(as.character(y)) y[y==-1]=0 fit <- quanda(X, y)
QuanDA fits a quantile-regression-based discriminant with label jittering.
For each candidate quantile level , the binary labels are jittered
(adding ), a penalized quantile regression is fit multiple times,
and the coefficient vectors are averaged. The best is selected by AUC.
quanda( x, y, lambda = 10^(seq(1, -4, length.out = 30)), lam2 = 0.01, n_rep = 10, tau_window = 0.05, nfolds = 5, maxit = 10000, eps = 1e-07, maxit_cv = 10000, eps_cv = 1e-05 )quanda( x, y, lambda = 10^(seq(1, -4, length.out = 30)), lam2 = 0.01, n_rep = 10, tau_window = 0.05, nfolds = 5, maxit = 10000, eps = 1e-07, maxit_cv = 10000, eps_cv = 1e-05 )
x |
A numeric matrix of predictors with |
y |
A binary response vector of length |
lambda |
Optional numeric vector of penalty values (largest |
lam2 |
Numeric, secondary penalty (ridge/elastic term) passed to |
n_rep |
Integer, number of jittering repetitions (averaged). Default |
tau_window |
Width around the class rate to explore quantiles.
Candidate |
nfolds |
Integer, number of CV folds used by |
maxit, maxit_cv, eps, eps_cv
|
Controls for inner optimizers and CV helper. |
We jitter labels via , where ,
fit penalized quantile regression at multiple , average coefficients over n_rep jitters,
compute AUCs on the original , and pick the that maximizes AUC.
An object of class "quanda" with elements:
Numeric vector of length (intercept first).
Numeric vector of candidate values.
Chosen .
Vector of AUCs across .
The matched call.
data(breast) X <- as.matrix(X) y <- as.numeric(as.character(y)) y[y==-1]=0 fit <- quanda(X, y) pred <- predict(fit, tail(X))data(breast) X <- as.matrix(X) y <- as.numeric(as.character(y)) y[y==-1]=0 fit <- quanda(X, y) pred <- predict(fit, tail(X))