You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eventually test_cv values for these 2 cells are all -Inf.
L329 of GLM_fit_tools.py gets around this by fit['avg_L2_regularization'] = np.mean([fit['L2_grid'][x] for x in np.argmax(test_cv,1)])
where np.argmax returns 0 and lambda is set to L2_grid[0].
Is this intended?
I think it should be either nan'ed for splits with 0 trace or the cell should be removed from the analysis.
The text was updated successfully, but these errors were encountered:
For oeid = 1050725735,
31/123 cells have the same problem.
Note: GLM from this experiment performed the least among Slc17a7-Cre VISp Novel (active) experiments
Yes, this seems like a mistake. When evaluating the models I check for splits with all 0s in the trace. I apparently do not when determining the L2 parameter. Note that the analysis is all done on "optimize_by_session" so we take the average L2 value across all the cells in the session. The result of this mistake is that the L2 value is sometimes smaller, because the cells with 0 traces in the CV splits will have "L2_grid[0]" as their best fitting L2 value. However since we average across cells its probably a small effect.
There is an edge case where -Inf values are returned during L2 regularization process.
This happens when fit_trace_test values are all 0 for certain cells, for certain split.
e.g. oeid = 879331157
Eventually test_cv values for these 2 cells are all -Inf.
L329 of GLM_fit_tools.py gets around this by
fit['avg_L2_regularization'] = np.mean([fit['L2_grid'][x] for x in np.argmax(test_cv,1)])
where np.argmax returns 0 and lambda is set to L2_grid[0].
Is this intended?
I think it should be either nan'ed for splits with 0 trace or the cell should be removed from the analysis.
The text was updated successfully, but these errors were encountered: