Using K Means clustering to identify coactivation of neurons

3 views (last 30 days)
Hi, I want to identify clusters of brain cells (cells firing in synchrony) in a data set of 15989x36 (15989 frames of video for 36 cells). The matrix consists only of 1s and 0s, being 1 where a cell has activated and 0 everywhere else. My problem lies in how to display these clusters, since their spatial positions are stored in a completely different matrix than their activation spikes.
  1 Comment
Martin Mandelbaum
Martin Mandelbaum on 6 Apr 2021
I'm aware that K Means is not an ideal method of doing this. I'm just looking to provide a comparison against a better and more specific algorithm.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 6 Apr 2021
"My problem lies in how to display these clusters" <=== use plot3() or scatter3().
  8 Comments
Image Analyst
Image Analyst on 7 Apr 2021
What do the different columns of binary represent?
But then if your data is x, y, time, shouldn't you only pass in the third column into the kmeans()? Why are you having it cluster off of combination of spatial coordinates and time?
Martin Mandelbaum
Martin Mandelbaum on 7 Apr 2021
Each column is a specific cell, so binary(1,1) represents the state of cell 1 at frame 1, either active and spiking (1) or inactive (0). Binary(1,2) is the second frame of activity for the same cell, and so on.
The matrix 'positions' is only there for visualization purposes, and could be removed from this problem. The location of each cell is somewhat irrelevant. What I do wish to know, is which cells are active at the same time, e.g: if at row 1, cells 1,2 and 3 are all 1, and that behaviour is repeated for many different rows, then we could conclude that cells 1,2 and 3 are a cluster.
Rather than the visualization example I provided, a list of cells present for each cluster would be enough. So I would like to get as an output something like a list of vectors, where each vector contains a list of numbers, 1through 36, indicating which cells form each cluster.
I realize that this is different from the typical implementation of K Means, but I believe that it could be applied in this specific scenario.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!