jolars / slopecd

4 stars 2 forks source link

Coordinate Descent for SLOPE

This repository provides code to reproduce the experiments for the academic research paper Coordinate Descent for SLOPE.

This repository contains the following items:

Installation

First make sure that you have conda available on your computer. Installation instructions are available here.

Then, start by creating a conda environment within which the benchmarks should be run. Here, we also install two R packages that were used in one of the experiments.

conda create -n slopecd -c conda-forge -y \
  python=3.9 r=4.2 r-slope=0.4 r-glmnet=4.1
conda activate slopecd
pip install benchopt

After this, make sure that you have navigated to the root folder of the extracted archive. Then run

pip install code/

to install the python module slope.

Finally, to install the benchopt benchmark, run

benchopt install -y benchmark_slope/

Running the Experiments

Some experiments are available in code/expes and can be run simply by calling python expes/<experiment>, or Rscript expes/<experiment> where <experiment> is the name of one of the python or R files in the folder.

To re-run the main benchmarks from the paper, modify benchmark_slope/config.yml to include or exclude objectives, solvers, and datasets by commenting or uncommenting them. Then call

benchopt run benchmark_slope/ --config benchmark_slope/config.yml

to run the benchmark.

Results

The results used in the paper are stored in the code/results folder.

Figures

The figures can be re-created by calling the python scripts in code/scripts/figures.