Title: | Descent-Based Calibrated Optimal Direct Estimation |
---|---|
Description: | Algorithms for solving a self-calibrated l1-regularized quadratic programming problem without parameter tuning. The algorithm, called DECODE, can handle high-dimensional data without cross-validation. It is found useful in high dimensional portfolio selection (see Pun (2018) <https://ssrn.com/abstract=3179569>) and large precision matrix estimation and sparse linear discriminant analysis (see Pun and Hadimaja (2019) <https://ssrn.com/abstract=3422590>). |
Authors: | Chi Seng Pun, Matthew Zakharia Hadimaja |
Maintainer: | Chi Seng Pun <[email protected]> |
License: | GPL-2 |
Version: | 0.1.0 |
Built: | 2025-02-15 03:08:31 UTC |
Source: | https://github.com/cran/rDecode |
Implement DECODE
for sigma
and beta
to estimate where
sigma
is an estimator of and
beta
is an estimator of .
decode(sigma, beta, lambda0, decode.tol = 1e-06, decode.maxit = 100, trace = FALSE, solver = c("apg", "homotopy"), solver.tol = 1e-08, solver.maxit = 10000, return.sigma = FALSE, return.beta = FALSE, return.param = FALSE)
decode(sigma, beta, lambda0, decode.tol = 1e-06, decode.maxit = 100, trace = FALSE, solver = c("apg", "homotopy"), solver.tol = 1e-08, solver.maxit = 10000, return.sigma = FALSE, return.beta = FALSE, return.param = FALSE)
sigma |
|
beta |
|
lambda0 |
number between 0 and 1. |
decode.tol |
error tolerance for |
decode.maxit |
maximum iterations for |
trace |
logical. If |
solver |
solver for |
solver.tol |
tolerance for solver. |
solver.maxit |
maximum iterations for solver (only for APG). |
return.sigma |
logical. If |
return.beta |
logical. If |
return.param |
logical. If |
An object of class decode
containing:
eta |
|
theta |
final |
lambda |
final |
sigma.mult |
multiplier applied on |
total.iter |
number of iterations until convergence. |
call |
the matched call. |
method |
the solver used, if requested. |
lambda0 |
the |
decode.tol |
the |
decode.maxit |
the |
trace |
the |
solver.tol |
the |
solver.maxit |
the |
eta.trace |
matrix of |
theta.trace |
vector of |
lambda.trace |
vector of |
Pun, C. S. (2018). A Sparse Learning Approach to Relative-Volatility-Managed Portfolio Selection. Hadimaja, M. Z., & Pun, C. S. (2018). A Self-Calibrated Regularized Direct Estimation for Graphical Selection and Discriminant Analysis.
# estimate A^(-1) b with a certain lambda0 X <- matrix(rnorm(100), 10, 10) A <- t(X) %*% X b <- rnorm(10) object <- decode(A, b, lambda0 = 0.8) object summary(object) coef(object)
# estimate A^(-1) b with a certain lambda0 X <- matrix(rnorm(100), 10, 10) A <- t(X) %*% X b <- rnorm(10) object <- decode(A, b, lambda0 = 0.8) object summary(object) coef(object)
DECODE
for simple LDAImplement DECODE
for simple LDA. The LDA assumes both classes have equal prior probabilities. This implementation is used in Hadimaja and Pun (2018).
decodeLDA(X, y, lambda0 = NULL, ...)
decodeLDA(X, y, lambda0 = NULL, ...)
X |
|
y |
binary |
lambda0 |
number between 0 and 1. If |
... |
additional arguments to be passed to general decode function. |
An object of class decodeLDA
containing:
eta |
|
X |
training data used |
y |
training label used |
and various outputs from decode
function.
Hadimaja, M. Z., & Pun, C. S. (2018). A Self-Calibrated Regularized Direct Estimation for Graphical Selection and Discriminant Analysis.
# for efficiency, we will only use 500 variables # load the training data (Lung cancer data, cleaned) data(lung.train) # 145 x 1578 X.train <- lung.train[,1:500] y.train <- lung.train[,1578] # build the DECODE object <- decodeLDA(X.train, y.train) object summary(object) coef(object) # test on test data data(lung.test) X.test <- lung.test[,1:500] y.test <- lung.test[,1578] y.pred <- predict(object, X.test) table(y.pred, y.test)
# for efficiency, we will only use 500 variables # load the training data (Lung cancer data, cleaned) data(lung.train) # 145 x 1578 X.train <- lung.train[,1:500] y.train <- lung.train[,1578] # build the DECODE object <- decodeLDA(X.train, y.train) object summary(object) coef(object) # test on test data data(lung.test) X.test <- lung.test[,1:500] y.test <- lung.test[,1578] y.pred <- predict(object, X.test) table(y.pred, y.test)
DECODE
for simple precision matrix estimationImplement DECODE
to estimate a precision matrix of X
. This implementation is used in Hadimaja and Pun (2018).
decodePM(X, lambda0 = NULL, ...)
decodePM(X, lambda0 = NULL, ...)
X |
|
lambda0 |
number between 0 and 1. If |
... |
additional arguments to be passed to general decode function. |
An object of class decodePM
containing:
Omega |
|
lambda0 |
the |
X |
data used. |
theta |
final |
lambda |
final |
total.iter |
number of iterations until convergence for each column. |
Hadimaja, M. Z., & Pun, C. S. (2018). A Self-Calibrated Regularized Direct Estimation for Graphical Selection and Discriminant Analysis.
# estimate the precision matrix of iris data object <- decodePM(iris[,1:4], lambda0 = 0.01) object summary(object) object$Omega
# estimate the precision matrix of iris data object <- decodePM(iris[,1:4], lambda0 = 0.01) object summary(object) object$Omega
Preprocessed lung cancer test data of 1577 genes from 36 patients with lung cancer. There are 30 patients with adenocarcinoma (AD) and 6 patients with malignant pleural mesothelioma (MPM). The original data was used in Gordon et al. (2002), with this preprocessed version used in Pun and Hadimaja (2018).
data(lung.test)
data(lung.test)
A data frame with 36 observations on 1577 variables.
http://dx.doi.org/10.17632/ynp2tst2hh.4#file-673c9416-39ed-446d-9be9-37ac74353029
Gordon, G. J., Jensen, R. V., Hsiao, L. L., Gullans, S. R., Blumenstock, J. E., Ramaswamy, S., ... & Bueno, R. (2002). Translation of microarray data into clinically relevant cancer diagnostic tests using gene expression ratios in lung cancer and mesothelioma. Cancer research, 62(17), 4963-4967.
Preprocessed lung cancer training data of 1577 genes from 145 patients with lung cancer. There are 120 patients with adenocarcinoma (AD) and 25 patients with malignant pleural mesothelioma (MPM). The original data was used in Gordon et al. (2002), with this preprocessed version used in Pun and Hadimaja (2018).
data(lung.train)
data(lung.train)
A data frame with 145 observations on 1577 variables.
http://dx.doi.org/10.17632/ynp2tst2hh.4#file-673c9416-39ed-446d-9be9-37ac74353029
Gordon, G. J., Jensen, R. V., Hsiao, L. L., Gullans, S. R., Blumenstock, J. E., Ramaswamy, S., ... & Bueno, R. (2002). Translation of microarray data into clinically relevant cancer diagnostic tests using gene expression ratios in lung cancer and mesothelioma. Cancer research, 62(17), 4963-4967.