The pye package provides an advanced framework for simultaneous variable selection and prediction within low- and high-dimensional binary classification contexts. Its core methodology focuses on maximizing the penalized Youden index function \(F_{Y=0}(\theta) - F_{Y=1}(\theta) - \Phi(\theta)\) with respect of the parameter vector \(\theta\), where \(F_{Y=y}(\theta)\) represents the distribution function of the feature combination for class \(Y=y\) and \(\Phi(\theta)\) is a sparsity-inducing penalty term. For the Penalized Youden Index Estimator (pye) - https://doi.org/10.1016/j.chemolab.2023.104786 -, \(\theta\) corresponds to the coefficients of a linear combination of biomarkers \(\beta\) together with diagnostic cut-off point \(c\). For the Covariate-Adjusted Youden Index Estimator (covYI), the biomarker score is a single known marker, and \(\theta\) denotes the coefficients of the linear combination of covariate that define the diagnostic cut-off point \(c\). pye is particularly suited for applications in medical diagnostics, where identifying a subset of relevant biomarkers is crucial for effective disease classification. covYI extends this framework by allowing the diagnostic cut-off to depend on patient covariates, thereby enhancing the accuracy of the biomarkers in heterogeneous populations.
The package implements two primary methodologies:
Penalized Youden Index Estimator (pye): The base estimator combining the Youden index function with sparsity-inducing penalization techniques (Lasso, SCAD, MCP) for simultaneous biomarker selection.
Covariate-Adjusted Youden Index Estimator (covYI): An extension of pye that allows the optimal diagnostic cut-off to be a linear function of patient covariates, improving the classification accuracy of the biomarker score.
This section outlines a typical workflow. In practice, the user must
define the specific functions for the gradient (delta_fx)
and the proximal operator (proxx) based on their chosen
penalty (e.g., SCAD, L1) and data structure.
# Load the package
library(pye)
# 1. Simulate data for the example
set.seed(123) # Always good to set a seed for reproducibility in examples
cols <- 200
cols_cov <- 20
max_rho <- 0.2
rows_train <- 200
sim_data <- create_sample_with_covariates(rows_train = rows_train,
cols = cols,
cols_cov = cols_cov,
max_rho = max_rho,
seed = 1)
df <- sim_data$train_df_scaled
X <- sim_data$X
y <- sim_data$y
C <- sim_data$C
regressors_betas <- sim_data$nregressors # True betas for evaluation
regressors_gammas <- sim_data$ncovariates # True gammas for evaluation
# 2. Set cross-validation parameters
penalty <- "SCAD" # Penalty for betas in pye estimation
penalty_g <- "L12" # Penalty for gammas in covYI estimation
trend <- "monotone" # Trend for the KS estimation
alpha <- 0.5
c_function_of_covariates <- TRUE # Use covariates for 'c' estimation
used_cores <- 1 # For this example, no parallelization
max_iter <- 10 # Keep iterations low for a quick example run
n_folds <- 3
# 3. Calibrate lambda_max and lambda_min for betas (pye estimation)
lambda_seq <- create_lambda(n = 4, lmax = 1.5, lmin = 0.1)
lambda_seq <- as.numeric(formatC(lambda_seq, format = "e", digits = 9))
# 4. Calibrate tau_max and tau_min for gammas (covYI estimation), if
tau_seq <- create_lambda(n = 4, lmax = 0.15, lmin = 0.05)
tau_seq <- as.numeric(formatC(tau_seq, format = "e", digits = 9))
# 5. Run the cross-validation
pye_cv_result <- pye_KS_compute_cv(
n_folds = n_folds,
df = df,
X = X,
y = y,
C = C,
lambda = lambda_seq,
tau = tau_seq,
trace = 1, # Show final results
alpha = alpha,
penalty = penalty,
regressors_betas = regressors_betas,
regressors_gammas = regressors_gammas,
seed = 1,
used_cores = used_cores,
trend = trend,
max_iter = max_iter,
c_function_of_covariates = c_function_of_covariates,
measure_to_select_lambda = "ccr",
penalty_g = penalty_g,
trend_g = trend,
max_iter_g = max_iter
)
#> Starting CV with the following estimation/convergence parameters:
#> max_iter: 10
#> min_alpha: 1e-10
#> convergence_error: 1e-07
#> stepsizeShrink: 0.8
#> c_function_of_covariates: FALSE
#> ----------------------------------------------------------------
#> | starting with the 1 -th fold for the CV of lambda |
#> ----------------------------------------------------------------
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ;
#> total iters: 10 ; Backtraking iters: 2801 ; lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1439 ; youden_index: 0.4301 ; sensitivity: 0.8169 ; specificity: 0.8871 ; geometric_mean: 0.8513 ; fdr: 0.1077 ; mcc: 0.7026 ; auc: 0.9339 ; corrclass: 0.8496 ;
#> TP: 58 ; TN: 55 ; FP: 7 ; FN: 13 ; betas:
#> norm2 norm51 norm52 norm85 norm101 norm102 norm151
#> -8.883e-03 3.638e-02 -5.276e-02 4.132e-05 4.879e-02 -8.119e-03 3.583e-02
#> c
#> 4.209e-03
#> Estimation time: 0.4234 mins
#>
#>
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ;
#> total iters: 7 ; Backtraking iters: 1072 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.4096 ; youden_index: 0.8015 ; sensitivity: 0.9577 ; specificity: 1 ; geometric_mean: 0.9786 ; fdr: 0 ; mcc: 0.9558 ; auc: 0.992 ; corrclass: 0.9774 ;
#> TP: 68 ; TN: 62 ; FP: 0 ; FN: 3 ; betas:
#> norm2 norm7 norm12 norm19 norm35 norm36 norm39 norm48
#> -0.038653 0.001023 -0.001766 0.002524 0.003457 0.002034 -0.001358 -0.018633
#> norm51 norm52
#> 0.072787 -0.106127
#> [ reached getOption("max.print") -- omitted 28 entries ]
#> Estimation time: 0.3206 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ;
#> total iters: 10 ; Backtraking iters: 958 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.6462 ; youden_index: 0.9474 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 71 ; TN: 62 ; FP: 0 ; FN: 0 ; betas:
#> norm2 norm7 norm19 norm23 norm33 norm38 norm39
#> -5.493e-02 2.611e-02 8.883e-04 -1.700e-02 -9.422e-12 -1.228e-04 -2.071e-02
#> norm48 norm51 norm52
#> -4.322e-02 8.497e-02 -1.301e-01
#> [ reached getOption("max.print") -- omitted 40 entries ]
#> Estimation time: 0.3424 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ;
#> total iters: 10 ; Backtraking iters: 336 ; lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.7432 ; youden_index: 0.9736 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 71 ; TN: 62 ; FP: 0 ; FN: 0 ; betas:
#> norm2 norm7 norm23 norm39 norm48 norm51 norm52 norm55
#> -0.09533 0.05259 -0.03704 -0.03610 -0.10607 0.20820 -0.30154 -0.05035
#> norm56 norm60
#> 0.13052 -0.09013
#> [ reached getOption("max.print") -- omitted 22 entries ]
#> Estimation time: 0.08017 mins
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 1 ;
#> lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.04325 ; youden_index: 0.3656 ; sensitivity: 0.8056 ; specificity: 0.7419 ; geometric_mean: 0.7731 ; fdr: 0.2162 ; mcc: 0.549 ; auc: 0.8656 ; corrclass: 0.7761
#> TP: 29 ; TN: 23 ; FP: 8 ; FN: 7 ; betas:
#> norm2 norm51 norm52 norm85 norm101 norm102 norm151
#> -8.883e-03 3.638e-02 -5.276e-02 4.132e-05 4.879e-02 -8.119e-03 3.583e-02
#> c
#> 4.209e-03
#> Cross-validation time: 0.4234 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 1 ;
#> lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.09793 ; youden_index: 0.4041 ; sensitivity: 0.8333 ; specificity: 0.8065 ; geometric_mean: 0.8198 ; fdr: 0.1667 ; mcc: 0.6398 ; auc: 0.9041 ; corrclass: 0.8209
#> TP: 30 ; TN: 25 ; FP: 6 ; FN: 6 ; betas:
#> norm2 norm7 norm12 norm19 norm35 norm36 norm39
#> -0.0386530 0.0010231 -0.0017658 0.0025245 0.0034575 0.0020343 -0.0013577
#> norm48 norm51 norm52 norm56 norm60 norm62 norm63
#> -0.0186333 0.0727869 -0.1061266 0.0239432 -0.0183848 -0.0065960 0.0041911
#> norm68 norm81 norm85 norm87 norm90 norm100 norm101
#> -0.0137400 -0.0002867 0.0176195 0.0006448 -0.0001538 0.0008860 0.0861813
#> norm102 norm119 norm123 norm128 norm134 norm136 norm137
#> -0.0615628 -0.0096232 0.0073251 0.0046528 0.0085929 0.0011488 -0.0046215
#> norm151 norm164 norm171 norm172 norm175 norm182 norm189
#> 0.0672071 0.0024349 0.0257507 0.0144692 -0.0041685 0.0022548 -0.0011191
#> norm194 norm199 c
#> 0.0002176 -0.0082597 0.0014823
#> Cross-validation time: 0.3206 ; Number of iterations: 7
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 1 ;
#> lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.08839 ; youden_index: 0.3056 ; sensitivity: 0.75 ; specificity: 0.6774 ; geometric_mean: 0.7128 ; fdr: 0.2703 ; mcc: 0.4286 ; auc: 0.8056 ; corrclass: 0.7164
#> TP: 27 ; TN: 21 ; FP: 10 ; FN: 9 ; betas:
#> norm2 norm7 norm19 norm23 norm33 norm38 norm39
#> -5.493e-02 2.611e-02 8.883e-04 -1.700e-02 -9.422e-12 -1.228e-04 -2.071e-02
#> norm48 norm51 norm52 norm54 norm55 norm56 norm60
#> -4.322e-02 8.497e-02 -1.301e-01 -1.487e-03 -2.805e-02 4.575e-02 -4.297e-02
#> norm62 norm63 norm68 norm78 norm81 norm84 norm85
#> -2.932e-02 6.070e-03 -3.597e-03 2.328e-03 -2.429e-03 -1.606e-03 4.013e-02
#> norm87 norm90 norm93 norm99 norm100 norm101 norm102
#> 3.208e-02 -3.774e-03 4.728e-03 -2.031e-03 3.562e-04 1.080e-01 -1.071e-01
#> norm107 norm116 norm118 norm119 norm123 norm128 norm134
#> -9.170e-04 -2.780e-03 -3.537e-03 -1.569e-02 2.667e-02 3.345e-02 2.909e-02
#> norm137 norm146 norm148 norm151 norm152 norm160 norm164
#> -6.717e-03 2.481e-12 -6.616e-03 8.708e-02 -6.304e-04 9.685e-04 1.148e-03
#> norm171 norm172 norm182 norm184 norm189 norm196 norm199
#> 3.961e-02 3.715e-02 2.537e-02 2.590e-02 -7.419e-03 3.037e-03 -2.769e-02
#> c
#> -7.046e-03
#> Cross-validation time: 0.3424 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 1 ;
#> lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1735 ; youden_index: 0.3038 ; sensitivity: 0.75 ; specificity: 0.6452 ; geometric_mean: 0.6956 ; fdr: 0.2895 ; mcc: 0.3977 ; auc: 0.8038 ; corrclass: 0.7015
#> TP: 27 ; TN: 20 ; FP: 11 ; FN: 9 ; betas:
#> norm2 norm7 norm23 norm39 norm48 norm51 norm52 norm55
#> -0.095328 0.052588 -0.037036 -0.036104 -0.106066 0.208202 -0.301543 -0.050351
#> norm56 norm60 norm62 norm68 norm78 norm81 norm85 norm87
#> 0.130519 -0.090131 -0.031066 -0.010497 0.006443 -0.028826 0.101753 0.054334
#> norm101 norm102 norm118 norm119 norm123 norm128 norm134 norm137
#> 0.243413 -0.236360 -0.004181 -0.008083 0.049554 0.087110 0.036275 -0.011315
#> norm148 norm151 norm171 norm172 norm182 norm184 norm199 c
#> -0.020250 0.210508 0.087033 0.052670 0.033252 0.030829 -0.045795 -0.005458
#> Cross-validation time: 0.08017 ; Number of iterations: 10
#>
#>
#> ----------------------------------------------------------------
#> | starting with the 2 -th fold for the CV of lambda |
#> ----------------------------------------------------------------
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ;
#> total iters: 9 ; Backtraking iters: 2063 ; lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1274 ; youden_index: 0.3514 ; sensitivity: 0.7183 ; specificity: 0.8387 ; geometric_mean: 0.7762 ; fdr: 0.1639 ; mcc: 0.5577 ; auc: 0.8682 ; corrclass: 0.7744 ;
#> TP: 51 ; TN: 52 ; FP: 10 ; FN: 20 ; betas:
#> norm2 norm51 norm52 norm101 norm102 c
#> -3.042e-02 2.970e-03 -8.125e-02 3.468e-02 -1.046e-11 9.826e-03
#> Estimation time: 0.4589 mins
#>
#>
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ;
#> total iters: 6 ; Backtraking iters: 655 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.379 ; youden_index: 0.7511 ; sensitivity: 0.9718 ; specificity: 0.9355 ; geometric_mean: 0.9535 ; fdr: 0.05479 ; mcc: 0.9096 ; auc: 0.993 ; corrclass: 0.9549 ;
#> TP: 69 ; TN: 58 ; FP: 4 ; FN: 2 ; betas:
#> norm2 norm7 norm12 norm22 norm34 norm36 norm40 norm51
#> -0.078068 0.001017 -0.030436 -0.008491 0.002881 0.012551 -0.001568 0.039504
#> norm52 norm55
#> -0.112806 -0.012067
#> [ reached getOption("max.print") -- omitted 34 entries ]
#> Estimation time: 0.2256 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ;
#> total iters: 10 ; Backtraking iters: 398 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.621 ; youden_index: 0.9351 ; sensitivity: 0.9859 ; specificity: 1 ; geometric_mean: 0.9929 ; fdr: 0 ; mcc: 0.985 ; auc: 0.9986 ; corrclass: 0.9925 ;
#> TP: 70 ; TN: 62 ; FP: 0 ; FN: 1 ; betas:
#> norm2 norm4 norm7 norm12 norm16 norm19 norm22
#> -0.0982438 -0.0045076 0.0012349 -0.0413095 0.0022233 0.0023343 -0.0271606
#> norm29 norm32 norm34
#> -0.0006758 -0.0021577 0.0088901
#> [ reached getOption("max.print") -- omitted 61 entries ]
#> Estimation time: 0.08021 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ;
#> total iters: 10 ; Backtraking iters: 383 ; lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.7666 ; youden_index: 0.9071 ; sensitivity: 0.9859 ; specificity: 0.9516 ; geometric_mean: 0.9686 ; fdr: 0.0411 ; mcc: 0.9399 ; auc: 0.9984 ; corrclass: 0.9699 ;
#> TP: 70 ; TN: 59 ; FP: 3 ; FN: 1 ; betas:
#> norm2 norm12 norm16 norm19 norm22 norm28 norm29 norm32
#> -0.093286 -0.025668 0.013286 0.004502 -0.025337 -0.002432 -0.007680 -0.005990
#> norm34 norm35
#> 0.010927 0.001249
#> [ reached getOption("max.print") -- omitted 57 entries ]
#> Estimation time: 0.1002 mins
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 2 ;
#> lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.09457 ; youden_index: 0.3342 ; sensitivity: 0.75 ; specificity: 0.6129 ; geometric_mean: 0.678 ; fdr: 0.3077 ; mcc: 0.3669 ; auc: 0.8342 ; corrclass: 0.6866
#> TP: 27 ; TN: 19 ; FP: 12 ; FN: 9 ; betas:
#> norm2 norm51 norm52 norm101 norm102 c
#> -3.042e-02 2.970e-03 -8.125e-02 3.468e-02 -1.046e-11 9.826e-03
#> Cross-validation time: 0.4589 ; Number of iterations: 9
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 2 ;
#> lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1824 ; youden_index: 0.4534 ; sensitivity: 0.8889 ; specificity: 0.7419 ; geometric_mean: 0.8121 ; fdr: 0.2 ; mcc: 0.6413 ; auc: 0.9534 ; corrclass: 0.8209
#> TP: 32 ; TN: 23 ; FP: 8 ; FN: 4 ; betas:
#> norm2 norm7 norm12 norm22 norm34 norm36 norm40
#> -0.0780677 0.0010172 -0.0304361 -0.0084905 0.0028808 0.0125506 -0.0015678
#> norm51 norm52 norm55 norm60 norm66 norm69 norm71
#> 0.0395042 -0.1128065 -0.0120667 -0.0008384 -0.0122452 -0.0002343 -0.0014696
#> norm80 norm81 norm83 norm85 norm99 norm100 norm101
#> 0.0029695 -0.0023213 0.0030099 0.0273645 -0.0028010 0.0107344 0.0811139
#> norm102 norm107 norm112 norm113 norm117 norm119 norm120
#> -0.0535526 -0.0027352 -0.0056054 -0.0052368 0.0001407 -0.0130925 0.0021955
#> norm128 norm130 norm133 norm142 norm146 norm151 norm157
#> 0.0015812 0.0085726 0.0038849 -0.0098571 0.0002589 0.0061427 -0.0076841
#> norm165 norm170 norm173 norm175 norm182 norm186 norm192
#> 0.0053785 0.0006581 -0.0121030 -0.0093119 0.0021588 0.0094583 -0.0057368
#> norm195 c
#> -0.0019014 -0.0045452
#> Cross-validation time: 0.2256 ; Number of iterations: 6
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 2 ;
#> lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1879 ; youden_index: 0.3934 ; sensitivity: 0.9167 ; specificity: 0.6452 ; geometric_mean: 0.769 ; fdr: 0.25 ; mcc: 0.59 ; auc: 0.8934 ; corrclass: 0.791
#> TP: 33 ; TN: 20 ; FP: 11 ; FN: 3 ; betas:
#> norm2 norm4 norm7 norm12 norm16 norm19 norm22
#> -0.0982438 -0.0045076 0.0012349 -0.0413095 0.0022233 0.0023343 -0.0271606
#> norm29 norm32 norm34 norm35 norm36 norm49 norm50
#> -0.0006758 -0.0021577 0.0088901 0.0008342 0.0316300 -0.0018156 -0.0015810
#> norm51 norm52 norm55 norm57 norm60 norm65 norm66
#> 0.0575839 -0.1567682 -0.0256998 -0.0023048 -0.0011210 0.0001039 -0.0334586
#> norm67 norm70 norm71 norm74 norm79 norm81 norm82
#> 0.0059217 -0.0003351 -0.0253818 0.0010431 0.0032396 -0.0024270 0.0064319
#> norm83 norm85 norm90 norm94 norm95 norm99 norm100
#> 0.0184821 0.0377789 -0.0022337 -0.0202300 -0.0034231 -0.0240638 0.0342187
#> norm101 norm102 norm107 norm112 norm113 norm115 norm117
#> 0.1148352 -0.0696042 -0.0195901 -0.0179246 -0.0343204 0.0003692 0.0115940
#> norm119 norm120 norm121 norm126 norm128 norm130 norm132
#> -0.0210717 0.0054719 0.0016188 -0.0005131 0.0290092 0.0219371 -0.0021867
#> norm133 norm136 norm137 norm142 norm148 norm151 norm152
#> 0.0138209 0.0014166 -0.0007836 -0.0462914 -0.0034694 0.0194033 -0.0147033
#> norm154 norm157 norm162 norm164 norm170 norm172 norm173
#> 0.0022122 -0.0046509 0.0002648 -0.0015111 0.0020626 0.0001302 -0.0320901
#> norm175 norm185 norm186 norm187 norm192 norm195 norm200
#> -0.0303693 -0.0002396 0.0154924 -0.0023889 -0.0269424 -0.0079648 0.0103961
#> c
#> -0.0014563
#> Cross-validation time: 0.08021 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 2 ;
#> lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.4388 ; youden_index: 0.4104 ; sensitivity: 0.8889 ; specificity: 0.7419 ; geometric_mean: 0.8121 ; fdr: 0.2 ; mcc: 0.6413 ; auc: 0.9104 ; corrclass: 0.8209
#> TP: 32 ; TN: 23 ; FP: 8 ; FN: 4 ; betas:
#> norm2 norm12 norm16 norm19 norm22 norm28 norm29
#> -9.329e-02 -2.567e-02 1.329e-02 4.502e-03 -2.534e-02 -2.432e-03 -7.680e-03
#> norm32 norm34 norm35 norm36 norm37 norm48 norm49
#> -5.990e-03 1.093e-02 1.249e-03 3.461e-02 1.279e-04 -2.407e-02 -5.492e-05
#> norm50 norm51 norm52 norm55 norm57 norm60 norm65
#> -3.872e-03 6.988e-02 -2.110e-01 -3.880e-03 -1.767e-02 -7.679e-03 1.189e-03
#> norm66 norm67 norm71 norm80 norm81 norm84 norm85
#> -2.292e-02 2.852e-02 -5.040e-02 1.528e-02 -2.665e-03 -9.797e-04 1.847e-02
#> norm94 norm95 norm99 norm100 norm101 norm102 norm107
#> -1.589e-02 -1.477e-03 -4.190e-02 2.180e-02 1.462e-01 -7.730e-02 -4.294e-03
#> norm112 norm113 norm115 norm117 norm119 norm121 norm128
#> -1.747e-02 -1.561e-02 7.649e-03 1.396e-02 -4.997e-03 4.669e-03 3.167e-02
#> norm130 norm131 norm132 norm133 norm142 norm143 norm146
#> 1.202e-02 3.601e-02 -8.618e-03 1.524e-02 -3.889e-02 4.398e-03 9.943e-03
#> norm149 norm150 norm151 norm154 norm162 norm163 norm165
#> -8.861e-03 4.281e-03 3.562e-02 1.441e-02 1.907e-03 -2.118e-03 2.326e-02
#> norm168 norm169 norm173 norm175 norm176 norm182 norm187
#> 8.125e-03 2.277e-03 -1.079e-02 -2.696e-02 -1.122e-02 2.526e-02 -1.777e-03
#> norm192 norm195 norm200 c
#> -1.272e-02 -7.356e-04 7.703e-03 3.162e-03
#> Cross-validation time: 0.1002 ; Number of iterations: 10
#>
#>
#> ----------------------------------------------------------------
#> | starting with the 3 -th fold for the CV of lambda |
#> ----------------------------------------------------------------
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ;
#> total iters: 10 ; Backtraking iters: 2466 ; lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.141 ; youden_index: 0.4049 ; sensitivity: 0.8472 ; specificity: 0.8226 ; geometric_mean: 0.8348 ; fdr: 0.1528 ; mcc: 0.6698 ; auc: 0.914 ; corrclass: 0.8358 ;
#> TP: 61 ; TN: 51 ; FP: 11 ; FN: 11 ; betas:
#> norm2 norm51 norm52 norm101 c
#> -0.02326 0.02758 -0.07538 0.04966 0.00851
#> Estimation time: 0.5881 mins
#>
#>
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ;
#> total iters: 6 ; Backtraking iters: 1126 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3879 ; youden_index: 0.7759 ; sensitivity: 1 ; specificity: 0.9839 ; geometric_mean: 0.9919 ; fdr: 0.0137 ; mcc: 0.9851 ; auc: 0.9913 ; corrclass: 0.9925 ;
#> TP: 72 ; TN: 61 ; FP: 1 ; FN: 0 ; betas:
#> norm2 norm9 norm12 norm28 norm43 norm49 norm51
#> -0.0864853 0.0017694 -0.0093260 -0.0013788 -0.0023924 -0.0069509 0.0716253
#> norm52 norm54 norm63
#> -0.1217726 0.0005595 0.0015980
#> [ reached getOption("max.print") -- omitted 21 entries ]
#> Estimation time: 0.3577 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ;
#> total iters: 10 ; Backtraking iters: 397 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.6223 ; youden_index: 0.9441 ; sensitivity: 1 ; specificity: 0.9839 ; geometric_mean: 0.9919 ; fdr: 0.0137 ; mcc: 0.9851 ; auc: 1 ; corrclass: 0.9925 ;
#> TP: 72 ; TN: 61 ; FP: 1 ; FN: 0 ; betas:
#> norm1 norm2 norm9 norm12 norm13 norm17 norm18
#> 0.0179363 -0.1487871 0.0030999 -0.0156110 -0.0046801 -0.0009403 0.0002065
#> norm24 norm27 norm28
#> -0.0191010 -0.0001254 -0.0004629
#> [ reached getOption("max.print") -- omitted 50 entries ]
#> Estimation time: 0.07991 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ;
#> total iters: 10 ; Backtraking iters: 318 ; lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.712 ; youden_index: 0.9873 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 72 ; TN: 62 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm4 norm7 norm12 norm13 norm21
#> 0.1115717 -0.2509538 0.0003126 0.0046432 -0.0286906 -0.0639457 -0.0024715
#> norm24 norm28 norm31
#> -0.0570286 -0.0399914 -0.0283538
#> [ reached getOption("max.print") -- omitted 55 entries ]
#> Estimation time: 0.07492 mins
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 3 ;
#> lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.09437 ; youden_index: 0.3765 ; sensitivity: 0.7143 ; specificity: 0.871 ; geometric_mean: 0.7887 ; fdr: 0.1379 ; mcc: 0.5885 ; auc: 0.8765 ; corrclass: 0.7879
#> TP: 25 ; TN: 27 ; FP: 4 ; FN: 10 ; betas:
#> norm2 norm51 norm52 norm101 c
#> -0.02326 0.02758 -0.07538 0.04966 0.00851
#> Cross-validation time: 0.5881 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 3 ;
#> lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.2544 ; youden_index: 0.4493 ; sensitivity: 0.8857 ; specificity: 0.8387 ; geometric_mean: 0.8619 ; fdr: 0.1389 ; mcc: 0.7261 ; auc: 0.9493 ; corrclass: 0.8636
#> TP: 31 ; TN: 26 ; FP: 5 ; FN: 4 ; betas:
#> norm2 norm9 norm12 norm28 norm43 norm49 norm51
#> -0.0864853 0.0017694 -0.0093260 -0.0013788 -0.0023924 -0.0069509 0.0716253
#> norm52 norm54 norm63 norm66 norm85 norm97 norm101
#> -0.1217726 0.0005595 0.0015980 -0.0079350 0.0222619 -0.0020575 0.0946004
#> norm102 norm112 norm119 norm122 norm124 norm125 norm141
#> -0.0668193 -0.0115183 -0.0190459 0.0003671 0.0116841 -0.0063316 0.0063667
#> norm145 norm146 norm151 norm156 norm157 norm160 norm175
#> -0.0086135 0.0041223 0.0301803 -0.0021094 -0.0002038 -0.0008814 -0.0105161
#> norm182 norm194 c
#> 0.0213159 0.0072770 0.0053100
#> Cross-validation time: 0.3577 ; Number of iterations: 6
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 3 ;
#> lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3478 ; youden_index: 0.429 ; sensitivity: 0.9143 ; specificity: 0.8065 ; geometric_mean: 0.8587 ; fdr: 0.1579 ; mcc: 0.7278 ; auc: 0.929 ; corrclass: 0.8636
#> TP: 32 ; TN: 25 ; FP: 6 ; FN: 3 ; betas:
#> norm1 norm2 norm9 norm12 norm13 norm17 norm18
#> 1.794e-02 -1.488e-01 3.100e-03 -1.561e-02 -4.680e-03 -9.403e-04 2.065e-04
#> norm24 norm27 norm28 norm31 norm43 norm48 norm49
#> -1.910e-02 -1.254e-04 -4.629e-04 -8.200e-04 -1.864e-02 -3.414e-04 -2.465e-02
#> norm51 norm52 norm54 norm62 norm64 norm66 norm84
#> 1.081e-01 -1.848e-01 1.163e-03 -4.066e-04 -1.047e-03 -1.791e-02 1.292e-03
#> norm85 norm87 norm88 norm97 norm98 norm101 norm102
#> 5.810e-02 7.141e-03 -8.505e-04 -1.998e-02 6.098e-03 1.490e-01 -1.136e-01
#> norm105 norm112 norm115 norm119 norm122 norm123 norm124
#> -2.670e-04 -3.564e-02 2.459e-03 -2.650e-02 1.697e-03 9.751e-05 2.206e-02
#> norm125 norm136 norm137 norm138 norm141 norm145 norm146
#> -2.589e-02 3.045e-04 -1.435e-02 2.267e-04 2.590e-02 -1.969e-02 1.949e-02
#> norm147 norm151 norm152 norm156 norm159 norm160 norm162
#> -7.455e-03 3.868e-02 -1.761e-02 -3.567e-04 1.061e-03 -1.876e-02 3.543e-03
#> norm164 norm168 norm171 norm175 norm181 norm182 norm183
#> 1.335e-02 7.076e-05 1.625e-03 -3.516e-02 2.668e-03 3.568e-02 3.933e-04
#> norm184 norm190 norm194 c
#> 8.390e-03 7.280e-05 3.768e-04 -6.697e-03
#> Cross-validation time: 0.07991 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET of pye
#> -> algorithm: pye_KS_proximal_gradient_method ; fold = 3 ;
#> lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3318 ; youden_index: 0.3931 ; sensitivity: 0.8857 ; specificity: 0.7419 ; geometric_mean: 0.8106 ; fdr: 0.2051 ; mcc: 0.6371 ; auc: 0.8931 ; corrclass: 0.8182
#> TP: 31 ; TN: 23 ; FP: 8 ; FN: 4 ; betas:
#> norm1 norm2 norm4 norm7 norm12 norm13 norm21
#> 1.116e-01 -2.510e-01 3.126e-04 4.643e-03 -2.869e-02 -6.395e-02 -2.471e-03
#> norm24 norm28 norm31 norm37 norm43 norm46 norm48
#> -5.703e-02 -3.999e-02 -2.835e-02 7.803e-03 -4.974e-02 3.209e-03 -7.010e-03
#> norm49 norm50 norm51 norm52 norm54 norm57 norm66
#> -5.573e-02 1.040e-02 2.144e-01 -3.096e-01 2.716e-03 -1.843e-04 -7.040e-02
#> norm67 norm70 norm79 norm81 norm84 norm85 norm86
#> 7.129e-04 -1.112e-05 7.906e-03 1.408e-03 9.077e-03 1.416e-01 -1.631e-03
#> norm89 norm90 norm97 norm98 norm101 norm102 norm112
#> -6.102e-03 3.190e-03 -7.917e-02 1.264e-02 2.600e-01 -1.861e-01 -6.506e-02
#> norm115 norm119 norm120 norm124 norm125 norm126 norm130
#> 3.688e-02 -8.066e-02 3.564e-02 3.670e-02 -8.236e-02 5.415e-03 2.711e-02
#> norm137 norm141 norm145 norm146 norm147 norm151 norm152
#> -2.414e-02 1.025e-03 -6.051e-03 7.258e-02 -4.856e-03 8.383e-02 -3.097e-03
#> norm157 norm160 norm162 norm164 norm168 norm175 norm176
#> -4.484e-03 -7.040e-02 1.385e-03 7.926e-03 4.625e-03 -7.948e-02 9.018e-04
#> norm181 norm182 norm183 norm184 norm185 norm192 norm194
#> 3.567e-02 9.738e-02 1.578e-03 4.849e-02 1.669e-03 -2.268e-03 1.413e-02
#> norm196 c
#> 6.558e-04 -2.613e-02
#> Cross-validation time: 0.07492 ; Number of iterations: 10
#>
#>
#>
#> Starting the CV of tau using as lambda: 0.6082 , that is the best value of lambda as per: ccr
#> ----------------------------------------------------------------
#> | starting with the 1 -th fold for the CV of tau |
#> ----------------------------------------------------------------
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ;
#> total iters: 7 ; Backtraking iters: 1072 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.4096 ; youden_index: 0.8015 ; sensitivity: 0.9577 ; specificity: 1 ; geometric_mean: 0.9786 ; fdr: 0 ; mcc: 0.9558 ; auc: 0.992 ; corrclass: 0.9774 ;
#> TP: 68 ; TN: 62 ; FP: 0 ; FN: 3 ; betas:
#> norm2 norm7 norm12 norm19 norm35 norm36 norm39 norm48
#> -0.038653 0.001023 -0.001766 0.002524 0.003457 0.002034 -0.001358 -0.018633
#> norm51 norm52
#> 0.072787 -0.106127
#> [ reached getOption("max.print") -- omitted 28 entries ]
#> Estimation time: 0.3292 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ; total iters: 8 ; Backtraking iters: 72 ; tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.8039 ; youden_index: 0.8327 ; aYI: 0 ; sensitivity: 0.9718 ; specificity: 1 ; geometric_mean: 0.9858 ; fdr: 0 ; mcc: 0.9703 ; auc: 0.992 ; aauc: 0 ; corrclass: 0.985 ;
#> TP: 69 ; TN: 62 ; FP: 0 ; FN: 2 ; gammas:
#> norm_cov6
#> -0.03678
#> Estimation time: 0.01414 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ; total iters: 10 ; Backtraking iters: 90 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.8132 ; youden_index: 0.8348 ; aYI: 0 ; sensitivity: 0.9718 ; specificity: 1 ; geometric_mean: 0.9858 ; fdr: 0 ; mcc: 0.9703 ; auc: 0.992 ; aauc: 0 ; corrclass: 0.985 ;
#> TP: 69 ; TN: 62 ; FP: 0 ; FN: 2 ; gammas:
#> norm_cov6
#> -0.04334
#> Estimation time: 0.01545 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ; total iters: 8 ; Backtraking iters: 72 ; tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.8229 ; youden_index: 0.85 ; aYI: 0 ; sensitivity: 0.9718 ; specificity: 1 ; geometric_mean: 0.9858 ; fdr: 0 ; mcc: 0.9703 ; auc: 0.992 ; aauc: 0 ; corrclass: 0.985 ;
#> TP: 69 ; TN: 62 ; FP: 0 ; FN: 2 ; gammas:
#> norm_cov6 norm_cov11
#> -0.04046 0.03042
#> Estimation time: 0.01624 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ; total iters: 10 ; Backtraking iters: 131 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.8321 ; youden_index: 0.859 ; aYI: 0 ; sensitivity: 0.9859 ; specificity: 1 ; geometric_mean: 0.9929 ; fdr: 0 ; mcc: 0.985 ; auc: 0.992 ; aauc: 0 ; corrclass: 0.9925 ;
#> TP: 70 ; TN: 62 ; FP: 0 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11 norm_cov16
#> -0.04665 0.03748 -0.01644
#> Estimation time: 0.01961 mins
#>
#>
#>
#> Final results on TEST SET of covYI for the FOLD: 1 :
#> With lambda: 0.6082 , penalty: SCAD and weight: 0.5 . Accuracy measures only pye:
#> pye_KS: 0.09793 ; youden_index: 0.4041 ; sensitivity: 0.8333 ; specificity: 0.8065 ; geometric_mean: 0.8198 ; fdr: 0.1667 ; mcc: 0.6398 ; auc: 0.9041 ; corrclass: 0.8209 ;
#> TP: 30 ; TN: 25 ; FP: 6 ; FN: 6 ; betas:
#> norm2 norm7 norm12 norm19 norm35 norm36 norm39
#> -0.0386530 0.0010231 -0.0017658 0.0025245 0.0034575 0.0020343 -0.0013577
#> norm48 norm51 norm52 norm56 norm60 norm62 norm63
#> -0.0186333 0.0727869 -0.1061266 0.0239432 -0.0183848 -0.0065960 0.0041911
#> norm68 norm81 norm85 norm87 norm90 norm100 norm101
#> -0.0137400 -0.0002867 0.0176195 0.0006448 -0.0001538 0.0008860 0.0861813
#> norm102 norm119 norm123 norm128 norm134 norm136 norm137
#> -0.0615628 -0.0096232 0.0073251 0.0046528 0.0085929 0.0011488 -0.0046215
#> norm151 norm164 norm171 norm172 norm175 norm182 norm189
#> 0.0672071 0.0024349 0.0257507 0.0144692 -0.0041685 0.0022548 -0.0011191
#> norm194 norm199 c
#> 0.0002176 -0.0082597 0.0014823
#> Cross-validation time: 0.3292 ; Number of iterations: 7
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5248 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8889 ; specificity: 0.871 ; geometric_mean: 0.8799 ; fdr: 0.1111 ; mcc: 0.7599 ; auc: 0.9041 ; aauc: 0 ; corrclass: 0.8806 ;
#> TP: 32 ; TN: 27 ; FP: 4 ; FN: 4 ; gammas:
#> norm_cov6
#> -0.03678
#> Cross-validation time: 0.01414 ; Number of iterations: 8
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5382 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8889 ; specificity: 0.871 ; geometric_mean: 0.8799 ; fdr: 0.1111 ; mcc: 0.7599 ; auc: 0.9041 ; aauc: 0 ; corrclass: 0.8806 ;
#> TP: 32 ; TN: 27 ; FP: 4 ; FN: 4 ; gammas:
#> norm_cov6
#> -0.04334
#> Cross-validation time: 0.01545 ; Number of iterations: 10
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5638 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8889 ; specificity: 0.871 ; geometric_mean: 0.8799 ; fdr: 0.1111 ; mcc: 0.7599 ; auc: 0.9041 ; aauc: 0 ; corrclass: 0.8806 ;
#> TP: 32 ; TN: 27 ; FP: 4 ; FN: 4 ; gammas:
#> norm_cov6 norm_cov11
#> -0.04046 0.03042
#> Cross-validation time: 0.01624 ; Number of iterations: 8
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5644 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8889 ; specificity: 0.871 ; geometric_mean: 0.8799 ; fdr: 0.1111 ; mcc: 0.7599 ; auc: 0.9041 ; aauc: 0 ; corrclass: 0.8806 ;
#> TP: 32 ; TN: 27 ; FP: 4 ; FN: 4 ; gammas:
#> norm_cov6 norm_cov11 norm_cov16
#> -0.04665 0.03748 -0.01644
#> Cross-validation time: 0.01961 ; Number of iterations: 10
#>
#>
#>
#> ----------------------------------------------------------------
#> | starting with the 2 -th fold for the CV of tau |
#> ----------------------------------------------------------------
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ;
#> total iters: 6 ; Backtraking iters: 655 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.379 ; youden_index: 0.7511 ; sensitivity: 0.9718 ; specificity: 0.9355 ; geometric_mean: 0.9535 ; fdr: 0.05479 ; mcc: 0.9096 ; auc: 0.993 ; corrclass: 0.9549 ;
#> TP: 69 ; TN: 58 ; FP: 4 ; FN: 2 ; betas:
#> norm2 norm7 norm12 norm22 norm34 norm36 norm40 norm51
#> -0.078068 0.001017 -0.030436 -0.008491 0.002881 0.012551 -0.001568 0.039504
#> norm52 norm55
#> -0.112806 -0.012067
#> [ reached getOption("max.print") -- omitted 34 entries ]
#> Estimation time: 0.2483 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ; total iters: 10 ; Backtraking iters: 169 ; tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7602 ; youden_index: 0.7895 ; aYI: 0 ; sensitivity: 0.9859 ; specificity: 0.9516 ; geometric_mean: 0.9686 ; fdr: 0.0411 ; mcc: 0.9399 ; auc: 0.993 ; aauc: 0 ; corrclass: 0.9699 ;
#> TP: 70 ; TN: 59 ; FP: 3 ; FN: 1 ; gammas:
#> norm_cov6
#> -0.03815
#> Estimation time: 0.02088 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ; total iters: 10 ; Backtraking iters: 151 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7719 ; youden_index: 0.8101 ; aYI: 0 ; sensitivity: 1 ; specificity: 0.9355 ; geometric_mean: 0.9672 ; fdr: 0.05333 ; mcc: 0.9411 ; auc: 0.993 ; aauc: 0 ; corrclass: 0.9699 ;
#> TP: 71 ; TN: 58 ; FP: 4 ; FN: 0 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03445 0.03306
#> Estimation time: 0.01732 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ; total iters: 10 ; Backtraking iters: 144 ; tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7839 ; youden_index: 0.8116 ; aYI: 0 ; sensitivity: 1 ; specificity: 0.9355 ; geometric_mean: 0.9672 ; fdr: 0.05333 ; mcc: 0.9411 ; auc: 0.993 ; aauc: 0 ; corrclass: 0.9699 ;
#> TP: 71 ; TN: 58 ; FP: 4 ; FN: 0 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03705 0.03708
#> Estimation time: 0.01738 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 2 ; total iters: 10 ; Backtraking iters: 134 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7937 ; youden_index: 0.8206 ; aYI: 0 ; sensitivity: 0.9718 ; specificity: 0.9355 ; geometric_mean: 0.9535 ; fdr: 0.05479 ; mcc: 0.9096 ; auc: 0.993 ; aauc: 0 ; corrclass: 0.9549 ;
#> TP: 69 ; TN: 58 ; FP: 4 ; FN: 2 ; gammas:
#> norm_cov6 norm_cov7 norm_cov11
#> -0.03667 0.01900 0.04409
#> Estimation time: 0.01821 mins
#>
#>
#>
#> Final results on TEST SET of covYI for the FOLD: 2 :
#> With lambda: 0.6082 , penalty: SCAD and weight: 0.5 . Accuracy measures only pye:
#> pye_KS: 0.1824 ; youden_index: 0.4534 ; sensitivity: 0.8889 ; specificity: 0.7419 ; geometric_mean: 0.8121 ; fdr: 0.2 ; mcc: 0.6413 ; auc: 0.9534 ; corrclass: 0.8209 ;
#> TP: 32 ; TN: 23 ; FP: 8 ; FN: 4 ; betas:
#> norm2 norm7 norm12 norm22 norm34 norm36 norm40
#> -0.0780677 0.0010172 -0.0304361 -0.0084905 0.0028808 0.0125506 -0.0015678
#> norm51 norm52 norm55 norm60 norm66 norm69 norm71
#> 0.0395042 -0.1128065 -0.0120667 -0.0008384 -0.0122452 -0.0002343 -0.0014696
#> norm80 norm81 norm83 norm85 norm99 norm100 norm101
#> 0.0029695 -0.0023213 0.0030099 0.0273645 -0.0028010 0.0107344 0.0811139
#> norm102 norm107 norm112 norm113 norm117 norm119 norm120
#> -0.0535526 -0.0027352 -0.0056054 -0.0052368 0.0001407 -0.0130925 0.0021955
#> norm128 norm130 norm133 norm142 norm146 norm151 norm157
#> 0.0015812 0.0085726 0.0038849 -0.0098571 0.0002589 0.0061427 -0.0076841
#> norm165 norm170 norm173 norm175 norm182 norm186 norm192
#> 0.0053785 0.0006581 -0.0121030 -0.0093119 0.0021588 0.0094583 -0.0057368
#> norm195 c
#> -0.0019014 -0.0045452
#> Cross-validation time: 0.2483 ; Number of iterations: 6
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5652 ; youden_index: 0.6389 ; aYI: 0 ; sensitivity: 0.9167 ; specificity: 0.8387 ; geometric_mean: 0.8768 ; fdr: 0.1316 ; mcc: 0.7602 ; auc: 0.9534 ; aauc: 0 ; corrclass: 0.8806 ;
#> TP: 33 ; TN: 26 ; FP: 5 ; FN: 3 ; gammas:
#> norm_cov6
#> -0.03815
#> Cross-validation time: 0.02088 ; Number of iterations: 10
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5817 ; youden_index: 0.6389 ; aYI: 0 ; sensitivity: 0.9722 ; specificity: 0.871 ; geometric_mean: 0.9202 ; fdr: 0.1026 ; mcc: 0.8524 ; auc: 0.9534 ; aauc: 0 ; corrclass: 0.9254 ;
#> TP: 35 ; TN: 27 ; FP: 4 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03445 0.03306
#> Cross-validation time: 0.01732 ; Number of iterations: 10
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5957 ; youden_index: 0.6389 ; aYI: 0 ; sensitivity: 0.9722 ; specificity: 0.871 ; geometric_mean: 0.9202 ; fdr: 0.1026 ; mcc: 0.8524 ; auc: 0.9534 ; aauc: 0 ; corrclass: 0.9254 ;
#> TP: 35 ; TN: 27 ; FP: 4 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03705 0.03708
#> Cross-validation time: 0.01738 ; Number of iterations: 10
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5948 ; youden_index: 0.6389 ; aYI: 0 ; sensitivity: 0.9167 ; specificity: 0.8387 ; geometric_mean: 0.8768 ; fdr: 0.1316 ; mcc: 0.7602 ; auc: 0.9534 ; aauc: 0 ; corrclass: 0.8806 ;
#> TP: 33 ; TN: 26 ; FP: 5 ; FN: 3 ; gammas:
#> norm_cov6 norm_cov7 norm_cov11
#> -0.03667 0.01900 0.04409
#> Cross-validation time: 0.01821 ; Number of iterations: 10
#>
#>
#>
#> ----------------------------------------------------------------
#> | starting with the 3 -th fold for the CV of tau |
#> ----------------------------------------------------------------
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ;
#> total iters: 6 ; Backtraking iters: 1126 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3879 ; youden_index: 0.7759 ; sensitivity: 1 ; specificity: 0.9839 ; geometric_mean: 0.9919 ; fdr: 0.0137 ; mcc: 0.9851 ; auc: 0.9913 ; corrclass: 0.9925 ;
#> TP: 72 ; TN: 61 ; FP: 1 ; FN: 0 ; betas:
#> norm2 norm9 norm12 norm28 norm43 norm49 norm51
#> -0.0864853 0.0017694 -0.0093260 -0.0013788 -0.0023924 -0.0069509 0.0716253
#> norm52 norm54 norm63
#> -0.1217726 0.0005595 0.0015980
#> [ reached getOption("max.print") -- omitted 21 entries ]
#> Estimation time: 0.5246 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ; total iters: 10 ; Backtraking iters: 598 ; tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7806 ; youden_index: 0.8105 ; aYI: 0 ; sensitivity: 1 ; specificity: 0.9839 ; geometric_mean: 0.9919 ; fdr: 0.0137 ; mcc: 0.9851 ; auc: 0.9913 ; aauc: 0 ; corrclass: 0.9925 ;
#> TP: 72 ; TN: 61 ; FP: 1 ; FN: 0 ; gammas:
#> norm_cov11
#> 0.03962
#> Estimation time: 0.06074 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ; total iters: 9 ; Backtraking iters: 558 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7966 ; youden_index: 0.8361 ; aYI: 0 ; sensitivity: 0.9861 ; specificity: 0.9839 ; geometric_mean: 0.985 ; fdr: 0.01389 ; mcc: 0.97 ; auc: 0.9913 ; aauc: 0 ; corrclass: 0.9851 ;
#> TP: 71 ; TN: 61 ; FP: 1 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03429 0.03806
#> Estimation time: 0.07736 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ; total iters: 10 ; Backtraking iters: 558 ; tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.809 ; youden_index: 0.8378 ; aYI: 0 ; sensitivity: 0.9861 ; specificity: 0.9839 ; geometric_mean: 0.985 ; fdr: 0.01389 ; mcc: 0.97 ; auc: 0.9913 ; aauc: 0 ; corrclass: 0.9851 ;
#> TP: 71 ; TN: 61 ; FP: 1 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03747 0.04205
#> Estimation time: 0.02821 mins
#>
#>
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 3 ; total iters: 10 ; Backtraking iters: 571 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.818 ; youden_index: 0.8385 ; aYI: 0 ; sensitivity: 0.9861 ; specificity: 0.9839 ; geometric_mean: 0.985 ; fdr: 0.01389 ; mcc: 0.97 ; auc: 0.9913 ; aauc: 0 ; corrclass: 0.9851 ;
#> TP: 71 ; TN: 61 ; FP: 1 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03959 0.04470
#> Estimation time: 0.02355 mins
#>
#>
#>
#> Final results on TEST SET of covYI for the FOLD: 3 :
#> With lambda: 0.6082 , penalty: SCAD and weight: 0.5 . Accuracy measures only pye:
#> pye_KS: 0.2544 ; youden_index: 0.4493 ; sensitivity: 0.8857 ; specificity: 0.8387 ; geometric_mean: 0.8619 ; fdr: 0.1389 ; mcc: 0.7261 ; auc: 0.9493 ; corrclass: 0.8636 ;
#> TP: 31 ; TN: 26 ; FP: 5 ; FN: 4 ; betas:
#> norm2 norm9 norm12 norm28 norm43 norm49 norm51
#> -0.0864853 0.0017694 -0.0093260 -0.0013788 -0.0023924 -0.0069509 0.0716253
#> norm52 norm54 norm63 norm66 norm85 norm97 norm101
#> -0.1217726 0.0005595 0.0015980 -0.0079350 0.0222619 -0.0020575 0.0946004
#> norm102 norm112 norm119 norm122 norm124 norm125 norm141
#> -0.0668193 -0.0115183 -0.0190459 0.0003671 0.0116841 -0.0063316 0.0063667
#> norm145 norm146 norm151 norm156 norm157 norm160 norm175
#> -0.0086135 0.0041223 0.0301803 -0.0021094 -0.0002038 -0.0008814 -0.0105161
#> norm182 norm194 c
#> 0.0213159 0.0072770 0.0053100
#> Cross-validation time: 0.5246 ; Number of iterations: 6
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.6481 ; youden_index: 0.6857 ; aYI: 0 ; sensitivity: 0.9143 ; specificity: 0.8065 ; geometric_mean: 0.8587 ; fdr: 0.1579 ; mcc: 0.7278 ; auc: 0.9493 ; aauc: 0 ; corrclass: 0.8636 ;
#> TP: 32 ; TN: 25 ; FP: 6 ; FN: 3 ; gammas:
#> norm_cov11
#> 0.03962
#> Cross-validation time: 0.06074 ; Number of iterations: 10
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.6912 ; youden_index: 0.6857 ; aYI: 0 ; sensitivity: 0.9714 ; specificity: 0.8387 ; geometric_mean: 0.9026 ; fdr: 0.1282 ; mcc: 0.8224 ; auc: 0.9493 ; aauc: 0 ; corrclass: 0.9091 ;
#> TP: 34 ; TN: 26 ; FP: 5 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03429 0.03806
#> Cross-validation time: 0.07736 ; Number of iterations: 9
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.7067 ; youden_index: 0.6857 ; aYI: 0 ; sensitivity: 0.9714 ; specificity: 0.8387 ; geometric_mean: 0.9026 ; fdr: 0.1282 ; mcc: 0.8224 ; auc: 0.9493 ; aauc: 0 ; corrclass: 0.9091 ;
#> TP: 34 ; TN: 26 ; FP: 5 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03747 0.04205
#> Cross-validation time: 0.02821 ; Number of iterations: 10
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.7177 ; youden_index: 0.6857 ; aYI: 0 ; sensitivity: 0.9714 ; specificity: 0.8387 ; geometric_mean: 0.9026 ; fdr: 0.1282 ; mcc: 0.8224 ; auc: 0.9493 ; aauc: 0 ; corrclass: 0.9091 ;
#> TP: 34 ; TN: 26 ; FP: 5 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.03959 0.04470
#> Cross-validation time: 0.02355 ; Number of iterations: 10
#>
#>
#>
#> ----------------------> END OF THE CROSS-VALIDATION OF THE PYE METHOD <-----------------
#> -------------> For the whoole Cross-validation it took: 4.574 minutes <------------
# 6. Print results and access optimal lambda/tau
cat("\nOptimal Lambda (based on CCR):", pye_cv_result$lambda_hat_ccr, "\n")
#>
#> Optimal Lambda (based on CCR): 0.6082
if (c_function_of_covariates == TRUE) {
cat("Optimal Tau (based on CCR):", pye_cv_result$tau_hat_ccr, "\n")
}
#> Optimal Tau (based on CCR): 0.104
# You can access other results like:
pye_cv_result$auc # AUC values
#> $`lambda=0.6082201996`
#> $`lambda=0.6082201996`$train
#> tau=0.15 tau=0.1040041912 tau=0.07211247852 tau=0.05
#> fold=1 0.9920 0.9920 0.9920 0.9920
#> fold=2 0.9930 0.9930 0.9930 0.9930
#> fold=3 0.9913 0.9913 0.9913 0.9913
#>
#> $`lambda=0.6082201996`$test
#> tau=0.15 tau=0.1040041912 tau=0.07211247852 tau=0.05
#> fold=1 0.9041 0.9041 0.9041 0.9041
#> fold=2 0.9534 0.9534 0.9534 0.9534
#> fold=3 0.9493 0.9493 0.9493 0.9493
pye_cv_result$n_betas # Number of non-zero betas for each lambda
#> lambda=1.5 lambda=0.6082201996 lambda=0.2466212074 lambda=0.1
#> fold=1 7 37 49 31
#> fold=2 5 43 70 66
#> fold=3 4 30 59 64
pye_cv_result$n_gammas # Number of non-zero gammas for each tau
#> $`lambda=0.6082201996`
#> tau=0.15 tau=0.1040041912 tau=0.07211247852 tau=0.05
#> [1,] 1 1 2 3
#> [2,] 1 2 2 3
#> [3,] 1 2 2 2
# 7. Compute the performance over 50 simulations with the optimal lambda and tau
sim_result <- pye_KS_simulation_study(
n = 5,
df = df,
X = X,
y = y,
C = C,
lambda = pye_cv_result$lambda_hat_ccr,
tau = pye_cv_result$tau_hat_ccr,
trace = 1,
penalty = penalty, # Options: "L12", "L1", "EN", "SCAD", "MCP"
penalty_g = penalty_g, # Options: "L12", "L1", "EN", "SCAD", "MCP"
used_cores = 1,
c_function_of_covariates = c_function_of_covariates,
max_iter = max_iter, # Reduced for a quick example
max_iter_g = 20 # Reduced for a quick example
)
#> ------------------------------------------------------------------
#> | Starting simulation study with 5 simulations |
#> ------------------------------------------------------------------
#> Running simulation in sequential mode (used_cores = 1).
#>
#> --------------------> experiment n 1 of 5 <----------------------
#> lambda = 0.6082 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.104 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 6 ; Backtraking iters: 622 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3929 ; youden_index: 0.7464 ; sensitivity: 0.9867 ; specificity: 0.9385 ; geometric_mean: 0.9623 ; fdr: 0.05128 ; mcc: 0.9289 ; auc: 0.9943 ; corrclass: 0.9643 ;
#> TP: 74 ; TN: 61 ; FP: 4 ; FN: 1 ; betas:
#> norm2 norm7 norm12 norm13 norm31 norm34 norm36
#> -6.171e-02 1.894e-02 -1.017e-02 -1.448e-02 -8.586e-03 1.890e-02 7.934e-06
#> norm38 norm46 norm48
#> -4.686e-03 5.564e-03 -5.040e-03
#> [ reached getOption("max.print") -- omitted 23 entries ]
#> Estimation time: 0.2849 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 10 ; Backtraking iters: 126 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.788 ; youden_index: 0.832 ; aYI: 0 ; sensitivity: 0.9733 ; specificity: 1 ; geometric_mean: 0.9866 ; fdr: 0 ; mcc: 0.9717 ; auc: 0.9943 ; aauc: 0 ; corrclass: 0.9857 ;
#> TP: 73 ; TN: 65 ; FP: 0 ; FN: 2 ; gammas:
#> norm_cov6 norm_cov11
#> -0.05240 0.03755
#> Estimation time: 0.03612 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 1 of 5 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.2049 ; youden_index: 0.4263 ; sensitivity: 0.8125 ; fdr: 0.1333 ; mcc: 0.6682 ; auc: 0.9263 ; corrclass: 0.8333
#> TP: 26 ; TN: 24 ; FP: 4 ; FN: 6 ; betas:
#> norm2 norm7 norm12 norm13 norm31 norm34 norm36
#> -6.171e-02 1.894e-02 -1.017e-02 -1.448e-02 -8.586e-03 1.890e-02 7.934e-06
#> norm38 norm46 norm48 norm49 norm51 norm52 norm67
#> -4.686e-03 5.564e-03 -5.040e-03 -4.949e-03 7.090e-02 -1.247e-01 1.852e-03
#> norm73 norm83 norm85 norm90 norm101 norm102 norm107
#> -1.285e-03 2.340e-04 1.720e-03 -5.524e-12 8.768e-02 -6.054e-02 -1.284e-03
#> norm112 norm119 norm131 norm137 norm141 norm151 norm152
#> -2.412e-04 -1.551e-02 1.130e-03 -6.090e-03 1.113e-02 3.110e-02 -1.291e-04
#> norm165 norm172 norm175 norm178 c
#> 1.859e-03 2.484e-03 -7.443e-03 -9.801e-04 -2.534e-03
#> Estimation time: 0.2849 ; Number of iterations: 6
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.6044 ; youden_index: 0.6562 ; aYI: 0 ; sensitivity: 0.9688 ; specificity: 0.8214 ; geometric_mean: 0.8921 ; fdr: 0.1389 ; mcc: 0.8047 ; auc: 0.9263 ; aauc: 0 ; corrclass: 0.9
#> TP: 31 ; TN: 23 ; FP: 5 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.05240 0.03755
#> Estimation time: 0.03612 ; Number of iterations: 10
#>
#>
#>
#> --------------------> experiment n 2 of 5 <----------------------
#> lambda = 0.6082 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.104 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 5 ; Backtraking iters: 558 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3938 ; youden_index: 0.7643 ; sensitivity: 0.9867 ; specificity: 0.9385 ; geometric_mean: 0.9623 ; fdr: 0.05128 ; mcc: 0.9289 ; auc: 0.9822 ; corrclass: 0.9643 ;
#> TP: 74 ; TN: 61 ; FP: 4 ; FN: 1 ; betas:
#> norm2 norm16 norm31 norm39 norm51 norm52 norm85 norm90
#> -0.089614 0.006572 -0.010083 -0.003420 0.061847 -0.124959 0.051063 -0.001076
#> norm101 norm102
#> 0.101349 -0.081709
#> [ reached getOption("max.print") -- omitted 14 entries ]
#> Estimation time: 0.3478 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 10 ; Backtraking iters: 290 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7853 ; youden_index: 0.8098 ; aYI: 0 ; sensitivity: 0.96 ; specificity: 0.9538 ; geometric_mean: 0.9569 ; fdr: 0.04 ; mcc: 0.9138 ; auc: 0.9822 ; aauc: 0 ; corrclass: 0.9571 ;
#> TP: 72 ; TN: 62 ; FP: 3 ; FN: 3 ; gammas:
#> norm_cov6
#> -0.0557
#> Estimation time: 0.02286 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 2 of 5 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1181 ; youden_index: 0.4252 ; sensitivity: 0.9375 ; fdr: 0.2683 ; mcc: 0.5841 ; auc: 0.9252 ; corrclass: 0.7833
#> TP: 30 ; TN: 17 ; FP: 11 ; FN: 2 ; betas:
#> norm2 norm16 norm31 norm39 norm51 norm52 norm85
#> -8.961e-02 6.572e-03 -1.008e-02 -3.420e-03 6.185e-02 -1.250e-01 5.106e-02
#> norm90 norm101 norm102 norm119 norm132 norm136 norm141
#> -1.076e-03 1.013e-01 -8.171e-02 -1.449e-02 -2.018e-03 6.930e-03 6.352e-03
#> norm146 norm151 norm156 norm172 norm175 norm181 norm194
#> 7.656e-03 2.546e-03 -2.701e-03 7.449e-12 -8.860e-03 1.739e-03 3.254e-03
#> norm196 norm200 c
#> 1.345e-02 7.543e-03 -1.314e-02
#> Estimation time: 0.3478 ; Number of iterations: 5
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.5482 ; youden_index: 0.625 ; aYI: 0 ; sensitivity: 0.9062 ; specificity: 0.8571 ; geometric_mean: 0.8814 ; fdr: 0.1212 ; mcc: 0.7655 ; auc: 0.9252 ; aauc: 0 ; corrclass: 0.8833
#> TP: 29 ; TN: 24 ; FP: 4 ; FN: 3 ; gammas:
#> norm_cov6
#> -0.0557
#> Estimation time: 0.02286 ; Number of iterations: 10
#>
#>
#>
#> --------------------> experiment n 3 of 5 <----------------------
#> lambda = 0.6082 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.104 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 6 ; Backtraking iters: 632 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3616 ; youden_index: 0.7458 ; sensitivity: 0.9867 ; specificity: 0.9231 ; geometric_mean: 0.9543 ; fdr: 0.06329 ; mcc: 0.915 ; auc: 0.9822 ; corrclass: 0.9571 ;
#> TP: 74 ; TN: 60 ; FP: 5 ; FN: 1 ; betas:
#> norm2 norm7 norm12 norm31 norm36 norm51 norm52
#> -0.0741990 0.0045660 -0.0058695 -0.0004951 0.0215791 0.0659637 -0.1098548
#> norm56 norm63 norm66
#> 0.0045634 0.0024302 -0.0041567
#> [ reached getOption("max.print") -- omitted 27 entries ]
#> Estimation time: 0.3407 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 12 ; Backtraking iters: 387 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7622 ; youden_index: 0.8005 ; aYI: 0 ; sensitivity: 0.9867 ; specificity: 0.9385 ; geometric_mean: 0.9623 ; fdr: 0.05128 ; mcc: 0.9289 ; auc: 0.9822 ; aauc: 0 ; corrclass: 0.9643 ;
#> TP: 74 ; TN: 61 ; FP: 4 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.02938 0.03878
#> Estimation time: 0.07971 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 3 of 5 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.2335 ; youden_index: 0.4643 ; sensitivity: 0.9062 ; fdr: 0.1212 ; mcc: 0.7655 ; auc: 0.9643 ; corrclass: 0.8833
#> TP: 29 ; TN: 24 ; FP: 4 ; FN: 3 ; betas:
#> norm2 norm7 norm12 norm31 norm36 norm51 norm52
#> -7.420e-02 4.566e-03 -5.869e-03 -4.951e-04 2.158e-02 6.596e-02 -1.099e-01
#> norm56 norm63 norm66 norm85 norm99 norm100 norm101
#> 4.563e-03 2.430e-03 -4.157e-03 1.709e-02 -5.406e-03 2.680e-03 8.912e-02
#> norm102 norm112 norm119 norm124 norm128 norm131 norm132
#> -5.018e-02 -1.914e-02 -2.761e-02 4.996e-03 1.226e-03 2.301e-02 -1.864e-03
#> norm134 norm136 norm137 norm145 norm146 norm151 norm152
#> 7.427e-04 4.293e-05 -1.768e-04 -1.438e-02 8.901e-03 2.447e-02 -1.352e-03
#> norm156 norm157 norm165 norm172 norm174 norm175 norm186
#> -5.788e-04 -7.629e-04 2.289e-02 4.773e-03 -3.051e-03 -1.850e-03 1.478e-03
#> norm196 c
#> 1.021e-02 4.527e-03
#> Estimation time: 0.3407 ; Number of iterations: 6
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.6235 ; youden_index: 0.7188 ; aYI: 0 ; sensitivity: 0.9375 ; specificity: 0.8929 ; geometric_mean: 0.9149 ; fdr: 0.09091 ; mcc: 0.8327 ; auc: 0.9643 ; aauc: 0 ; corrclass: 0.9167
#> TP: 30 ; TN: 25 ; FP: 3 ; FN: 2 ; gammas:
#> norm_cov6 norm_cov11
#> -0.02938 0.03878
#> Estimation time: 0.07971 ; Number of iterations: 12
#>
#>
#>
#> --------------------> experiment n 4 of 5 <----------------------
#> lambda = 0.6082 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.104 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 6 ; Backtraking iters: 643 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3778 ; youden_index: 0.7141 ; sensitivity: 0.9467 ; specificity: 0.8923 ; geometric_mean: 0.9191 ; fdr: 0.08974 ; mcc: 0.8424 ; auc: 0.9793 ; corrclass: 0.9214 ;
#> TP: 71 ; TN: 58 ; FP: 7 ; FN: 4 ; betas:
#> norm2 norm7 norm8 norm9 norm12 norm19 norm20
#> -4.838e-02 5.157e-04 -5.046e-13 1.525e-02 -1.114e-02 5.464e-03 -4.653e-04
#> norm31 norm34 norm36
#> -3.263e-13 3.260e-04 7.730e-13
#> [ reached getOption("max.print") -- omitted 32 entries ]
#> Estimation time: 0.3649 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 8 ; Backtraking iters: 72 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.7669 ; youden_index: 0.8168 ; aYI: 0 ; sensitivity: 0.9867 ; specificity: 0.9846 ; geometric_mean: 0.9856 ; fdr: 0.01333 ; mcc: 0.9713 ; auc: 0.9793 ; aauc: 0 ; corrclass: 0.9857 ;
#> TP: 74 ; TN: 64 ; FP: 1 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.06183 0.05357
#> Estimation time: 0.02 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 4 of 5 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.2706 ; youden_index: 0.4531 ; sensitivity: 0.9062 ; fdr: 0.09375 ; mcc: 0.7991 ; auc: 0.9531 ; corrclass: 0.9
#> TP: 29 ; TN: 25 ; FP: 3 ; FN: 3 ; betas:
#> norm2 norm7 norm8 norm9 norm12 norm19 norm20
#> -4.838e-02 5.157e-04 -5.046e-13 1.525e-02 -1.114e-02 5.464e-03 -4.653e-04
#> norm31 norm34 norm36 norm48 norm51 norm52 norm68
#> -3.263e-13 3.260e-04 7.730e-13 -3.976e-03 4.911e-02 -1.227e-01 -2.643e-03
#> norm81 norm83 norm85 norm100 norm101 norm102 norm112
#> -3.130e-03 9.388e-13 1.203e-02 4.194e-03 1.083e-01 -5.192e-02 -3.767e-03
#> norm119 norm123 norm130 norm131 norm134 norm136 norm137
#> -1.309e-02 1.715e-12 2.496e-03 8.372e-03 2.762e-13 1.550e-12 -5.094e-13
#> norm141 norm144 norm146 norm151 norm152 norm157 norm171
#> 1.106e-03 7.063e-03 1.883e-03 3.251e-02 -5.847e-03 -1.098e-02 4.592e-03
#> norm172 norm174 norm175 norm189 norm196 norm200 c
#> 7.661e-03 -5.244e-03 -3.170e-03 -2.170e-13 5.499e-03 4.073e-13 2.865e-03
#> Estimation time: 0.3649 ; Number of iterations: 6
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.5851 ; youden_index: 0.6875 ; aYI: 0 ; sensitivity: 0.9375 ; specificity: 0.8571 ; geometric_mean: 0.8964 ; fdr: 0.1176 ; mcc: 0.8 ; auc: 0.9531 ; aauc: 0 ; corrclass: 0.9
#> TP: 30 ; TN: 24 ; FP: 4 ; FN: 2 ; gammas:
#> norm_cov6 norm_cov11
#> -0.06183 0.05357
#> Estimation time: 0.02 ; Number of iterations: 8
#>
#>
#>
#> --------------------> experiment n 5 of 5 <----------------------
#> lambda = 0.6082 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.104 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 6 ; Backtraking iters: 921 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.4007 ; youden_index: 0.7513 ; sensitivity: 0.9733 ; specificity: 0.9231 ; geometric_mean: 0.9479 ; fdr: 0.0641 ; mcc: 0.9 ; auc: 0.9817 ; corrclass: 0.95 ;
#> TP: 73 ; TN: 60 ; FP: 5 ; FN: 2 ; betas:
#> norm2 norm7 norm22 norm23 norm36 norm37 norm48
#> -8.670e-02 1.183e-02 -5.194e-03 -1.992e-03 7.495e-03 1.700e-03 -7.397e-03
#> norm51 norm52 norm97
#> 4.963e-02 -1.217e-01 -1.668e-11
#> [ reached getOption("max.print") -- omitted 19 entries ]
#> Estimation time: 0.3835 mins
#>
#>
#> mmAPG converged because the convergence error is below the threshold
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 11 ; Backtraking iters: 227 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.761 ; youden_index: 0.7832 ; aYI: 0 ; sensitivity: 0.96 ; specificity: 0.9538 ; geometric_mean: 0.9569 ; fdr: 0.04 ; mcc: 0.9138 ; auc: 0.9817 ; aauc: 0 ; corrclass: 0.9571 ;
#> TP: 72 ; TN: 62 ; FP: 3 ; FN: 3 ; gammas:
#> norm_cov6
#> -0.04561
#> Estimation time: 0.05806 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 5 of 5 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1876 ; youden_index: 0.4208 ; sensitivity: 0.8125 ; fdr: 0.1875 ; mcc: 0.5982 ; auc: 0.9208 ; corrclass: 0.8
#> TP: 26 ; TN: 22 ; FP: 6 ; FN: 6 ; betas:
#> norm2 norm7 norm22 norm23 norm36 norm37 norm48
#> -8.670e-02 1.183e-02 -5.194e-03 -1.992e-03 7.495e-03 1.700e-03 -7.397e-03
#> norm51 norm52 norm97 norm101 norm102 norm107 norm115
#> 4.963e-02 -1.217e-01 -1.668e-11 1.068e-01 -8.346e-02 -3.201e-03 2.528e-03
#> norm119 norm124 norm128 norm130 norm134 norm136 norm145
#> -7.072e-03 1.266e-12 1.053e-03 1.900e-03 8.589e-03 4.835e-03 -4.677e-03
#> norm151 norm157 norm161 norm169 norm172 norm175 norm182
#> 4.135e-02 -3.391e-12 4.506e-03 -5.726e-12 1.547e-03 -3.504e-12 1.120e-02
#> c
#> 7.528e-03
#> Estimation time: 0.3835 ; Number of iterations: 6
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.628 ; youden_index: 0.5938 ; aYI: 0 ; sensitivity: 0.9375 ; specificity: 0.8214 ; geometric_mean: 0.8775 ; fdr: 0.1429 ; mcc: 0.768 ; auc: 0.9208 ; aauc: 0 ; corrclass: 0.8833
#> TP: 30 ; TN: 23 ; FP: 5 ; FN: 2 ; gammas:
#> norm_cov6
#> -0.04561
#> Estimation time: 0.05806 ; Number of iterations: 11
#>
#>
#> Total Simulation Time: 1.95 mins mins.
# 8. View summary of simulation results
colMeans(sim_result$corrclass)
#> train test
#> 0.9514 0.8400
colMeans(sim_result$corrclass_covYI)
#> train test
#> 0.9700 0.8967The estimated coefficients \(\hat{\beta}\) (typically element
x1 in the output list) provide the optimal linear
combination of features. Coefficients successfully shrunk to zero by the
penalty are those deemed irrelevant and are effectively excluded from
the final diagnostic model.
The PYE estimation: Salaroli, C. J., & Pardo, M. C. (2023). PYE: A Penalized Youden Index Estimator for selecting and combining biomarkers in high-dimensional data. Chemometrics and Intelligent Laboratory Systems, 236, 104786. https://doi.org/10.1016/j.chemolab.2023.104786
The covYI Estimation: Salaroli, C. J., & Pardo, M. C. (2026). covYI: A Covariate-Adjusted Penalized Youden Index Estimator for Selecting and Combining Covariates in High-Dimensional Data. Submitted for publication, currently under review.