Comments (4)
hi @jiwon-j, SOM is a multivariate model and you can build your input as a matrix where each row corresponds to a year and contains values from all the variables that you have.
These numpy functions can help you reshape your original data:
- https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html
- https://numpy.org/doc/stable/reference/generated/numpy.reshape.html
from minisom.
hi @jiwon-j, SOM is a multivariate model and you can build your input as a matrix where each row corresponds to a year and contains values from all the variables that you have.
These numpy functions can help you reshape your original data:
thank you! i made a combined array, but do the two variables in here have to have the same shape?
Trying to run a SOM and getting broadcast issues
from minisom.
the input matrix needs to have only 2 dimensions, which means that you have to concatenate your data on the appropriate axis.
from minisom.
@jiwon-j I ran into a similar problem and flattening (vectorizing) the input data into a 1D vector is how I got mine to work. Then making your input_len
the length of one sample. You can see the later parts of #187 where show how I do this.
Unless you've found a way around it I would imagine that inputs need to be the same length (minisom requires a square matrix). Imputation may help with this?
Adds quite a bit of dimensionality but MiniSOM is able to handle this sort of data at the cost of dimensionality.
from minisom.
Related Issues (20)
- About how you efficiently calculate the winner and the neighbourhood function. HOT 1
- How can I get reproducible results? HOT 2
- Meaning of the position of winning nodes and distance map HOT 3
- considerations on the hexagonal neighborhood used in `distance_map()` HOT 6
- It seems the next run will be influenced by the former run. Will it be more rational to reset after every run? HOT 4
- Is there a way to create clusters of equal size? HOT 2
- What's the order of the coordinates returned by the winner method? HOT 2
- How to save and load trained model for cluster prediction on new data? HOT 1
- PCA initialization HOT 7
- Adjacent nodes in hexagonal distance do not have distance 1 HOT 2
- Question: Interest in a connectivity matrix? HOT 2
- unexpected problem calling the functions HOT 11
- errors in 'AdvancedVisualization.ipnyb' example HOT 2
- Help with clustering and visualization of neurons HOT 1
- There might be an index error in TimeSeries.ipynb HOT 1
- decay for sigma can be improved HOT 5
- Large Quantization Error with Spatio-Temporal Data? HOT 11
- error in clustering SST data
- Dashboard shows normalized data HOT 1
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 minisom.