dac
dac copied to clipboard
Deep amortized clustering
DAC
Pytorch implementation of the paper Towards deep amortized clustering
Requirements
Python >= 3.5.0
torch >= 1.3.0
torchvision >= 0.5.0
tqdm
wget
sklearn
Usage
Setup
- Install required packages
pip install -r requirements.txt
- First modify
ROOTvariable inutils/paths.pyto your working directory.
Mixture of Gaussians
- Training
python -m scripts.run \
--model models/mog.py \
--loss_type (min or anc) \
--run_name (your experiment id) \
--gpu (gpu number to work with)
- Test clustering on benchmark datasets
python -m scripst.test_cluster \
--model models/mog.py \
--loss_type (min or anc) \
--run_name (your experiment id) \
--gpu (gpu number to work with)
- Visualizing clustering
python -m scripts.vis_cluster \
--model models/mog.py \
--loss_type (min or anc) \
--run_name (your experiment id) \
--gpu (gpu number to work with) \
--vB (number of datasets) \
--vN (max number of points per dataset) \
--vK (max number of clusters per dataset)
For mixture of warped Gaussians
- Same as above, but change
--modelargument tomodels/warped.py.