Negative spatial correlation #1248
Replies: 2 comments
-
@j-friedrich Any idea what this would mean? |
Beta Was this translation helpful? Give feedback.
-
@MarziyehPourmousavi sorry your issue slipped through the cracks. I'm going to move this over to discussion because I think it deserves to be a discussion point. The spatial correlation metric is good when it is good 😄 First, let's consider what it is measuring. Caiman extracts the frames when that neuron is active, takes the mean of those frames (in the region around that neuron) (let's call this the active mean). The spatial metric is the correlation coefficient between that mean and the spatial component for that neuron. In a "good" neuron it should be high (there should be a good match between the high activity frames and the spatial components extracted by CNMF/E). Here is the standard diagram for this, adapted from the Caiman paper: Second, what does it mean? When this is high, we have a good match. It can sometimes be very high. This is when I consider it somewhat useful: you can have a low-SNR neuron that is real, and this is verified using this measure. I usually set my threshold at 0.95 or higher. I set it so high partly because I value the SNR (activity-based) evaluation metric so much higher (the spatial metric, when low, just isn't super informative). When the spatial correlation is low I usually take this to mean a couple of things. One, the SNR is not great in that region for that component. Two, it may not be great compared to other overlapping components in that region. While we do remove the activity of other components when calculating the active mean, it is hard to mop up everything. Things could be especially problematic if you have a lot of components that you haven't extracted that are near the guilty component, or if you have run Another more disturbing possibility include motion artifacts, but I'm assuming we have a clean motion-free movie. I focus mainly on very high spatial correlation metrics, and use the SNR evaluation metric as the main filter: SNR seems the most reliable filter IMO. That said, maybe there is information in the large negative correlations, I've never taken the time to look. It could be an indicator that we need to look at the residuals in that region, or tweak our parameters or something. Note I sometimes used the following function to get a sense for how the evaluation metrics on my components compare to my thresholds (it takes in the cnmf object as input):
|
Beta Was this translation helpful? Give feedback.
-
Operating system (Linux/macOS/Windows): macOS
Python version (3.x): 3.10
Working environment (Python IDE/Jupyter Notebook/other): Spyder
Which of the demo scripts you're using for your analysis (if applicable): demo_pipeline
The code works fine. Just to evaluate the results for some neurons, the spatial correlation value is negative from -0.464 to -0.042! What is the problem?
Beta Was this translation helpful? Give feedback.
All reactions