SETUP

If you are running the code on macOS:

    conda env create -f SparseRegression_mac_env.yml

For other operating systems:

    conda env create -f SparseRegression_env.yml


RUNNING THE EXPERIMENT

After the environment is created and activated, run the following command:

    python main.py --eps 3 --SGDwReg_eps 2 --SGDwOrigiReg_eps 4 --lambda1 1 --lambda2 2 --lambda3 3

You can change the number after each argument (e.g., $eps, $lambda1, etc.) as needed.

Description of arguments:

--eps: number of epochs for the original SGD.

--SGDwReg_eps: number of epochs for SGD with two explicit regularizers.

--lambda1: strength of the first regularizer (used with SGD with two regularizers).

--lambda2: strength of the second regularizer (used with SGD with two regularizers).

--SGDwOrigiReg_eps: number of epochs for SGD with one explicit regularizer.

--lambda3: strength of the regularizer (used with SGD with one regularizer).


OUTPUT

The code will output the results for the three algorithms. For each algorithm, the average train and test losses are reported, averaged over the last 1000 and 200 iterations to account for the stochasticity of the training process.