Commit 43c32a5f authored by davidkep's avatar davidkep

remove ADMM-S from public interface

parent 775cc8f4
#' Options for the ENPY Algorithm
#'
#' @param max_it maximum number of PY iterations.
#' Additional control options for the elastic net Peña-Yohai procedure.
#'
#' The EN-PY procedure for computing initial estimates iteratively cleans the data of observations with possibly
#' outlying residual or high leverage. Least-squares elastic net (LS-EN) estimates are computed on the possibly clean
#' subsets. At each iteration, the Principal Sensitivity Components are computed to remove observations with potentially
#' high leverage. Among all the LS-EN estimates, the estimate with smallest M-scale of the residuals is selected.
#' Observations with largest residual for the selected estimate are removed and the next iteration is started.
#'
#'
#' @param max_it maximum number of EN-PY iterations.
#' @param en_algorithm_opts options for the LS-EN algorithm. See [en_algorithm_options] for details.
#' @param keep_psc_proportion how many observations should be kept based on the Principal Sensitivy Components.
#' @param keep_psc_proportion how many observations should to keep based on the Principal Sensitivity Components.
#' @param keep_residuals_measure how to determine what observations to keep, based on their residuals.
#' If `proportion`, a fixed number of observations is kept, while if `threshold`,
#' only observations with residuals below the threshold are kept.
#' @param keep_residuals_proportion how many observations should be kept based on their residuals.
#' If `proportion`, a fixed number of observations is kept.
#' If `threshold`, only observations with residuals below the threshold are kept.
#' @param keep_residuals_proportion proportion of observations to kept based on their residuals.
#' @param keep_residuals_threshold only observations with (standardized) residuals less than this threshold are kept.
#' @param retain_best_factor only keep candidates that are within this factor of the best candidate. If `<= 1`, only
#' keep candidates from the last iteration.
......@@ -59,58 +68,9 @@ mscale_algorithm_options <- function (max_it = 200, eps = 1e-8) {
}
#' 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.
#' MM-Algorithm to Compute Penalized Elastic Net S-Estimates
#'
#' @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
#' Additional options to control the MM algorithm to compute EN S-estimates.
#'
#' @param max_it maximum number of iterations.
#' @param tightening how to make inner iterations more precise as the algorithm approaches a local minimum.
......
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