1 Star 1 Fork 1

wanghairui-harry / DESOM

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

DESOM: Deep Embedded Self-Organizing Map

This is the official Keras implementation of the Deep Embedded Self-Organizing Map (DESOM) model.

DESOM is an unsupervised learning model that jointly learns representations and the code vectors of a self-organizing map (SOM) in order to survey, cluster and visualize large, high-dimensional datasets. Our model is composed of an autoencoder and a custom SOM layer that are optimized in a joint training procedure, motivated by the idea that the SOM prior could help learning SOM-friendly representations. Its training is fast, end-to-end and requires no pre-training.

When using this code, please cite following work:

Florent Forest, Mustapha Lebbah, Hanene Azzag and Jérôme Lacaille (2019). Deep Embedded SOM: Joint Representation Learning and Self-Organization. In European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN 2019).

Florent Forest, Mustapha Lebbah, Hanene Azzag and Jérôme Lacaille (2019). Deep Architectures for Joint Clustering and Visualization with Self-Organizing Maps. In Workshop on Learning Data Representations for Clustering (LDRC), PAKDD 2019.

(see also http://florentfo.rest/publications)

Quick start

The implementation is divided into several scripts:

  • DESOM.py: main script containing the model (DESOM class)
  • SOM.py: script containing the SOM layer
  • AE.py: script for creating the autoencoder model
  • kerasom.py: a standard SOM in Keras, without the autoencoder part
  • datasets.py: script for loading the datasets benchmarked in the paper (MNIST, Fashion-MNIST, USPS and REUTERS-10k)
  • metrics.py: script containing functions to compute metrics evaluated in the paper (purity and unsupervised clustering accuracy). NMI is already available in scikit-learn.
  • desom_benchmark.py: script to perform benchmark runs of DESOM on 4 datasets and save results in a CSV file

The data directory contains USPS and REUTERS-10k datasets.

The main script has several command-line arguments that are explained with:

$ python3 DESOM.py --help

All arguments have default values, so DESOM training can be simply started doing:

$ python3 DESOM.py

For example, to train DESOM on Fashion-MNIST with a 20x20 map, the command is:

$ python3 DESOM.py --dataset fmnist --map_size 20 20

Training generates several outputs:

  • an image of the DESOM/kerasom map to visualize the prototypes
  • an image of the model architecture
  • folder containing a log of training metrics and the model weights

Behavior is similar for the kerasom model.

For information, one training run on MNIST with 10000 iterations and batch size 256 on a laptop GPU takes around 2 minutes.

A full benchmark of DESOM on the 4 datasets can be started by calling the script desom_benchmark.py. Parameters, number of runs and save directories are specified inside the script. Paper results were obtained using this script and number of runs equal to 10. Similar scripts were used for other compared models (minisom, kerasom and with pre-trained autoencoder weights).

The main dependencies are keras, tensorflow, scikit-learn, numpy, pandas, matplotlib.

空文件

简介

:globe_with_meridians: Deep Embedded Self-Organizing Map: Joint Representation Learning and Self-Organization 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/wanghairui-harry/DESOM.git
git@gitee.com:wanghairui-harry/DESOM.git
wanghairui-harry
DESOM
DESOM
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891