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
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:
multichannel support requires densely encoded (boolean) outputs to indicate detections to avoid ragged output
backtracking entails matching each detection to the nearest preceding local minimum
matching is done efficiently using our event matching function. This only supports sparsely encoded events
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:
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.
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: