One of the first questions I got after the presentation on resample at PyHEP was about parallelization.
In principle, resampling methods are perfectly parallelizable, assuming that fn is pure (has no side-effects). That is generally a reasonable assumption. In Python, there are many ways to parallelize, you may want to parallelize on your own cores, or on some cluster of computers, or on the cloud. Therefore, offering direct access to resample is good, because it allows the user to user to chose their parallelization scheme.
For the simple common cases, however, we may want to offer a threads option to our methods, which compute fn on the replicas using threads number of threads on the current computer, to better utilize common multi-core processors. This would an option for the functions bootstrap and jackknife and those that build on them, e.g. bias and variance etc. @dsaxton What do you think?
One of the first questions I got after the presentation on resample at PyHEP was about parallelization.
In principle, resampling methods are perfectly parallelizable, assuming that
fnis pure (has no side-effects). That is generally a reasonable assumption. In Python, there are many ways to parallelize, you may want to parallelize on your own cores, or on some cluster of computers, or on the cloud. Therefore, offering direct access toresampleis good, because it allows the user to user to chose their parallelization scheme.For the simple common cases, however, we may want to offer a
threadsoption to our methods, which computefnon the replicas usingthreadsnumber of threads on the current computer, to better utilize common multi-core processors. This would an option for the functionsbootstrapandjackknifeand those that build on them, e.g.biasandvarianceetc. @dsaxton What do you think?