We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ba89fe commit fe020e3Copy full SHA for fe020e3
1 file changed
minisom.py
@@ -245,15 +245,15 @@ def activate(self, x):
245
246
def _gaussian(self, c, sigma):
247
"""Returns a Gaussian centered in c."""
248
- d = 2*pi*sigma*sigma
+ d = 2*sigma*sigma
249
ax = exp(-power(self._xx-self._xx.T[c], 2)/d)
250
ay = exp(-power(self._yy-self._yy.T[c], 2)/d)
251
return (ax * ay).T # the external product gives a matrix
252
253
def _mexican_hat(self, c, sigma):
254
"""Mexican hat centered in c."""
255
p = power(self._xx-self._xx.T[c], 2) + power(self._yy-self._yy.T[c], 2)
256
257
return (exp(-p/d)*(1-2/d*p)).T
258
259
def _bubble(self, c, sigma):
0 commit comments