Commit 8ce72dcb authored by davidkep's avatar davidkep

add ADMM-S options

parent 43c32a5f
......@@ -67,6 +67,55 @@ mscale_algorithm_options <- function (max_it = 200, eps = 1e-8) {
return(mscale_opts)
}
#' Control the Algorithm to Compute Penalized Elastic Net S-Estimates
#'
#' The package provides different algorithms to compute the PENSE estimate.
#' To select a specific algorithm and set its parameters, use any of the `pense_***_options` functions.
#'
#' * [pense_admm_options]: Select the ADMM algorithm.
#' * [pense_mm_options]: Select the MM-algorithm.
#'
#' @name pense_algorithm_options
NULL
#' Options for the S-Estimate Algorithm
#'
#' @param max_it maximum number of iterations.
#' @param tau step size for the algorithm.
#' @param prox_eps numerical tolerance for computing the proximal operator of the S-loss.
#' @param prox_max_it maximum number of iterations for computing the proximal operator of the S-loss.
#' @param prox_oscillate_window moving average size to determine oscillation for computing the proximal operator of the
#' S-loss.
#' @param prox_minimum_step_size minimum step size for computing the proximal operator of the S-loss.
#' @param prox_wolfe_c1 constant to check the first Wolfe condition for computing the proximal operator of the
#' S-loss.
#' @param prox_wolfe_c2 constant to check the second Wolfe condition for computing the proximal operator of the
#' S-loss.
#' @param step_size_adj multiplicative factor to decrease the step size if Wolfe's conditions are not satisfied
#' when computing the proximal operator of the S-loss.
#' @param prox_max_small_steps maximum number of consecutive small steps when computing the proximal operator of the
#' S-loss. After this many steps with minimal step size, a large step is performed to
#' escape the current neighborhood.
#'
#' @return options for the S-Estimate algorithm.
#' @export
pense_admm_options <- function (max_it = 5000, tau, prox_eps = 1e-8, prox_max_it = 200,
prox_oscillate_window = 4, prox_minimum_step_size = 0.01, prox_wolfe_c1 = 1e-4,
prox_wolfe_c2 = 0.9, prox_step_size_adj = 0.9, prox_max_small_steps = 10) {
list(algorithm = 'admm',
max_it = .as(max_it[[1L]], 'integer'),
prox_opts = list(
eps = .as(prox_eps[[1L]], 'numeric'),
max_it = .as(max_it[[1L]], 'integer'),
tau = if (missing(tau) || is.null(tau)) { -1 } else { .as(tau[[1L]], 'numeric') },
oscillate_window = .as(prox_oscillate_window[[1L]], 'integer'),
minimum_step_size = .as(prox_minimum_step_size[[1L]], 'numeric'),
wolfe_ss_c1 = .as(prox_wolfe_c1[[1L]], 'numeric'),
wolfe_ss_c2 = .as(prox_wolfe_c2[[1L]], 'numeric'),
ss_adjustment = .as(prox_step_size_adj[[1L]], 'numeric'),
max_minimum_step_size_steps = .as(prox_max_small_steps[[1]], 'integer')
))
}
#' MM-Algorithm to Compute Penalized Elastic Net S-Estimates
#'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment