peterwittek / somoclu

Massively parallel self-organizing maps: accelerate training on multicore CPUs, GPUs, and clusters

Home Page:https://peterwittek.github.io/somoclu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UserWarning: Warning: converting a masked element to nan.

fbenghi opened this issue · comments

Hello Peter,

I train the SOM and when I call view_component_planes(), the figures are completely blank an the console prints the following warnings:

matplotlib\image.py:405: UserWarning: Warning: converting a masked element to nan.
dv = (np.float64(self.norm.vmax) -
matplotlib\image.py:406: UserWarning: Warning: converting a masked element to nan.
np.float64(self.norm.vmin))
matplotlib\image.py:413: UserWarning: Warning: converting a masked element to nan.
a_min = np.float64(newmin)
matplotlib\image.py:418: UserWarning: Warning: converting a masked element to nan.
a_max = np.float64(newmax)
matplotlib\colors.py:916: UserWarning: Warning: converting a masked element to nan.
dtype = np.min_scalar_type(value)
\numpy\ma\core.py:716: UserWarning: Warning: converting a masked element to nan.
data = np.array(a, copy=False, subok=subok)

I followed the Planar Maps example, only changing the original dataset for my own data and even so it doesn't work. My dataset has 268 columns.

When I try to run it with only three columns (as in the example, it worked)

Is there any known issue related to the number of columns?

This should work, but bear in mind that you will have 268 component planes (assuming you mean features by columns).