-
Notifications
You must be signed in to change notification settings - Fork 8
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
How to deal with high baseline firing rates #243
Comments
Hi Luigi, first of all, thanks for this issue, really appreciate all the details provided. I am looking into it now; The initialization was meant to find a numerical inverse of the link function. For exp, we know it is log, but since we allow to pass any arbitrary non-linearity I wanted a more general approach; I had that issue already, and I thought I'd fixed it using scipy root finding to get the inverse, which was stable enough on my tests. |
@vigji I probably won't be able to merge this in by this week because we are under a deadline, but I created a branch that fixes the issue by:
If you want to test it out, try this branch. If you want to check the numerical inversion on the real data too, pass as a link function Let me know, |
Awesome, thanks! I will try out the branch. |
Yup, this fixed the issue for me! thanks! |
Sounds good!
…On Mon, Oct 21, 2024, 5:08 AM Luigi Petrucco ***@***.***> wrote:
Yup, this fixed the issue for me! thanks!
I'll keep the issue for ref until the branch gets merged if that is ok
—
Reply to this email directly, view it on GitHub
<#243 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2MOSZXDQZ64ZUF3Q6BV2TZ4TACNAVCNFSM6AAAAABPQC53H6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRWGA3TCNJSGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@vigji I merged the solution into development, it will be fixed in the next release, I'll still leave this open until then. |
Describe the bug
Not sure whether this is a bug, or I am just being stupid with my fitting. Note: not a big expert of LNP model fitting, those are my first attempt!
I encountered this issue when trying to fit some neurons that had high (around 10-20 spk/s) firing rate.
I consistently encounter this error:
I do not understand what the initialisation method is doing, I would have expected intercepts to just be the log(firing_rates) from the documentation. Before keep looking at my data, I tried to reproduce the issue with the examples.
To Reproduce
This is a combination that recapitulate my issue. Code slightly adapted from the examples:
Expected behavior
(I do not understand why the model would not fit, and I do not know what a suitable initialisation would be.)
Edit: the initialisation described in the docs - log(avg_firing) - actually works, I do not understand why it is not the default one actually implemented!
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
nemos==0.1.6
The text was updated successfully, but these errors were encountered: