Skip to content
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

More robust kernel sampling #73

Open
alecgunny opened this issue Sep 25, 2023 · 0 comments
Open

More robust kernel sampling #73

alecgunny opened this issue Sep 25, 2023 · 0 comments

Comments

@alecgunny
Copy link
Contributor

Right now, sample_kernels only supports sampling kernels from entirely within the provided timeseries (or batch of multiple timeseries) and has a max_center_offset kwarg that restricts the sampling range wrt the center of the timeseries. However

  • For most timeseries that would want to use this functionality, the end of the timeseries is more interesting, since e.g. for waveforms this is where the coalescence lies (or at least should lie)
  • Even with that in mind, this functionality probably isn't in the purview of sample_kernels at all: if you want to restrict the range of the timeseries that you sample, restrict them (or pad with 0s where necessary) before passing them into sample_kernels, then just let it sample uniformly.

It's probably worth having a KernelSampler class that constructs the necessary index tensors up front, and then drops the max_center_offset functionality. Downstream use cases like #71 and #72 can then do whatever slicing/padding is appropriate for their use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant