-
Notifications
You must be signed in to change notification settings - Fork 930
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
Dense event matching #1815
Labels
enhancement
Does this improve existing functionality?
functionality
Does this add new functionality?
Comments
bmcfee
added
enhancement
Does this improve existing functionality?
functionality
Does this add new functionality?
labels
Mar 2, 2024
I gave this a bit more thought, and I'm actually not sure that a direct implementation (ie linear search) would have any benefit over the alternative that would convert dense (booleans) to sparse (indices) and use searchsorted. So I'm leaning toward just doing the latter. Since this is a pretty niche use case, I think we can just build it directly into the backtracking function and not lift it up to the main API. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Does this improve existing functionality?
functionality
Does this add new functionality?
Is your feature request related to a problem? Please describe.
In implementing #1766, i ran into a snag when trying to extend onset backtracking to support multichannel inputs. The problem is as follows:
Describe the solution you'd like
It should be possible to implement an efficient matching algorithm for boolean inputs. Probably the way to do it is to convert the target events to a sparse representation and then use searchsorted, but we shouldn't need to do this explicitly with the source events.
Describe alternatives you've considered
We could hack the onset backtracking code to wrap everything in a dense -sparse-dense conversion, and vectorize accordingly so that it behaves transparently. This might not be as efficient as a direct implementation, but it would work.
The text was updated successfully, but these errors were encountered: