I am trying to use SOM to learn 80000X10 samples (each sample is a vector of size 10). But I can’t even configure 8×8 net with 10000X1 samples. It throws “out of memory” error.
Here is my code (data is 80000X10 matrix):
net=selforgmap([8 8])
net=configure(net,data(1:10000,1))
Matlab help: “Unconfigured networks are automatically configured and initialized the first time train is called.”
Even for 8000X1 dataset, it takes a lot of time. I noticed a huge numWeightElements: 512000 in net variable (8*8*8000=512000). The weights should be 8*8. SOM training algorithm shouldn’t use this much memory. What is wrong?
The output of memory command:
>> memory
Maximum possible array: 3014 MB (3.160e+009 bytes)
Memory available for all arrays: 3014 MB (3.160e+009 bytes)
Memory used by MATLAB: 1154 MB (1.210e+009 bytes)
Physical Memory (RAM): 4040 MB (4.236e+009 bytes)
I think your configuring wrong the input structure. Each input vector must be a column and not a row. Quote from this “Clustering Data – MATLAB & Simulink“
As you can see each input vector is a column. You have 10 two element input vectors as a 2×10 array.