Disentanglement method for [Deep Continous Clustering]
Based on the papers Deep Continuous Clustering (code) and Two-Step Disentanglement for Financial Data
The commands used to run the project on MNIST dataset are:
$ python make_data.py
$ python pretraining.py --data mnist --tensorboard --id 1 --lr 1
$ python extract_feature.py --data mnist --net checkpoint_4.pth.tar --features pretrained
$ python edgeConstruction.py --dataset mnist/pretrained.pkl --samples 70000
$ python copyGraph.py --data mnist --graph pretrained.mat --features pretrained.pkl --out pretrained
$ python DCC.py --data mnist --net-pretraining checkpoint_4.pth.tar --tensorboard --id 1 --step 1
$ python pretraining.py --data mnist --tensorboard --id 1 --lr 1 --fake --niter 0
$ python extract_feature.py --data mnist --net checkpoint_4.pth.tar.fake --features pretrained-fake
$ python edgeConstruction.py --dataset mnist/pretrained-fake.pkl --samples 70000
$ python copyGraph.py --data mnist --graph pretrained-fake.mat --features pretrained-fake.pkl --out pretrained-fake
$ python DCC.py --data mnist --net-pretraining checkpoint_4.pth.tar --net FTcheckpoint_500.pth.tar --tensorboard --id 1 --step 2 --M 5
where FTcheckpoint_500.pth.tar should be replaced with the last checkpoint of step 1
The outputs of the project are:
- The file features_s.mat that was generated by the sixth command (DCC step 1) contains the cluster assignment calculated by the algorithm
- The last checkpoint of step 2 (that was created by the last command) contains the states of the neural nets trained by the algorithm, which can be used for further manipulation (such as swapping)