Comments (4)
Thanks it still showed the same error but normalizing did the job. Thanks!
from simpsom.
Hello @Inder95,
It seems that when checking for the closest node to your input datapoints no distance passes the following if
condition.
minVal=np.iinfo(np.int).max
for node in self.nodeList:
dist=node.get_distance(vec)
if dist < minVal:
minVal=dist
bmu=node
return bmu
Is your data range very wide? It may be that the initial distances surpass the limit of minVal
.
I increased the reference value to the machine limits for float. This should do the trick.
Alternatively, you can normalize your data to reduce the variance.
Try installing and running the last version (1.3.4) form here on github and see if it works now.
from simpsom.
happened also to me
import SimpSOM as sps
net = sps.somNet(20, 20, cleanDataSet, PBC=True)
net.train(0.01, 100000)
**/usr/local/lib/python3.6/dist-packages/SimpSOM/__init__.py in find_bmu(self, vec)
UnboundLocalError: local variable 'bmu' referenced before assignmen**
How can I solve it?
my Data is after StandardScaler (data between -1 to 1 )
from simpsom.
Found sorry, the issue was with nan in the data
from simpsom.
Related Issues (20)
- how to load weight.npy file to predict? HOT 1
- Labels HOT 9
- Predicting winning cell for data? HOT 2
- Cannot locate raw_data or any detailed API. HOT 4
- Parallelization of the code HOT 2
- Nodes difference MNIST HOT 1
- Node's coordinates in the SOM HOT 3
- pip version doesn't have colnames parameter in nodes_graph HOT 1
- Module Not Found error during import HOT 2
- net.project() function is slow HOT 5
- PyPi not using latest changes HOT 2
- Bug in learning rate? HOT 2
- Cloning of repository fails due to too long filenames. HOT 2
- MemoryError HOT 2
- problem due cyclical error? HOT 3
- I think that when updating weights, should not target all nodes. HOT 2
- How to reference this package HOT 1
- a little error happened on densitypeak.py HOT 3
- Time complexity HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpsom.