Orange Forum • View topic - module orngSOM

module orngSOM

A place to ask questions about methods in Orange and how they are used and other general support.

module orngSOM

Postby Christian » Fri Nov 14, 2008 22:50

Hi,

I am new to Orange, and I am interested in its implementation of SOMs. I keep seeing references to a module orngSOM in the documentation, but when I try to import it on the latest version (1.02b), it seems to not be available.

Thanks,

Christian

Postby Ales » Tue Jan 20, 2009 12:27

Sory for the long wait.
The orngSOM module was removed from the 1.x versions, but it's reimplementation is currently present in the daily Qt4 snapshots.

Postby piecurus » Wed Nov 11, 2009 14:02

Hi,
there's a problem with random initialization in SOM.
I paste here what I get. The error is not present with linear initialization.

In [1]: import orange

In [2]: import orngSOM

In [3]: som = orngSOM.SOMLearner(map_shape=(10, 20), initialize=orngSOM.InitializeRandom)

In [4]: map = som(orange.ExampleTable("iris.tab"))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/home/piero/tmp/<ipython console> in <module>()

/usr/lib/python2.6/dist-packages/orange/orngSOM.py in __call__(self, examples, weightID, progressCallback)
323 map.initialize_map_linear(data)
324 else:
--> 325 map.initialize_map_random(data)
326 map = Solver(batch_train=self.batch_train, eps=self.eps, neighbourhood=self.neighbourhood,
327 radius_ini=self.radius_ini, radius_fin=self.radius_fin, learning_rate=self.learning_rate,

/usr/lib/python2.6/dist-packages/orange/orngSOM.py in initialize_map_random(self, data, dimension)
88 either training data or dimension of the data
89 """
---> 90 if data != None:
91 min, max = ma.min(data, 0), ma.max(data, 0);
92 dimension = data.shape[1]

/usr/lib/python2.6/dist-packages/numpy/ma/core.pyc in __ne__(self, other)
3124 omask = getattr(other, '_mask', nomask)
3125 if omask is nomask:
-> 3126 check = ndarray.__ne__(self.filled(0), other).view(type(self))
3127 check._mask = self._mask
3128 else:

AttributeError: 'bool' object has no attribute 'view'

Postby Ales » Thu Nov 19, 2009 12:07

Can you update from svn. I think it should work now.

Postby piecurus » Sun Dec 27, 2009 13:47

it seems that now it's working...thanks..


Return to Questions & Support



cron