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 alpha is below the threshold min_alpha.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> fold = 1 ;
#> total iters: 4 ; Backtraking iters: 486 ; lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1457 ; youden_index: 0.4374 ; sensitivity: 0.8767 ; specificity: 0.7833 ; geometric_mean: 0.8287 ; fdr: 0.1688 ; mcc: 0.6652 ; auc: 0.9162 ; corrclass: 0.8346 ;
#> TP: 64 ; TN: 47 ; FP: 13 ; FN: 9 ; betas:
#> norm2 norm51 norm52 norm101 norm151 c
#> -0.010128 0.019355 -0.056250 0.080234 0.028541 0.003293
#> Estimation time: 0.1186 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: 6 ; Backtraking iters: 638 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3879 ; youden_index: 0.7181 ; sensitivity: 0.9452 ; specificity: 0.9167 ; geometric_mean: 0.9308 ; fdr: 0.06757 ; mcc: 0.8633 ; auc: 0.9849 ; corrclass: 0.9323 ;
#> TP: 69 ; TN: 55 ; FP: 5 ; FN: 4 ; betas:
#> norm2 norm8 norm12 norm17 norm19 norm23 norm29
#> -4.991e-02 2.266e-04 -4.228e-03 -2.858e-03 5.338e-03 -1.172e-04 1.779e-04
#> norm48 norm49 norm51
#> -2.079e-04 -9.178e-13 6.989e-02
#> [ reached 'max' / getOption("max.print") -- omitted 24 entries ]
#> Estimation time: 0.1352 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: 407 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5964 ; youden_index: 0.9398 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; betas:
#> norm2 norm3 norm5 norm7 norm8 norm10 norm12 norm14
#> -0.076632 0.002377 0.008969 0.003285 0.004148 0.006822 -0.020422 0.004903
#> norm15 norm17
#> 0.009268 -0.019926
#> [ reached 'max' / getOption("max.print") -- omitted 75 entries ]
#> Estimation time: 0.04704 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: 378 ; lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.7026 ; youden_index: 0.9788 ; sensitivity: 0.9863 ; specificity: 1 ; geometric_mean: 0.9931 ; fdr: 0 ; mcc: 0.985 ; auc: 0.9998 ; corrclass: 0.9925 ;
#> TP: 72 ; TN: 60 ; FP: 0 ; FN: 1 ; betas:
#> norm2 norm5 norm10 norm12 norm16 norm17 norm19
#> -1.866e-01 2.538e-02 1.465e-02 -4.298e-02 7.852e-03 -1.063e-01 2.224e-02
#> norm21 norm22 norm23
#> -3.022e-03 3.481e-05 -5.913e-02
#> [ reached 'max' / getOption("max.print") -- omitted 64 entries ]
#> Estimation time: 0.0496 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.03661 ; youden_index: 0.3234 ; sensitivity: 0.7838 ; specificity: 0.7333 ; geometric_mean: 0.7581 ; fdr: 0.2162 ; mcc: 0.5171 ; auc: 0.8234 ; corrclass: 0.7612
#> TP: 29 ; TN: 22 ; FP: 8 ; FN: 8 ; betas:
#> norm2 norm51 norm52 norm101 norm151 c
#> -0.010128 0.019355 -0.056250 0.080234 0.028541 0.003293
#> Cross-validation time: 0.1186 ; Number of iterations: 4
#>
#>
#> -> 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.1307 ; youden_index: 0.3505 ; sensitivity: 0.8108 ; specificity: 0.7333 ; geometric_mean: 0.7711 ; fdr: 0.2105 ; mcc: 0.5461 ; auc: 0.8505 ; corrclass: 0.7761
#> TP: 30 ; TN: 22 ; FP: 8 ; FN: 7 ; betas:
#> norm2 norm8 norm12 norm17 norm19 norm23 norm29
#> -4.991e-02 2.266e-04 -4.228e-03 -2.858e-03 5.338e-03 -1.172e-04 1.779e-04
#> norm48 norm49 norm51 norm52 norm66 norm74 norm75
#> -2.079e-04 -9.178e-13 6.989e-02 -1.000e-01 -6.747e-03 2.213e-02 9.175e-04
#> norm78 norm83 norm85 norm90 norm101 norm102 norm115
#> 4.469e-03 7.972e-04 6.345e-03 -7.712e-04 1.040e-01 -2.163e-02 3.433e-03
#> norm119 norm120 norm130 norm138 norm151 norm157 norm160
#> -5.352e-03 -1.729e-02 1.350e-03 5.014e-03 7.860e-02 -1.248e-02 -3.342e-04
#> norm173 norm175 norm183 norm195 norm199 c
#> 3.268e-03 -3.721e-03 1.265e-03 -5.742e-04 -9.260e-03 -5.373e-04
#> Cross-validation time: 0.1352 ; Number of iterations: 6
#>
#>
#> -> 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.1732 ; youden_index: 0.3775 ; sensitivity: 0.8919 ; specificity: 0.7 ; geometric_mean: 0.7901 ; fdr: 0.2143 ; mcc: 0.6086 ; auc: 0.8775 ; corrclass: 0.806
#> TP: 33 ; TN: 21 ; FP: 9 ; FN: 4 ; betas:
#> norm2 norm3 norm5 norm7 norm8 norm10 norm12
#> -7.663e-02 2.377e-03 8.969e-03 3.285e-03 4.148e-03 6.822e-03 -2.042e-02
#> norm14 norm15 norm17 norm19 norm23 norm24 norm29
#> 4.903e-03 9.268e-03 -1.993e-02 2.418e-02 -2.987e-02 1.973e-03 1.366e-02
#> norm33 norm36 norm38 norm43 norm48 norm49 norm51
#> -2.795e-03 6.407e-03 1.381e-02 6.395e-05 -4.766e-03 -3.143e-03 1.165e-01
#> norm52 norm53 norm54 norm55 norm58 norm61 norm62
#> -1.366e-01 -1.940e-03 -1.515e-02 -7.776e-04 1.048e-03 -2.069e-03 1.215e-05
#> norm66 norm69 norm70 norm71 norm73 norm74 norm75
#> -2.721e-02 -1.573e-02 -2.011e-03 -6.809e-03 1.967e-02 4.871e-02 1.009e-02
#> norm78 norm81 norm83 norm85 norm86 norm87 norm90
#> 2.538e-03 6.802e-03 2.570e-02 3.670e-02 -4.559e-03 -4.125e-03 -2.534e-03
#> norm93 norm94 norm95 norm98 norm99 norm101 norm102
#> -4.207e-03 -3.369e-03 3.323e-03 2.503e-03 -1.417e-02 1.363e-01 -5.503e-02
#> norm105 norm114 norm115 norm117 norm119 norm120 norm127
#> -8.730e-04 2.256e-02 2.060e-02 2.664e-03 -2.814e-02 -1.621e-02 8.410e-03
#> norm130 norm133 norm134 norm137 norm138 norm141 norm142
#> 1.425e-03 4.614e-03 -3.845e-03 -4.947e-03 3.944e-02 -3.171e-03 -2.173e-03
#> norm144 norm145 norm146 norm151 norm153 norm154 norm157
#> -3.192e-03 8.210e-03 6.667e-03 1.065e-01 -2.152e-02 1.298e-03 -4.563e-02
#> norm159 norm160 norm166 norm168 norm173 norm174 norm179
#> -8.075e-04 -5.828e-03 -8.913e-04 3.293e-03 1.657e-02 -6.086e-03 -1.333e-04
#> norm183 norm187 norm190 norm192 norm195 norm198 norm199
#> 9.664e-04 -8.203e-03 -3.383e-03 6.161e-03 -5.089e-03 3.388e-03 -1.582e-02
#> c
#> -1.726e-02
#> Cross-validation time: 0.04704 ; 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.1854 ; youden_index: 0.345 ; sensitivity: 0.8108 ; specificity: 0.7 ; geometric_mean: 0.7534 ; fdr: 0.2308 ; mcc: 0.515 ; auc: 0.845 ; corrclass: 0.7612
#> TP: 30 ; TN: 21 ; FP: 9 ; FN: 7 ; betas:
#> norm2 norm5 norm10 norm12 norm16 norm17 norm19
#> -1.866e-01 2.538e-02 1.465e-02 -4.298e-02 7.852e-03 -1.063e-01 2.224e-02
#> norm21 norm22 norm23 norm24 norm27 norm28 norm29
#> -3.022e-03 3.481e-05 -5.913e-02 1.730e-03 -1.098e-04 6.829e-03 6.122e-02
#> norm33 norm38 norm46 norm48 norm51 norm52 norm60
#> -2.482e-03 3.857e-02 4.920e-03 -3.208e-04 2.039e-01 -2.417e-01 -3.438e-03
#> norm63 norm65 norm66 norm69 norm71 norm74 norm78
#> -1.166e-03 -2.314e-02 -2.229e-02 -4.229e-03 -3.251e-02 8.320e-02 2.855e-02
#> norm81 norm83 norm84 norm85 norm86 norm88 norm89
#> 1.252e-02 4.922e-02 -2.281e-02 1.396e-01 -1.575e-03 3.649e-02 -1.682e-02
#> norm90 norm92 norm93 norm99 norm101 norm102 norm105
#> -2.727e-02 7.437e-03 -8.326e-03 -1.986e-03 2.806e-01 -1.173e-01 -4.481e-03
#> norm112 norm114 norm115 norm117 norm119 norm120 norm137
#> -6.251e-03 2.699e-02 3.767e-02 2.293e-02 -5.110e-02 -2.691e-02 -8.310e-03
#> norm138 norm140 norm142 norm144 norm148 norm151 norm153
#> 8.299e-02 6.711e-04 -5.616e-03 -2.012e-03 -9.933e-03 2.015e-01 -7.400e-02
#> norm154 norm155 norm157 norm159 norm161 norm166 norm172
#> 1.942e-02 -1.994e-03 -1.398e-01 -2.394e-03 1.029e-03 -4.639e-02 3.417e-04
#> norm173 norm174 norm175 norm182 norm185 norm187 norm188
#> 3.847e-02 -3.695e-03 -4.675e-02 3.499e-04 -3.989e-02 -1.084e-03 1.587e-02
#> norm195 norm196 norm199 c
#> -2.581e-04 9.867e-04 -4.813e-02 -1.803e-02
#> Cross-validation time: 0.0496 ; Number of iterations: 10
#>
#>
#> ----------------------------------------------------------------
#> | starting with the 2 -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 = 2 ;
#> total iters: 10 ; Backtraking iters: 1721 ; lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1306 ; youden_index: 0.381 ; sensitivity: 0.8356 ; specificity: 0.75 ; geometric_mean: 0.7917 ; fdr: 0.1974 ; mcc: 0.5889 ; auc: 0.9018 ; corrclass: 0.797 ;
#> TP: 61 ; TN: 45 ; FP: 15 ; FN: 12 ; betas:
#> norm2 norm51 norm52 norm101 norm102 norm165 norm182
#> -0.0351007 0.0191164 -0.0119242 0.0562090 -0.0351724 0.0092245 0.0001658
#> c
#> -0.0002453
#> Estimation time: 0.1717 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: 634 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3707 ; youden_index: 0.7326 ; sensitivity: 0.9726 ; specificity: 0.95 ; geometric_mean: 0.9612 ; fdr: 0.04054 ; mcc: 0.9241 ; auc: 0.99 ; corrclass: 0.9624 ;
#> TP: 71 ; TN: 57 ; FP: 3 ; FN: 2 ; betas:
#> norm1 norm2 norm15 norm22 norm28 norm32 norm33
#> 0.0144210 -0.0532252 0.0003497 -0.0002475 -0.0003866 -0.0033551 -0.0216291
#> norm35 norm44 norm51
#> -0.0119003 -0.0028895 0.0575166
#> [ reached 'max' / getOption("max.print") -- omitted 32 entries ]
#> Estimation time: 0.1223 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: 654 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5668 ; youden_index: 0.9534 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm5 norm12 norm15 norm22 norm28
#> 4.899e-02 -9.368e-02 1.292e-03 4.512e-04 2.409e-02 -1.304e-02 -5.938e-03
#> norm29 norm31 norm32
#> 1.295e-11 -7.548e-03 -8.990e-03
#> [ reached 'max' / getOption("max.print") -- omitted 48 entries ]
#> Estimation time: 0.1047 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: 330 ; lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.6609 ; youden_index: 0.9798 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm8 norm15 norm22 norm25 norm28
#> 0.1212784 -0.1956138 0.0003467 0.0637439 -0.0027854 0.0029628 -0.0173819
#> norm29 norm32 norm33
#> 0.0046001 -0.0029379 -0.1392908
#> [ reached 'max' / getOption("max.print") -- omitted 58 entries ]
#> Estimation time: 0.04357 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.02955 ; youden_index: 0.3099 ; sensitivity: 0.7027 ; specificity: 0.7667 ; geometric_mean: 0.734 ; fdr: 0.2121 ; mcc: 0.4669 ; auc: 0.8099 ; corrclass: 0.7313
#> TP: 26 ; TN: 23 ; FP: 7 ; FN: 11 ; betas:
#> norm2 norm51 norm52 norm101 norm102 norm165 norm182
#> -0.0351007 0.0191164 -0.0119242 0.0562090 -0.0351724 0.0092245 0.0001658
#> c
#> -0.0002453
#> Cross-validation time: 0.1717 ; Number of iterations: 10
#>
#>
#> -> 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.1237 ; youden_index: 0.3802 ; sensitivity: 0.7838 ; specificity: 0.7667 ; geometric_mean: 0.7752 ; fdr: 0.1944 ; mcc: 0.549 ; auc: 0.8802 ; corrclass: 0.7761
#> TP: 29 ; TN: 23 ; FP: 7 ; FN: 8 ; betas:
#> norm1 norm2 norm15 norm22 norm28 norm32 norm33
#> 1.442e-02 -5.323e-02 3.497e-04 -2.475e-04 -3.866e-04 -3.355e-03 -2.163e-02
#> norm35 norm44 norm51 norm52 norm66 norm84 norm96
#> -1.190e-02 -2.889e-03 5.752e-02 -6.483e-02 -3.157e-04 -2.416e-04 -1.382e-02
#> norm97 norm98 norm101 norm102 norm107 norm108 norm110
#> -6.726e-03 3.828e-03 8.865e-02 -7.806e-02 -2.028e-03 5.368e-03 1.652e-06
#> norm119 norm120 norm130 norm131 norm136 norm137 norm138
#> -1.239e-02 -7.562e-03 8.288e-03 3.076e-04 4.884e-04 -2.747e-04 5.345e-03
#> norm141 norm142 norm151 norm152 norm161 norm165 norm175
#> -2.770e-04 -2.615e-03 1.293e-02 -1.298e-02 3.372e-03 3.429e-02 -1.565e-02
#> norm176 norm181 norm182 norm183 norm188 norm193 c
#> -7.368e-04 1.348e-02 8.491e-03 1.923e-02 -6.571e-03 1.175e-12 4.045e-03
#> Cross-validation time: 0.1223 ; 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.08388 ; youden_index: 0.3523 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8523 ; corrclass: 0.791
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; betas:
#> norm1 norm2 norm5 norm12 norm15 norm22 norm28
#> 4.899e-02 -9.368e-02 1.292e-03 4.512e-04 2.409e-02 -1.304e-02 -5.938e-03
#> norm29 norm31 norm32 norm33 norm35 norm44 norm49
#> 1.295e-11 -7.548e-03 -8.990e-03 -6.590e-02 -5.483e-02 -5.013e-02 -1.556e-03
#> norm51 norm52 norm68 norm69 norm82 norm83 norm84
#> 1.049e-01 -1.312e-01 -3.289e-04 -6.875e-03 8.952e-04 6.367e-05 -6.720e-03
#> norm90 norm96 norm97 norm98 norm101 norm102 norm107
#> -4.148e-05 -1.938e-02 -3.690e-02 2.168e-02 1.481e-01 -1.295e-01 -3.978e-03
#> norm108 norm115 norm117 norm119 norm120 norm123 norm130
#> 2.705e-02 2.801e-13 1.181e-11 -1.741e-02 -1.815e-02 -1.671e-02 3.945e-02
#> norm131 norm136 norm141 norm142 norm143 norm148 norm151
#> 2.287e-03 3.935e-02 -1.823e-02 -8.811e-03 -2.822e-04 -4.251e-03 5.252e-02
#> norm152 norm155 norm161 norm164 norm165 norm175 norm176
#> -6.281e-02 3.038e-03 1.664e-03 1.620e-11 6.368e-02 -5.981e-02 -9.934e-04
#> norm181 norm182 norm183 norm184 norm188 norm190 norm198
#> 4.835e-02 3.459e-02 4.568e-02 4.438e-03 -1.541e-03 -1.160e-03 8.187e-03
#> norm200 c
#> -5.573e-12 1.179e-02
#> Cross-validation time: 0.1047 ; 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.05837 ; youden_index: 0.3036 ; sensitivity: 0.6757 ; specificity: 0.7 ; geometric_mean: 0.6877 ; fdr: 0.2647 ; mcc: 0.3737 ; auc: 0.8036 ; corrclass: 0.6866
#> TP: 25 ; TN: 21 ; FP: 9 ; FN: 12 ; betas:
#> norm1 norm2 norm8 norm15 norm22 norm25 norm28
#> 1.213e-01 -1.956e-01 3.467e-04 6.374e-02 -2.785e-03 2.963e-03 -1.738e-02
#> norm29 norm32 norm33 norm34 norm35 norm38 norm44
#> 4.600e-03 -2.938e-03 -1.393e-01 -2.808e-03 -1.242e-01 -4.092e-04 -1.069e-01
#> norm48 norm49 norm51 norm52 norm54 norm68 norm72
#> -5.203e-02 -4.815e-03 2.051e-01 -2.407e-01 7.264e-04 -7.986e-04 -2.279e-04
#> norm73 norm78 norm84 norm96 norm97 norm98 norm100
#> 2.681e-03 -2.972e-03 -4.788e-02 -6.504e-02 -7.694e-02 7.562e-02 6.316e-03
#> norm101 norm102 norm107 norm108 norm110 norm111 norm116
#> 2.854e-01 -2.325e-01 -2.235e-02 8.057e-02 2.501e-04 1.354e-02 -9.523e-05
#> norm117 norm119 norm120 norm122 norm123 norm130 norm131
#> 6.529e-03 -1.108e-02 -4.187e-02 2.573e-03 -8.275e-02 9.008e-02 1.818e-02
#> norm132 norm136 norm141 norm142 norm143 norm148 norm151
#> 1.708e-04 8.609e-02 -6.769e-03 -1.175e-02 -6.478e-03 -2.558e-03 1.128e-01
#> norm152 norm155 norm160 norm161 norm164 norm165 norm171
#> -1.180e-01 1.597e-02 -2.227e-03 4.018e-03 1.600e-02 1.169e-01 1.694e-03
#> norm175 norm176 norm179 norm181 norm182 norm183 norm186
#> -1.070e-01 -3.713e-03 -6.070e-04 1.273e-01 7.599e-02 8.784e-02 1.050e-03
#> norm188 norm192 norm198 norm200 c
#> -1.929e-03 3.015e-04 1.827e-03 -2.916e-03 4.151e-02
#> Cross-validation time: 0.04357 ; Number of iterations: 10
#>
#>
#> ----------------------------------------------------------------
#> | starting with the 3 -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 = 3 ;
#> total iters: 8 ; Backtraking iters: 2430 ; lambda: 1.5 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1195 ; youden_index: 0.3849 ; sensitivity: 0.8243 ; specificity: 0.8333 ; geometric_mean: 0.8288 ; fdr: 0.1408 ; mcc: 0.6552 ; auc: 0.9009 ; corrclass: 0.8284 ;
#> TP: 61 ; TN: 50 ; FP: 10 ; FN: 13 ; betas:
#> norm2 norm51 norm52 norm101 norm102 norm151 norm165 c
#> -0.014373 0.003929 -0.055585 0.068522 -0.020238 0.010503 0.003762 0.010282
#> Estimation time: 0.2978 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: 5 ; Backtraking iters: 568 ; lambda: 0.6082 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.3531 ; youden_index: 0.7352 ; sensitivity: 0.9595 ; specificity: 0.9333 ; geometric_mean: 0.9463 ; fdr: 0.05333 ; mcc: 0.8943 ; auc: 0.9673 ; corrclass: 0.9478 ;
#> TP: 71 ; TN: 56 ; FP: 4 ; FN: 3 ; betas:
#> norm1 norm2 norm19 norm27 norm31 norm51 norm52
#> 0.0119215 -0.0342603 0.0001157 0.0022187 -0.0063761 0.0331237 -0.1020748
#> norm57 norm85 norm96
#> -0.0047294 0.0319344 -0.0065880
#> [ reached 'max' / getOption("max.print") -- omitted 21 entries ]
#> Estimation time: 0.123 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: 9 ; Backtraking iters: 771 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5956 ; youden_index: 0.9543 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 74 ; TN: 60 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm5 norm10 norm11 norm13 norm19
#> 3.423e-02 -4.063e-02 -1.697e-03 1.050e-02 -6.840e-04 -1.840e-03 1.159e-02
#> norm27 norm28 norm31
#> 3.087e-02 5.783e-05 -4.397e-02
#> [ reached 'max' / getOption("max.print") -- omitted 55 entries ]
#> Estimation time: 0.1383 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: 353 ; lambda: 0.1 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.7368 ; youden_index: 0.9455 ; sensitivity: 0.9865 ; specificity: 0.9833 ; geometric_mean: 0.9849 ; fdr: 0.01351 ; mcc: 0.9698 ; auc: 0.9998 ; corrclass: 0.9851 ;
#> TP: 73 ; TN: 59 ; FP: 1 ; FN: 1 ; betas:
#> norm1 norm2 norm23 norm27 norm31 norm32 norm51 norm52
#> 0.037774 -0.074727 -0.002623 0.061227 -0.053996 -0.020180 0.150752 -0.222904
#> norm57 norm58
#> -0.103684 -0.011263
#> [ reached 'max' / getOption("max.print") -- omitted 27 entries ]
#> Estimation time: 0.04628 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.08887 ; youden_index: 0.388 ; sensitivity: 0.7222 ; specificity: 0.8333 ; geometric_mean: 0.7758 ; fdr: 0.1613 ; mcc: 0.5543 ; auc: 0.888 ; corrclass: 0.7727
#> TP: 26 ; TN: 25 ; FP: 5 ; FN: 10 ; betas:
#> norm2 norm51 norm52 norm101 norm102 norm151 norm165 c
#> -0.014373 0.003929 -0.055585 0.068522 -0.020238 0.010503 0.003762 0.010282
#> Cross-validation time: 0.2978 ; Number of iterations: 8
#>
#>
#> -> 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.1915 ; youden_index: 0.4472 ; sensitivity: 0.8056 ; specificity: 0.8667 ; geometric_mean: 0.8356 ; fdr: 0.1212 ; mcc: 0.6694 ; auc: 0.9472 ; corrclass: 0.8333
#> TP: 29 ; TN: 26 ; FP: 4 ; FN: 7 ; betas:
#> norm1 norm2 norm19 norm27 norm31 norm51 norm52
#> 1.192e-02 -3.426e-02 1.157e-04 2.219e-03 -6.376e-03 3.312e-02 -1.021e-01
#> norm57 norm85 norm96 norm101 norm102 norm103 norm106
#> -4.729e-03 3.193e-02 -6.588e-03 1.020e-01 -9.179e-02 4.480e-04 -7.660e-12
#> norm107 norm115 norm116 norm119 norm130 norm141 norm147
#> -2.952e-03 1.808e-02 8.710e-12 -3.488e-02 9.466e-03 -7.979e-03 -1.277e-03
#> norm149 norm151 norm154 norm157 norm159 norm165 norm173
#> -1.090e-03 4.989e-02 1.895e-13 -1.272e-02 1.191e-13 3.710e-02 4.575e-13
#> norm193 norm198 c
#> 2.110e-02 4.024e-03 9.841e-03
#> Cross-validation time: 0.123 ; Number of iterations: 5
#>
#>
#> -> 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.2532 ; youden_index: 0.3991 ; sensitivity: 0.8611 ; specificity: 0.8667 ; geometric_mean: 0.8639 ; fdr: 0.1143 ; mcc: 0.7261 ; auc: 0.8991 ; corrclass: 0.8636
#> TP: 31 ; TN: 26 ; FP: 4 ; FN: 5 ; betas:
#> norm1 norm2 norm5 norm10 norm11 norm13 norm19
#> 3.423e-02 -4.063e-02 -1.697e-03 1.050e-02 -6.840e-04 -1.840e-03 1.159e-02
#> norm27 norm28 norm31 norm32 norm50 norm51 norm52
#> 3.087e-02 5.783e-05 -4.397e-02 -1.543e-02 7.884e-04 7.800e-02 -1.202e-01
#> norm53 norm57 norm58 norm62 norm65 norm78 norm79
#> 4.175e-03 -5.218e-02 -8.205e-03 4.201e-05 -1.131e-03 3.413e-02 9.141e-04
#> norm83 norm85 norm86 norm90 norm93 norm96 norm97
#> 5.340e-03 4.268e-02 -7.319e-03 -3.039e-03 -2.370e-03 -2.660e-02 -1.363e-02
#> norm98 norm99 norm101 norm102 norm103 norm106 norm107
#> 1.356e-02 -5.828e-03 1.276e-01 -9.853e-02 6.610e-03 -2.948e-02 -2.059e-02
#> norm108 norm113 norm115 norm119 norm128 norm130 norm134
#> 9.109e-04 -1.372e-04 4.234e-02 -3.421e-02 1.570e-04 3.845e-02 -3.539e-03
#> norm137 norm138 norm139 norm140 norm141 norm146 norm149
#> -7.030e-03 1.037e-02 -8.414e-04 4.502e-03 -1.972e-02 3.397e-02 -9.080e-05
#> norm151 norm154 norm157 norm161 norm162 norm165 norm171
#> 6.609e-02 3.936e-02 -1.901e-02 3.046e-03 4.811e-03 6.952e-02 2.477e-05
#> norm172 norm173 norm176 norm181 norm187 norm193 norm195
#> 4.100e-04 2.245e-03 -1.744e-02 2.933e-02 -2.693e-02 4.814e-02 -4.847e-04
#> norm198 c
#> 3.692e-02 8.958e-03
#> Cross-validation time: 0.1383 ; Number of iterations: 9
#>
#>
#> -> 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.4046 ; youden_index: 0.4009 ; sensitivity: 0.8333 ; specificity: 0.9 ; geometric_mean: 0.866 ; fdr: 0.09091 ; mcc: 0.7303 ; auc: 0.9009 ; corrclass: 0.8636
#> TP: 30 ; TN: 27 ; FP: 3 ; FN: 6 ; betas:
#> norm1 norm2 norm23 norm27 norm31 norm32 norm51 norm52
#> 0.037774 -0.074727 -0.002623 0.061227 -0.053996 -0.020180 0.150752 -0.222904
#> norm57 norm58 norm74 norm78 norm85 norm93 norm96 norm97
#> -0.103684 -0.011263 0.001611 0.060024 0.058606 -0.007006 -0.033267 -0.007374
#> norm98 norm101 norm102 norm106 norm107 norm115 norm119 norm130
#> 0.022566 0.242991 -0.167048 -0.018119 -0.037420 0.053116 -0.019534 0.071039
#> norm137 norm138 norm141 norm146 norm151 norm154 norm162 norm165
#> -0.005829 0.007379 -0.026021 0.064430 0.130340 0.067716 0.003537 0.123879
#> norm181 norm187 norm193 norm198 c
#> 0.046481 -0.024172 0.083055 0.046901 0.013566
#> Cross-validation time: 0.04628 ; Number of iterations: 10
#>
#>
#>
#> Starting the CV of tau using as lambda: 0.2466 , that is the best value of lambda as per: ccr
#> ----------------------------------------------------------------
#> | starting with the 1 -th fold for the CV of tau |
#> ----------------------------------------------------------------
#> 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: 407 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5964 ; youden_index: 0.9398 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; betas:
#> norm2 norm3 norm5 norm7 norm8 norm10 norm12 norm14
#> -0.076632 0.002377 0.008969 0.003285 0.004148 0.006822 -0.020422 0.004903
#> norm15 norm17
#> 0.009268 -0.019926
#> [ reached 'max' / getOption("max.print") -- omitted 75 entries ]
#> Estimation time: 0.04811 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: 6 ; Backtraking iters: 142 ; tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9367 ; youden_index: 0.9367 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.009926 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: 6 ; Backtraking iters: 270 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9367 ; youden_index: 0.9367 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01389 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: 7 ; Backtraking iters: 282 ; tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9367 ; youden_index: 0.9367 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01618 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: 9 ; Backtraking iters: 198 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.938 ; youden_index: 0.9459 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> norm_cov6
#> -0.02456
#> Estimation time: 0.01069 mins
#>
#>
#>
#> Final results on TEST SET of covYI for the FOLD: 1 :
#> With lambda: 0.2466 , penalty: SCAD and weight: 0.5 . Accuracy measures only pye:
#> pye_KS: 0.1732 ; youden_index: 0.3775 ; sensitivity: 0.8919 ; specificity: 0.7 ; geometric_mean: 0.7901 ; fdr: 0.2143 ; mcc: 0.6086 ; auc: 0.8775 ; corrclass: 0.806 ;
#> TP: 33 ; TN: 21 ; FP: 9 ; FN: 4 ; betas:
#> norm2 norm3 norm5 norm7 norm8 norm10 norm12
#> -7.663e-02 2.377e-03 8.969e-03 3.285e-03 4.148e-03 6.822e-03 -2.042e-02
#> norm14 norm15 norm17 norm19 norm23 norm24 norm29
#> 4.903e-03 9.268e-03 -1.993e-02 2.418e-02 -2.987e-02 1.973e-03 1.366e-02
#> norm33 norm36 norm38 norm43 norm48 norm49 norm51
#> -2.795e-03 6.407e-03 1.381e-02 6.395e-05 -4.766e-03 -3.143e-03 1.165e-01
#> norm52 norm53 norm54 norm55 norm58 norm61 norm62
#> -1.366e-01 -1.940e-03 -1.515e-02 -7.776e-04 1.048e-03 -2.069e-03 1.215e-05
#> norm66 norm69 norm70 norm71 norm73 norm74 norm75
#> -2.721e-02 -1.573e-02 -2.011e-03 -6.809e-03 1.967e-02 4.871e-02 1.009e-02
#> norm78 norm81 norm83 norm85 norm86 norm87 norm90
#> 2.538e-03 6.802e-03 2.570e-02 3.670e-02 -4.559e-03 -4.125e-03 -2.534e-03
#> norm93 norm94 norm95 norm98 norm99 norm101 norm102
#> -4.207e-03 -3.369e-03 3.323e-03 2.503e-03 -1.417e-02 1.363e-01 -5.503e-02
#> norm105 norm114 norm115 norm117 norm119 norm120 norm127
#> -8.730e-04 2.256e-02 2.060e-02 2.664e-03 -2.814e-02 -1.621e-02 8.410e-03
#> norm130 norm133 norm134 norm137 norm138 norm141 norm142
#> 1.425e-03 4.614e-03 -3.845e-03 -4.947e-03 3.944e-02 -3.171e-03 -2.173e-03
#> norm144 norm145 norm146 norm151 norm153 norm154 norm157
#> -3.192e-03 8.210e-03 6.667e-03 1.065e-01 -2.152e-02 1.298e-03 -4.563e-02
#> norm159 norm160 norm166 norm168 norm173 norm174 norm179
#> -8.075e-04 -5.828e-03 -8.913e-04 3.293e-03 1.657e-02 -6.086e-03 -1.333e-04
#> norm183 norm187 norm190 norm192 norm195 norm198 norm199
#> 9.664e-04 -8.203e-03 -3.383e-03 6.161e-03 -5.089e-03 3.388e-03 -1.582e-02
#> c
#> -1.726e-02
#> Cross-validation time: 0.04811 ; Number of iterations: 10
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5171 ; youden_index: 0.4865 ; aYI: 0 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8775 ; aauc: 0 ; corrclass: 0.791 ;
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.009926 ; Number of iterations: 6
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5171 ; youden_index: 0.4865 ; aYI: 0 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8775 ; aauc: 0 ; corrclass: 0.791 ;
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.01389 ; Number of iterations: 6
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5171 ; youden_index: 0.4865 ; aYI: 0 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8775 ; aauc: 0 ; corrclass: 0.791 ;
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.01618 ; Number of iterations: 7
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.5382 ; youden_index: 0.4865 ; aYI: 0 ; sensitivity: 0.8649 ; specificity: 0.7333 ; geometric_mean: 0.7964 ; fdr: 0.2 ; mcc: 0.6064 ; auc: 0.8775 ; aauc: 0 ; corrclass: 0.806 ;
#> TP: 32 ; TN: 22 ; FP: 8 ; FN: 5 ; gammas:
#> norm_cov6
#> -0.02456
#> Cross-validation time: 0.01069 ; Number of iterations: 9
#>
#>
#>
#> ----------------------------------------------------------------
#> | starting with the 2 -th fold for the CV of tau |
#> ----------------------------------------------------------------
#> 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: 654 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5668 ; youden_index: 0.9534 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm5 norm12 norm15 norm22 norm28
#> 4.899e-02 -9.368e-02 1.292e-03 4.512e-04 2.409e-02 -1.304e-02 -5.938e-03
#> norm29 norm31 norm32
#> 1.295e-11 -7.548e-03 -8.990e-03
#> [ reached 'max' / getOption("max.print") -- omitted 48 entries ]
#> Estimation time: 0.1089 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 = 2 ; total iters: 6 ; Backtraking iters: 158 ; tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9524 ; youden_index: 0.9524 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01094 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 = 2 ; total iters: 6 ; Backtraking iters: 274 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9524 ; youden_index: 0.9524 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01326 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 = 2 ; total iters: 7 ; Backtraking iters: 311 ; tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9524 ; youden_index: 0.9524 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01495 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: 252 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9537 ; youden_index: 0.962 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 73 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> norm_cov6
#> -0.02796
#> Estimation time: 0.01131 mins
#>
#>
#>
#> Final results on TEST SET of covYI for the FOLD: 2 :
#> With lambda: 0.2466 , penalty: SCAD and weight: 0.5 . Accuracy measures only pye:
#> pye_KS: 0.08388 ; youden_index: 0.3523 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8523 ; corrclass: 0.791 ;
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; betas:
#> norm1 norm2 norm5 norm12 norm15 norm22 norm28
#> 4.899e-02 -9.368e-02 1.292e-03 4.512e-04 2.409e-02 -1.304e-02 -5.938e-03
#> norm29 norm31 norm32 norm33 norm35 norm44 norm49
#> 1.295e-11 -7.548e-03 -8.990e-03 -6.590e-02 -5.483e-02 -5.013e-02 -1.556e-03
#> norm51 norm52 norm68 norm69 norm82 norm83 norm84
#> 1.049e-01 -1.312e-01 -3.289e-04 -6.875e-03 8.952e-04 6.367e-05 -6.720e-03
#> norm90 norm96 norm97 norm98 norm101 norm102 norm107
#> -4.148e-05 -1.938e-02 -3.690e-02 2.168e-02 1.481e-01 -1.295e-01 -3.978e-03
#> norm108 norm115 norm117 norm119 norm120 norm123 norm130
#> 2.705e-02 2.801e-13 1.181e-11 -1.741e-02 -1.815e-02 -1.671e-02 3.945e-02
#> norm131 norm136 norm141 norm142 norm143 norm148 norm151
#> 2.287e-03 3.935e-02 -1.823e-02 -8.811e-03 -2.822e-04 -4.251e-03 5.252e-02
#> norm152 norm155 norm161 norm164 norm165 norm175 norm176
#> -6.281e-02 3.038e-03 1.664e-03 1.620e-11 6.368e-02 -5.981e-02 -9.934e-04
#> norm181 norm182 norm183 norm184 norm188 norm190 norm198
#> 4.835e-02 3.459e-02 4.568e-02 4.438e-03 -1.541e-03 -1.160e-03 8.187e-03
#> norm200 c
#> -5.573e-12 1.179e-02
#> Cross-validation time: 0.1089 ; Number of iterations: 10
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.4684 ; youden_index: 0.4324 ; aYI: 0 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8523 ; aauc: 0 ; corrclass: 0.791 ;
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.01094 ; Number of iterations: 6
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.4684 ; youden_index: 0.4324 ; aYI: 0 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8523 ; aauc: 0 ; corrclass: 0.791 ;
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.01326 ; Number of iterations: 6
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.4684 ; youden_index: 0.4324 ; aYI: 0 ; sensitivity: 0.8378 ; specificity: 0.7333 ; geometric_mean: 0.7838 ; fdr: 0.2051 ; mcc: 0.5759 ; auc: 0.8523 ; aauc: 0 ; corrclass: 0.791 ;
#> TP: 31 ; TN: 22 ; FP: 8 ; FN: 6 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.01495 ; Number of iterations: 7
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.487 ; youden_index: 0.4324 ; aYI: 0 ; sensitivity: 0.8378 ; specificity: 0.7 ; geometric_mean: 0.7658 ; fdr: 0.225 ; mcc: 0.5453 ; auc: 0.8523 ; aauc: 0 ; corrclass: 0.7761 ;
#> TP: 31 ; TN: 21 ; FP: 9 ; FN: 6 ; gammas:
#> norm_cov6
#> -0.02796
#> Cross-validation time: 0.01131 ; 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: 9 ; Backtraking iters: 771 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5956 ; youden_index: 0.9543 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 74 ; TN: 60 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm5 norm10 norm11 norm13 norm19
#> 3.423e-02 -4.063e-02 -1.697e-03 1.050e-02 -6.840e-04 -1.840e-03 1.159e-02
#> norm27 norm28 norm31
#> 3.087e-02 5.783e-05 -4.397e-02
#> [ reached 'max' / getOption("max.print") -- omitted 55 entries ]
#> Estimation time: 0.1405 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: 6 ; Backtraking iters: 66 ; tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9538 ; youden_index: 0.9538 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 74 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.006628 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: 6 ; Backtraking iters: 174 ; tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9538 ; youden_index: 0.9538 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 74 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.009417 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: 6 ; Backtraking iters: 270 ; tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9538 ; youden_index: 0.9538 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 74 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01203 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: 6 ; Backtraking iters: 386 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9538 ; youden_index: 0.9538 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 74 ; TN: 60 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01574 mins
#>
#>
#>
#> Final results on TEST SET of covYI for the FOLD: 3 :
#> With lambda: 0.2466 , penalty: SCAD and weight: 0.5 . Accuracy measures only pye:
#> pye_KS: 0.2532 ; youden_index: 0.3991 ; sensitivity: 0.8611 ; specificity: 0.8667 ; geometric_mean: 0.8639 ; fdr: 0.1143 ; mcc: 0.7261 ; auc: 0.8991 ; corrclass: 0.8636 ;
#> TP: 31 ; TN: 26 ; FP: 4 ; FN: 5 ; betas:
#> norm1 norm2 norm5 norm10 norm11 norm13 norm19
#> 3.423e-02 -4.063e-02 -1.697e-03 1.050e-02 -6.840e-04 -1.840e-03 1.159e-02
#> norm27 norm28 norm31 norm32 norm50 norm51 norm52
#> 3.087e-02 5.783e-05 -4.397e-02 -1.543e-02 7.884e-04 7.800e-02 -1.202e-01
#> norm53 norm57 norm58 norm62 norm65 norm78 norm79
#> 4.175e-03 -5.218e-02 -8.205e-03 4.201e-05 -1.131e-03 3.413e-02 9.141e-04
#> norm83 norm85 norm86 norm90 norm93 norm96 norm97
#> 5.340e-03 4.268e-02 -7.319e-03 -3.039e-03 -2.370e-03 -2.660e-02 -1.363e-02
#> norm98 norm99 norm101 norm102 norm103 norm106 norm107
#> 1.356e-02 -5.828e-03 1.276e-01 -9.853e-02 6.610e-03 -2.948e-02 -2.059e-02
#> norm108 norm113 norm115 norm119 norm128 norm130 norm134
#> 9.109e-04 -1.372e-04 4.234e-02 -3.421e-02 1.570e-04 3.845e-02 -3.539e-03
#> norm137 norm138 norm139 norm140 norm141 norm146 norm149
#> -7.030e-03 1.037e-02 -8.414e-04 4.502e-03 -1.972e-02 3.397e-02 -9.080e-05
#> norm151 norm154 norm157 norm161 norm162 norm165 norm171
#> 6.609e-02 3.936e-02 -1.901e-02 3.046e-03 4.811e-03 6.952e-02 2.477e-05
#> norm172 norm173 norm176 norm181 norm187 norm193 norm195
#> 4.100e-04 2.245e-03 -1.744e-02 2.933e-02 -2.693e-02 4.814e-02 -4.847e-04
#> norm198 c
#> 3.692e-02 8.958e-03
#> Cross-validation time: 0.1405 ; Number of iterations: 9
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.15 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.6116 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8611 ; specificity: 0.8333 ; geometric_mean: 0.8471 ; fdr: 0.1389 ; mcc: 0.6944 ; auc: 0.8991 ; aauc: 0 ; corrclass: 0.8485 ;
#> TP: 31 ; TN: 25 ; FP: 5 ; FN: 5 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.006628 ; Number of iterations: 6
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.104 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.6116 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8611 ; specificity: 0.8333 ; geometric_mean: 0.8471 ; fdr: 0.1389 ; mcc: 0.6944 ; auc: 0.8991 ; aauc: 0 ; corrclass: 0.8485 ;
#> TP: 31 ; TN: 25 ; FP: 5 ; FN: 5 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.009417 ; Number of iterations: 6
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.07211 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.6116 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8611 ; specificity: 0.8333 ; geometric_mean: 0.8471 ; fdr: 0.1389 ; mcc: 0.6944 ; auc: 0.8991 ; aauc: 0 ; corrclass: 0.8485 ;
#> TP: 31 ; TN: 25 ; FP: 5 ; FN: 5 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.01203 ; Number of iterations: 6
#>
#>
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS_L12 : 0.6116 ; youden_index: 0.5833 ; aYI: 0 ; sensitivity: 0.8611 ; specificity: 0.8333 ; geometric_mean: 0.8471 ; fdr: 0.1389 ; mcc: 0.6944 ; auc: 0.8991 ; aauc: 0 ; corrclass: 0.8485 ;
#> TP: 31 ; TN: 25 ; FP: 5 ; FN: 5 ; gammas:
#> numeric(0)
#> Cross-validation time: 0.01574 ; Number of iterations: 6
#>
#>
#>
#> ----------------------> END OF THE CROSS-VALIDATION OF THE PYE METHOD <-----------------
#> -------------> For the whoole Cross-validation it took: 1.846 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.2466
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.05
# You can access other results like:
pye_cv_result$auc # AUC values
#> $`lambda=0.2466212074`
#> $`lambda=0.2466212074`$train
#> tau=0.15 tau=0.1040041912 tau=0.07211247852 tau=0.05
#> fold=1 1 1 1 1
#> fold=2 1 1 1 1
#> fold=3 1 1 1 1
#>
#> $`lambda=0.2466212074`$test
#> tau=0.15 tau=0.1040041912 tau=0.07211247852 tau=0.05
#> fold=1 0.8775 0.8775 0.8775 0.8775
#> fold=2 0.8523 0.8523 0.8523 0.8523
#> fold=3 0.8991 0.8991 0.8991 0.8991
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 5 33 84 73
#> fold=2 7 41 57 67
#> fold=3 7 30 64 36
pye_cv_result$n_gammas # Number of non-zero gammas for each tau
#> $`lambda=0.2466212074`
#> tau=0.15 tau=0.1040041912 tau=0.07211247852 tau=0.05
#> [1,] 0 0 0 1
#> [2,] 0 0 0 1
#> [3,] 0 0 0 0
# 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.2466 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.05 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 10 ; Backtraking iters: 378 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5917 ; youden_index: 0.9132 ; sensitivity: 0.987 ; specificity: 1 ; geometric_mean: 0.9935 ; fdr: 0 ; mcc: 0.9857 ; auc: 0.9897 ; corrclass: 0.9929 ;
#> TP: 76 ; TN: 63 ; FP: 0 ; FN: 1 ; betas:
#> norm1 norm2 norm9 norm10 norm13 norm15 norm19 norm20
#> 0.003784 -0.077059 0.010366 0.010365 -0.002447 0.042322 0.011988 0.006389
#> norm23 norm25
#> -0.003507 -0.013286
#> [ reached 'max' / getOption("max.print") -- omitted 38 entries ]
#> Estimation time: 0.04585 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: 9 ; Backtraking iters: 90 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9192 ; youden_index: 0.9293 ; aYI: 0 ; sensitivity: 0.987 ; specificity: 1 ; geometric_mean: 0.9935 ; fdr: 0 ; mcc: 0.9857 ; auc: 0.9897 ; aauc: 0 ; corrclass: 0.9929 ;
#> TP: 76 ; TN: 63 ; FP: 0 ; FN: 1 ; gammas:
#> norm_cov11
#> 0.04103
#> Estimation time: 0.009788 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 1 of 5 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.2763 ; youden_index: 0.3765 ; sensitivity: 0.8182 ; fdr: 0.129 ; mcc: 0.667 ; auc: 0.8765 ; corrclass: 0.8333
#> TP: 27 ; TN: 23 ; FP: 4 ; FN: 6 ; betas:
#> norm1 norm2 norm9 norm10 norm13 norm15 norm19
#> 0.0037838 -0.0770586 0.0103664 0.0103652 -0.0024469 0.0423220 0.0119875
#> norm20 norm23 norm25 norm31 norm32 norm37 norm50
#> 0.0063892 -0.0035071 -0.0132861 -0.0036336 -0.0102171 0.0543483 0.0040751
#> norm51 norm52 norm69 norm78 norm83 norm84 norm90
#> 0.1056088 -0.1351573 -0.0070539 0.0075983 0.0317377 -0.0025558 -0.0089695
#> norm101 norm102 norm104 norm105 norm107 norm110 norm112
#> 0.1622480 -0.1023953 0.0008809 -0.0233649 -0.0235131 -0.0190737 0.0011826
#> norm115 norm119 norm130 norm144 norm148 norm149 norm151
#> 0.0614303 -0.0158238 0.0571122 -0.0058024 -0.0114837 0.0011962 0.1092372
#> norm152 norm165 norm168 norm174 norm178 norm181 norm186
#> -0.0052555 0.0357900 -0.0114543 0.0051975 -0.0010281 0.0204693 0.0088438
#> norm187 norm191 norm193 norm198 norm200 c
#> -0.0409174 -0.0027191 0.0025501 0.0194429 0.0027469 0.0046814
#> Estimation time: 0.04585 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.6047 ; youden_index: 0.5758 ; aYI: 0 ; sensitivity: 0.8485 ; specificity: 0.8519 ; geometric_mean: 0.8502 ; fdr: 0.125 ; mcc: 0.6984 ; auc: 0.8765 ; aauc: 0 ; corrclass: 0.85
#> TP: 28 ; TN: 23 ; FP: 4 ; FN: 5 ; gammas:
#> norm_cov11
#> 0.04103
#> Estimation time: 0.009788 ; Number of iterations: 9
#>
#>
#>
#> --------------------> experiment n 2 of 5 <----------------------
#> lambda = 0.2466 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.05 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 10 ; Backtraking iters: 675 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5655 ; youden_index: 0.9561 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 77 ; TN: 63 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm10 norm15 norm16 norm23 norm27
#> 0.0321934 -0.0906438 0.0015563 0.0012732 0.0002168 -0.0025065 0.0400013
#> norm28 norm31 norm32
#> 0.0283573 -0.0336663 -0.0396380
#> [ reached 'max' / getOption("max.print") -- omitted 53 entries ]
#> Estimation time: 0.114 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: 6 ; Backtraking iters: 254 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.956 ; youden_index: 0.956 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 77 ; TN: 63 ; FP: 0 ; FN: 0 ; gammas:
#> numeric(0)
#> Estimation time: 0.01395 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 2 of 5 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.05155 ; youden_index: 0.3474 ; sensitivity: 0.7879 ; fdr: 0.2571 ; mcc: 0.4587 ; auc: 0.8474 ; corrclass: 0.7333
#> TP: 26 ; TN: 18 ; FP: 9 ; FN: 7 ; betas:
#> norm1 norm2 norm10 norm15 norm16 norm23 norm27
#> 3.219e-02 -9.064e-02 1.556e-03 1.273e-03 2.168e-04 -2.506e-03 4.000e-02
#> norm28 norm31 norm32 norm33 norm37 norm44 norm48
#> 2.836e-02 -3.367e-02 -3.964e-02 -4.021e-03 1.303e-02 -2.083e-02 -2.439e-02
#> norm51 norm52 norm56 norm57 norm58 norm62 norm66
#> 7.704e-02 -1.270e-01 3.512e-02 -1.232e-02 5.077e-04 3.149e-02 -1.196e-02
#> norm74 norm75 norm77 norm82 norm83 norm84 norm85
#> 8.296e-03 4.671e-03 -7.140e-05 9.067e-04 2.493e-02 -4.756e-02 1.452e-02
#> norm86 norm93 norm98 norm99 norm101 norm102 norm103
#> -7.205e-04 -1.055e-03 8.831e-05 -4.037e-02 1.150e-01 -8.468e-02 2.160e-02
#> norm107 norm114 norm115 norm119 norm123 norm125 norm127
#> -3.571e-02 2.177e-02 3.457e-02 -5.321e-02 -1.719e-02 1.591e-03 3.704e-03
#> norm128 norm130 norm136 norm138 norm141 norm151 norm153
#> 3.134e-02 3.556e-02 9.427e-04 1.442e-02 -2.504e-03 8.884e-02 -2.197e-04
#> norm154 norm165 norm174 norm175 norm177 norm181 norm183
#> 4.311e-02 3.749e-02 -2.022e-04 -3.112e-02 -1.367e-02 2.664e-02 1.116e-03
#> norm185 norm187 norm189 norm193 norm195 norm198 c
#> -4.094e-03 -6.353e-04 -2.525e-02 3.311e-02 -2.423e-02 9.558e-03 2.396e-03
#> Estimation time: 0.114 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.4421 ; youden_index: 0.4545 ; aYI: 0 ; sensitivity: 0.7879 ; specificity: 0.6667 ; geometric_mean: 0.7247 ; fdr: 0.2571 ; mcc: 0.4587 ; auc: 0.8474 ; aauc: 0 ; corrclass: 0.7333
#> TP: 26 ; TN: 18 ; FP: 9 ; FN: 7 ; gammas:
#> named numeric(0)
#> Estimation time: 0.01395 ; Number of iterations: 6
#>
#>
#>
#> --------------------> experiment n 3 of 5 <----------------------
#> lambda = 0.2466 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.05 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 10 ; Backtraking iters: 642 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5873 ; youden_index: 0.9475 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 77 ; TN: 63 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm7 norm9 norm10 norm12 norm13
#> 0.0027315 -0.0681165 0.0035673 0.0019655 0.0032368 -0.0031931 -0.0004567
#> norm15 norm17 norm19
#> 0.0320978 -0.0325018 0.0040605
#> [ reached 'max' / getOption("max.print") -- omitted 51 entries ]
#> Estimation time: 0.1126 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: 7 ; Backtraking iters: 98 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9483 ; youden_index: 0.9564 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 77 ; TN: 63 ; FP: 0 ; FN: 0 ; gammas:
#> norm_cov6
#> -0.02622
#> Estimation time: 0.008351 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 3 of 5 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.1256 ; youden_index: 0.3395 ; sensitivity: 0.7879 ; fdr: 0.2353 ; mcc: 0.4935 ; auc: 0.8395 ; corrclass: 0.75
#> TP: 26 ; TN: 19 ; FP: 8 ; FN: 7 ; betas:
#> norm1 norm2 norm7 norm9 norm10 norm12 norm13
#> 2.731e-03 -6.812e-02 3.567e-03 1.965e-03 3.237e-03 -3.193e-03 -4.567e-04
#> norm15 norm17 norm19 norm22 norm23 norm26 norm27
#> 3.210e-02 -3.250e-02 4.060e-03 -2.147e-02 -5.028e-03 -1.430e-02 3.300e-03
#> norm29 norm31 norm32 norm36 norm37 norm44 norm51
#> 7.419e-13 -4.923e-03 -3.761e-03 9.469e-04 4.672e-02 -1.827e-02 9.653e-02
#> norm52 norm69 norm74 norm83 norm97 norm98 norm99
#> -1.299e-01 -5.623e-02 3.282e-02 1.343e-03 -5.485e-03 4.880e-02 -1.187e-02
#> norm101 norm102 norm118 norm119 norm120 norm121 norm123
#> 1.180e-01 -1.436e-01 -2.274e-04 -1.178e-02 -3.085e-02 -2.923e-03 -1.985e-04
#> norm127 norm128 norm130 norm131 norm137 norm138 norm139
#> 4.050e-05 5.909e-03 3.386e-03 1.413e-02 -2.115e-03 3.782e-02 -1.509e-02
#> norm142 norm147 norm151 norm152 norm153 norm165 norm172
#> -1.191e-12 -2.488e-03 8.757e-02 -3.761e-02 -4.000e-03 5.360e-02 5.786e-03
#> norm173 norm175 norm176 norm177 norm181 norm182 norm183
#> 1.206e-02 -1.927e-02 -4.577e-03 -6.300e-03 2.943e-02 3.196e-02 2.929e-03
#> norm187 norm195 norm198 norm199 c
#> -2.230e-03 -1.540e-02 7.990e-02 -2.554e-02 7.746e-03
#> Estimation time: 0.1126 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.5018 ; youden_index: 0.4545 ; aYI: 0 ; sensitivity: 0.8182 ; specificity: 0.7407 ; geometric_mean: 0.7785 ; fdr: 0.2059 ; mcc: 0.5611 ; auc: 0.8395 ; aauc: 0 ; corrclass: 0.7833
#> TP: 27 ; TN: 20 ; FP: 7 ; FN: 6 ; gammas:
#> norm_cov6
#> -0.02622
#> Estimation time: 0.008351 ; Number of iterations: 7
#>
#>
#>
#> --------------------> experiment n 4 of 5 <----------------------
#> lambda = 0.2466 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.05 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 10 ; Backtraking iters: 390 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5657 ; youden_index: 0.9428 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; corrclass: 1 ;
#> TP: 77 ; TN: 63 ; FP: 0 ; FN: 0 ; betas:
#> norm1 norm2 norm9 norm16 norm24 norm26 norm48
#> 0.0479984 -0.0876763 0.0007256 0.0463419 0.0003242 -0.0242131 -0.0133671
#> norm49 norm51 norm52
#> -0.0372185 0.0869690 -0.1399564
#> [ reached 'max' / getOption("max.print") -- omitted 36 entries ]
#> Estimation time: 0.04694 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: 246 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9533 ; youden_index: 0.9653 ; aYI: 0 ; sensitivity: 1 ; specificity: 1 ; geometric_mean: 1 ; fdr: 0 ; mcc: 1 ; auc: 1 ; aauc: 0 ; corrclass: 1 ;
#> TP: 77 ; TN: 63 ; FP: 0 ; FN: 0 ; gammas:
#> norm_cov6
#> -0.0578
#> Estimation time: 0.01303 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 4 of 5 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: -0.03568 ; youden_index: 0.2868 ; sensitivity: 0.6061 ; fdr: 0.3333 ; mcc: 0.2345 ; auc: 0.7868 ; corrclass: 0.6167
#> TP: 20 ; TN: 17 ; FP: 10 ; FN: 13 ; betas:
#> norm1 norm2 norm9 norm16 norm24 norm26 norm48
#> 0.0479984 -0.0876763 0.0007256 0.0463419 0.0003242 -0.0242131 -0.0133671
#> norm49 norm51 norm52 norm56 norm61 norm63 norm69
#> -0.0372185 0.0869690 -0.1399564 0.0067318 -0.0041559 -0.0024202 -0.0625882
#> norm74 norm83 norm85 norm86 norm87 norm98 norm101
#> 0.0136098 0.0035640 0.0285944 -0.0330298 0.0378656 0.0104408 0.1044595
#> norm102 norm103 norm106 norm110 norm115 norm117 norm119
#> -0.0792224 0.0002911 -0.0143148 0.0057958 0.0058367 0.0052353 -0.0170890
#> norm122 norm125 norm130 norm138 norm146 norm147 norm148
#> 0.0060861 0.0009403 0.0278000 0.0486870 0.0384082 -0.0312296 -0.0269997
#> norm151 norm152 norm154 norm162 norm165 norm175 norm183
#> 0.1182021 -0.0548668 0.0497725 0.0048017 0.0589766 -0.0075695 0.0406365
#> norm187 norm193 norm198 c
#> -0.0061871 0.0366741 0.0512283 0.0119267
#> Estimation time: 0.04694 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.3562 ; youden_index: 0.3939 ; aYI: 0 ; sensitivity: 0.697 ; specificity: 0.6667 ; geometric_mean: 0.6816 ; fdr: 0.2812 ; mcc: 0.3626 ; auc: 0.7868 ; aauc: 0 ; corrclass: 0.6833
#> TP: 23 ; TN: 18 ; FP: 9 ; FN: 10 ; gammas:
#> norm_cov6
#> -0.0578
#> Estimation time: 0.01303 ; Number of iterations: 10
#>
#>
#>
#> --------------------> experiment n 5 of 5 <----------------------
#> lambda = 0.2466 ; weight: 0.5 ; penalty = SCAD
#> tau = 0.05 ; weight_g: 0.5 ; penalty_g = L12
#> mmAPG converged because the maximum number of iteration has been reached.
#> Final estimation:
#> -> algorithm: Accelerated Proximal Gradient for Nonconvex Programming (APG), the monotone version ;
#> total iters: 10 ; Backtraking iters: 371 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.5658 ; youden_index: 0.9168 ; sensitivity: 0.987 ; specificity: 1 ; geometric_mean: 0.9935 ; fdr: 0 ; mcc: 0.9857 ; auc: 0.9893 ; corrclass: 0.9929 ;
#> TP: 76 ; TN: 63 ; FP: 0 ; FN: 1 ; betas:
#> norm2 norm6 norm9 norm15 norm19 norm22 norm23 norm33
#> -0.079332 0.002081 0.027290 0.040414 0.031785 -0.023809 -0.040929 -0.009593
#> norm34 norm36
#> -0.013201 0.006005
#> [ reached 'max' / getOption("max.print") -- omitted 37 entries ]
#> Estimation time: 0.04693 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: 329 ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.9227 ; youden_index: 0.9406 ; aYI: 0 ; sensitivity: 0.987 ; specificity: 1 ; geometric_mean: 0.9935 ; fdr: 0 ; mcc: 0.9857 ; auc: 0.9893 ; aauc: 0 ; corrclass: 0.9929 ;
#> TP: 76 ; TN: 63 ; FP: 0 ; FN: 1 ; gammas:
#> norm_cov6 norm_cov11
#> -0.02527 0.03989
#> Estimation time: 0.01643 mins
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: pye_KS_proximal_gradient_method ; simulation n. 5 of 5 ; lambda: 0.2466 ; weight: 0.5 ; penalty: SCAD ; pye_KS: 0.2491 ; youden_index: 0.4057 ; sensitivity: 0.8182 ; fdr: 0.1562 ; mcc: 0.6312 ; auc: 0.9057 ; corrclass: 0.8167
#> TP: 27 ; TN: 22 ; FP: 5 ; FN: 6 ; betas:
#> norm2 norm6 norm9 norm15 norm19 norm22 norm23
#> -0.0793315 0.0020809 0.0272903 0.0404143 0.0317853 -0.0238093 -0.0409292
#> norm33 norm34 norm36 norm37 norm48 norm51 norm52
#> -0.0095926 -0.0132011 0.0060052 0.0058873 -0.0202425 0.1273868 -0.1384527
#> norm57 norm71 norm77 norm78 norm86 norm97 norm98
#> -0.0567484 -0.0067368 -0.0050155 0.0072787 -0.0054492 -0.0198922 0.0056159
#> norm101 norm102 norm107 norm115 norm119 norm130 norm132
#> 0.1372271 -0.1412670 -0.0393042 0.0013448 -0.0086922 0.0268503 0.0006286
#> norm139 norm141 norm146 norm147 norm151 norm152 norm154
#> -0.0034125 -0.0069374 0.0148651 -0.0002464 0.1199985 -0.0080255 0.0310053
#> norm155 norm159 norm165 norm170 norm176 norm183 norm187
#> 0.0056062 0.0080413 0.0294141 -0.0104688 -0.0621019 0.0021486 -0.0307610
#> norm191 norm194 norm198 norm200 c
#> -0.0034618 -0.0303048 0.0250773 -0.0029918 -0.0221288
#> Estimation time: 0.04693 ; Number of iterations: 10
#>
#>
#> -> Results on the TEST SET
#> -> algorithm: covYI_KS_proximal_gradient_method ; tau: 0.05 ; weight: 0.5 ; penalty: L12 ; covYI_KS: 0.6327 ; youden_index: 0.5455 ; aYI: 0 ; sensitivity: 0.8182 ; specificity: 0.8889 ; geometric_mean: 0.8528 ; fdr: 0.1 ; mcc: 0.7035 ; auc: 0.9057 ; aauc: 0 ; corrclass: 0.85
#> TP: 27 ; TN: 24 ; FP: 3 ; FN: 6 ; gammas:
#> norm_cov6 norm_cov11
#> -0.02527 0.03989
#> Estimation time: 0.01643 ; Number of iterations: 12
#>
#>
#> Total Simulation Time: 0.43 mins mins.
# 8. View summary of simulation results
colMeans(sim_result$corrclass)
#> train test
#> 0.9971 0.7500
colMeans(sim_result$corrclass_covYI)
#> train test
#> 0.9971 0.7800The 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.