peterwittek / somoclu

Massively parallel self-organizing maps: accelerate training on multicore CPUs, GPUs, and clusters
https://peterwittek.github.io/somoclu/
MIT License
268 stars 70 forks source link

How to use view_similarity_matrix? #107

Closed rohitgavval closed 6 years ago

rohitgavval commented 6 years ago

After training a SOM, I tried to call the view_similarity_matrix function (without any parameters and also providing the input data as the argument to data. It returns the following error: TypeError: object of type 'NoneType' has no len()

It is not clear what data needs to be passed to the data parameter. Could you clarify this and if possible, provide a reference which explains how to interpret the similarity matrix visualization? Is it supposed to generate something like this? image

peterwittek commented 6 years ago

This is an API regression in seaborn, in fact, the documentation of the current version of seaborn is also incorrect. Somoclu is innocent. Commit 0346b4ed59ce46060d2f6c8eb1c1623ae3353668 fixes the problem.

The plot you are seeing is not the similarity matrix, but the U-matrix of a hexagonal SOM.