This repository is the official implementation of "Regularized linear autoencoders recover the principal components, eventually".
Create a new conda environment:
conda create -n linear-autoencoders python=3.7
source activate linear-autoencoders
Install requirements:
pip install -r requirements.txt
We recommend using Weights & Biases (wandb
) for training and keeping track of results.
In sweeps/sweep.sh
,
- Set
PYTHONPATH
to be the root path of this repository. - Find your
wandb
API key in settings, and paste it afterwandb login
. - Enter your
wandb
username. You can find your username in the "profile" page under your name.
First, create a wandb sweep with the following command
wandb sweep sweeps/mnist.yaml
This should generate a sweep ID. Copy it and paste in sweeps/sweep.sh
. You can now run the sweep agents.
bash sweeps/sweep.sh
You can run multiple of the above command in parallel. Check your results here.
Similar to the MNIST experiment, first create a wandb sweep.
wandb sweep sweeps/synth.yaml
This should generate a sweep ID. Copy it and paste in sweeps/sweep.sh
. You can now run the sweep agents.
bash sweeps/sweep.sh
You can run multiple of the above command in parallel. Check your results here.
Experiment data can be retrieved through the wandb API. The following plots in the paper are generated from the experiment data.