SoftwareSolverWe provide Matlab and R scripts for solving the SLOPE formulation:
Unpacking with create a directory called ‘SLOPE_code’ in the current directory. Both version of the solver depend on a C code for the fast prox evaluation, and the suitable interface to this C code must be compiled prior to use. In Matlab this is done by running the makemex script from the Matlab command line; for R the interface (cproxSortedL1.so) can be compiled from a terminal window by typing the following command in the SLOPE_code directory: R CMD SHLIB cproxSortedL1.c proxSortedL1.c Examples of the use of the solvers are found in testAdlas.m and testAdlas.R. More detailed information can be found in the README file included with the source code. TFOCS ImplementationSLOPE is also included in TFOCS. When used with default options the following command can be used: beta = solver_SLOPE( X, y, lambda); For more control it is possible to instantiate the prox function and call the general TFOCS solver using prox = prox_Sl1(lambda); beta = tfocs( smooth_quad, { X, y }, prox, beta0, opts ); Figures and tablesThe scripts for Figures 1–9 were written in R and are available here:
Plots are generated using the scripts in the R directory. The input data required for these scripts are generated by the Matlab scripts in the scripts directory, and are stored in the data directory. The setup.m script helps set up all required paths for Matlab, except for the SLOPE solver itself, which should be added manually. Code for the generation of the remaining figures and tables can be found here:
All of these figures and tables are generated from Matlab and are made available through the generateFigure and generateTable scripts in the FiguresAndTables directory. In order to run them, make sure to first run setup from the same directory. Once that is done, simply type generateFigure(12) to generate Figure 12 from the paper, for example. The source package comes with precomputed results. Any of these can be deleted and regenerated when needed (note that regeneration can take a considerable amount of time). For this to work, also make sure to add the SLOPE solver to the search path. In addition the Spot linearoperator toolbox needs to be available. References
