icecube / pisa

Monte Carlo-based data analysis
http://icecube.github.io/pisa/
Apache License 2.0
19 stars 47 forks source link

Make KDE bootstrap reproducible #700

Closed atrettin closed 2 years ago

atrettin commented 2 years ago

This PR makes the KDE bootstrapping that we use to estimate MC errors on KDE'd histograms reproducible. Since the kde module didn't support setting seeds, I had to "in-source" the bootstrapping into the KDE stage itself to do this. I also added unit tests to ensure that the histograms with errors will give the same result with the same seed and different results with different seeds.

philippeller commented 2 years ago

Only thing I would suggest to change, is not setting a default seed fixed to 0, but None such that by default it is random as expected. Only when you explicitly provide a seed it becomes fixed

atrettin commented 2 years ago

Only thing I would suggest to change, is not setting a default seed fixed to 0, but None such that by default it is random as expected. Only when you explicitly provide a seed it becomes fixed

Okay, done! I also forgot that the numeric inputs that we get when parsing a pipeline config from a text file come in as strings that have to be converted to ints first.