Non-random subsample

Hi,
Thanks a lot for all your hard work on this awesome package!

I had a question about subsampling via plates in NumPyro - I can’t seem to see a way to get non-randomised subsamples - e.g.,

with plate("data", len(data), subsample_size=100) as ind:
    batch = data[ind]

returns random indices in ind. I’m working with timeseries so I’d like to keep the batch together. I notice that Pyro’s implementation has a subsample option to which you can pass custom subsampling.

class plate(name, size=None, subsample_size=None, subsample=None, dim=None, use_cuda=None, device=None)

I am happy to have a look at the Pyro implementation and have a go at changing NumPyro to achieve the same functionality if that’s of interest to others/a good way forward (hopefully I am not missing anything!).

2 Likes

We’re definitely interested in this functionality!

Yes, this would be a cool feature. Could you make a github issue in advance of the PR?

Okay no worries, I will take a look and open an issue in github this week!

Are there any updates on this project? I would also be interested in such functionality :slight_smile: