binary_program_method_options: Options For Use With the Binary Program Method

View source: R/options.R

binary_program_method_optionsR Documentation

Options For Use With the Binary Program Method

Description

Options For Use With the Binary Program Method

Usage

binary_program_method_options(
  maxit = 500L,
  infimum.maxit = 100L,
  transport.method = transport_options(),
  epsilon = 0.05,
  OTmaxit = 100L,
  model.size = NULL,
  nvars = NULL,
  tol = 1e-07,
  display.progress = FALSE,
  parallel = NULL,
  solver.options = NULL
)

Arguments

maxit

The maximum iterations for the optimizer. Default is 500.

infimum.maxit

Maximum iterations to alternate binary program and Wasserstein distance calculations

transport.method

Method for Wasserstein distance calculation. Should be one the outputs of transport_options()

epsilon

A value > 0 for the penalty parameter of if using the Sinkhorn method

OTmaxit

The number of iterations to run the Wasserstein distance solvers.

model.size

What is the maximum number of coefficients to have in the final model. Default is NULL. If NULL, will find models from the minimum size, 0, to the number of columns in X.

nvars

The number of variables to explore. Should be an integer vector of model sizes. Default is NULL which will explore all models from 1 to model.size.

tol

The tolerance for convergence

display.progress

Logical. Should intermediate progress be displayed? TRUE or FALSE. Default is FALSE.

parallel

A cluster backend to be used by foreach::foreach(). See foreach::foreach() for details about how to set them up. The WpProj functions will register the cluster with the doParallel::registerDoParallel() function internally.

solver.options

Options to be passed on to the solver. See details

Details

This function will setup the default arguments used by the binary program method. Of note, for the argument solver.options, If using the "lasso" solver, you should provide arguments such as "penalty", "nlambda", "lambda.min.ratio", "gamma", and "lambda" in a list. A simple way to do this is to feed the output of the L1_method_options() function to the argument solver.options. This will tell the approximate solver, which uses a lasso method that then will project the parameters back to the \{0,1\} space. For the other solvers, you can see the options in the ECOS solver package, ECOSolveR::ecos.control(), and the options for the mosek solver, Rmosek::mosek().

Value

A list with names corresponding to each argument above.

See Also

WpProj()

Examples

binary_program_method_options()
# is using the lasso solver for the binary program method to give an approximate solution
binary_program_method_options(solver.options = L1_method_options(nlambda = 50L))

WpProj documentation built on May 29, 2024, 7:55 a.m.