Pregunta

I am trying to use SOM to learn 80000X10 samples (each sample is a vector of size 10). But I can't even configure 8x8 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)
¿Fue útil?

Solución

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"

To define a clustering problem, simply arrange Q input vectors to be clustered as columns in an input matrix (see "Data Structures" for a detailed description of data formatting for static and time series data). For instance, you might want to cluster this set of 10 two-element vectors:

inputs = [7 0 6 2 6 5 6 1 0 1; 6 2 5 0 7 5 5 1 2 2]

As you can see each input vector is a column. You have 10 two element input vectors as a 2x10 array.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top