# Big data: 3D clustering with over 40 groups

I am a computational neuroscientist and I struggling over a problem; I have around one hundred 3D matrices (I am working on MATLAB at the moment), each of them is 121x145x121. Any 'cell' stores a value between 0 and 1, e.g. Y(90,60,30) = 0.4486. To give you some context all the matrices are MRI scans. Now, I need to cluster these 'cells' into ~48 groups so that all the cells in a cluster are more correlated (Pearson coefficient) with themselves than with the rest of the cells (among all the scans).

I can try to give you an example with 2D matrices:

$A =\begin{bmatrix} 0& 0& 0\\ 0& 1 &1\\ 0 &0 &0\end{bmatrix},\quad\quad$ $B =\begin{bmatrix} 0 &0& 0\\ 0 &2 &2\\ 0 &0& 0\end{bmatrix},\quad\quad$$C =\begin{bmatrix} 0& 0& 0\\ 0 &3& 3\\ 0 &0& 0 \end{bmatrix}. In this case with 2 clusters I will have something like: C_1 =\begin{bmatrix} 1& 1& 1\\ 1 &0& 0\\ 1& 1& 1 \end{bmatrix},\quad\quad$$ C_2 =\begin{bmatrix} 0 &0& 0\\ 0& 1& 1\\ 0& 0& 0\end{bmatrix}.$

Of course here the real problem is the huge amount of data to be processed. All the algorithm I tried failed. Maybe you can help me to look at the problem from a different point of view.

-