Introduction

SOM.jl - Kohonen's self-organising maps for Julia

The package provides training and visualisation functions for Kohonen's self-organising maps for Julia. Training functions are implemented in pure Julia, without calling external libraries. Visualisation is implemented by using Python's Matplotlib.

Self-organising maps

Self-organising maps (also referred to as SOMs or Kohonen maps) are artificial neural networks introduced by Teuvo Kohonen in the 1980s. Despite of their age, SOMs are still widely used as an easy and robust unsupervised learning technique for analysis and visualisation of high-dimensional data.

The SOM algorithm maps high-dimensional vectors into a lower-dimensional grid. Most often the target grid is two-dimensional, resulting into intuitively interpretable maps.

For more details see Kohonen's papers, such as

Technical details and background can be found in Kohonen's still relevant technical report:

Installation

For installation please refer to the README @github: https://github.com/andreasdominik/SOM.jl

Matplotlib issues

Common installation problems arise from a known incompatibility between Matplotlib and Julia. The issue seems to be less common for Julia versions v0.7 or later. However, if the error message contains a line comparable to:

...
importError("/lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_*.*.*' not found
...

then most probably Matplotlib fails to find a required library.

A first attempt could be to reinstall Matplotlib into the Python environment of Julia via:

ENV["PYTHON"]=""
Pkg.add("Conda")
using Conda
Conda.update()

Conda.add("matplotlib")
Pkg.add("PyCall")
Pkg.build("PyCall")
Pkg.add("PyPlot");

A second solution (or second step) is to tell Matplotlib the path to the correct library, which is provided by Conda. Temporarily this can be achieved by starting Julia as

export LD_LIBRARY_PATH=$HOME/.julia/v0.6/Conda/deps/usr/lib; julia

with the path replaced by the location of the missing library file. To specify the path permanently, the following line can be added to the file .bashrc in the home directory:

LD_LIBRARY_PATH="$HOME/.julia/v0.6/Conda/deps/usr/lib:$LD_LIBRARY_PATH"

For training of self-organising maps issues with Matplotlib installation can be ignored; the SOMs will work without Matplotlib. However, Matplotlib visualisations cannot be plotted without Matplotlib.

Quick Start

API

Index