-
Notifications
You must be signed in to change notification settings - Fork 3
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
Question regarding Ternary operator in clocal_exp_editsim
#23
Comments
This change was intentional. Let me explain why I made this change. |
|
I am still not convinced about this. "match == 0 means there is no neuron that fires in both time windows" --> as I understand it, match is the scalar product between two specific columns of the time windows; so, if this is 0, it might mean there's no match between them (different neurons firing in one and the other) or no activity at all in those two columns (no neuron firing). Maybe we should penalize the first situation, but not the second one. For example if you compare two identical windows of 100 ms with 10 neurons firing, this condition will systematically reduce the edit similarity score for these two identical windows - the reduction will depend on alpha. It is true that for low enough alpha the reduction might not be significant. But this is the main thing that bothers me, that even identical windows with sufficient activity can end up with lower scores, because it is penalizing "holes" or gaps in the profile. Is it a good idea for this penalty to be fixed/always used? Maybe it should be parameterized and applied in function of the data set. |
Thank you for the comment. Yeah, I understand what you mean. We can of course do something like below:
to avoid penalization when there is no spikes in a certain column. |
Thank you for looking into it. I think this solution could be a good compromise for the cases I am worried about (my initial solution was to remove this zero-match penalty completely, but that might be too drastic). Let me test this new code on some of the data I had issues with and get back to you! |
Hi. I checked, and this version of the code does what I was asking for. Still, this modification can significantly change the range of edit similarity values one can obtain on a given dataset, so maybe before committing to it (if you plan to modify the repository) it could be good to have another parameter that chooses this version or the previous one. For reproducibility if nothing else. I was thinking something about like: def clocal_exp_editsim(DBL_C[:, :] mat1, DBL_C[:, :] mat2, DBL_C a = 0.01, zerospikes_penalty = False): same for clocal_exp_editsim_withbp. Please check if this makes sense and feel free to close the issue, I consider it solved. Thank you! |
Thanks @rcojocaru for testing the idea. I agree that we should have an option to enable/disable the modification. |
I got the following question from https://github.com/rcojocaru.
"""
I have a short question about the code. In editsim.py --> clocal_exp_editsim(_withbp) you have this:
Do you remember why you introduced this if clause for the case in which match is 0? I think it can have radical effects on the edit similarity score. For example, even if comparing identical sequences, instead of getting the maximum edit similarity score, the result would be alpha dependent because of this if clause. I would really appreciate your input before modifying core things.
"""
The text was updated successfully, but these errors were encountered: