Skip to content

Clustering a manifold of the encoded space of an autoencoder (ML 2022 project)

Notifications You must be signed in to change notification settings

lusergit/manifold_clustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Clustering of manifold

The following project is based on the model proposed by n2d. We'll use the pytorch library in order to build an autoencoder and train it, take the data encoded in its encoded space and shape it on a manifold to better cluster it with a shallow cluster method, in order to boost the performance of the shallow clustering.

The corresponding colab notebook can be found here

Project init

To init the project you can either create a conda environment (recomended, since this way the python version is controlled) with

conda create --name torch python=3.8
conda activate torch
pip install -r requirements.txt

for better performances is also recomended to install MulticoreTSNE trough

pip install git+https://github.com/jorvis/Multicore-TSNE

but the project should also work (just a bit slowly) with the TSNE manifold include in the sklearn library (included in the requirements.txt)

Run the script

Once the libraries are loaded to run the script one can just

python manifold_clustering.py [OPTIONS]

where options can be

  • --load PATH to load the weights of the autoencoder on the desired path
  • --save PATH to save the weights of the next training session on the specified path
  • --no_shallow to not run the shallow algorithms to produce the baseline
  • --no_umap to not run the umap manifold clustering
  • --no_tsne to not run the t-SNE manifold clustering
  • --no_isomap to not run the isomap manifold clustering

The script will run, printing what it's doing at each step

About

Clustering a manifold of the encoded space of an autoencoder (ML 2022 project)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages