Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoothing of dF/F traces for prediction #53

Closed
aloejhb opened this issue Apr 6, 2023 · 2 comments
Closed

Smoothing of dF/F traces for prediction #53

aloejhb opened this issue Apr 6, 2023 · 2 comments
Labels
question Further information is requested

Comments

@aloejhb
Copy link

aloejhb commented Apr 6, 2023

Hi Peter,
thanks for creating this nice tool.
I have a question regarding whether I need to smooth my dF/F traces, before I use them as input to the model for spike inference.
In the README.md, it mentions that the ground-truth traces was slightly smoothed for training the model. Then, for example, if I wanted to use the model Global_EXC_7.5Hz_smoothing200ms, to predict spike prob from my own dF/F traces, do I need to run

smoothed_traces = gaussian_filter(dF_traces, sigma=0.2*7.5)

before I run

spike_prob = cascade.predict( 'Global_EXC_7.5Hz_smoothing200ms', smoothed_traces )

?

Best wishes,
Bo

@PTRRupprecht
Copy link
Member

Hi Bo,

Nice to hear from you!

Yes, the ground truth was smoothed during training. However, the dF/F traces were not smoothed during training of the model. Smoothing the dF/F traces would actually be detrimental to spike inference in two ways: First, smoothing would eliminate some of the information contained in the traces. Second, smoothing would artificially reduce the shot noise level that is automatically estimated from the raw dF/F traces. CASCADE would therefore assume that dF/F traces are mostly noise-free and make wrong estimates.

To conclude: Don't smooth the dF/F traces before running the inference :-)

I've received this same question already a few times. I think I'll add an item to the FAQ list ...

PTRRupprecht added a commit that referenced this issue Apr 6, 2023
Update FAQ, related to issue #53
@PTRRupprecht PTRRupprecht added the question Further information is requested label Apr 6, 2023
@aloejhb
Copy link
Author

aloejhb commented Apr 8, 2023

Hi Peter, thanks a lot for the clear explanation and FAQ update. This means no smoothing of dF/F traces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants