FlamTeam / flamedisx

Fast likelihood analysis in more dimensions for xenon TPCs
https://flamedisx.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
15 stars 13 forks source link

Cache system for mu computation and interpolation #52

Open CristianAntochi opened 4 years ago

CristianAntochi commented 4 years ago

Since I'm working with Blueice now, I was thinking that we should start thinking of a smart way to implement a caching system for Flamedisx as well, in particular for the computation of the mus in the likelihood initialisation having in mind the big amount of toyMCs that we will need for the analyses. We should think of a way to initialise and cache the mu computation and a function to just recall the precomputed mus. Related to this, to avoid fluctuations in the mu interpolation we should also think at a smart way to smoothen the interpolation so we don't create local minima that might give problems in the fitting of the likelihood function.

JelleAalbers commented 4 years ago

Indeed: for the caching I think the blueice approach would work if we add Knut's fix in https://github.com/JelleAalbers/blueice/issues/29 to prevent race conditions.

The interpolation issue is harder: we can try splining things or using a smoother interpolation (inverse weighted distance maybe?). The tricky thing is it has to be in tensorflow to work.

jonas-eschle commented 4 years ago

The interpolation sounds interesting, as we're (zfit also mostly based on TensorFlow and aiming at providing interpolation schemes to smooth binned functions.

Our main goal is though to move all the TF efforts together so that we don't need to rewrite all this functions in TF. Did you already start to do something in the interpolation direction?

Btw: if we wanna set this things up, it could be good to contribute it directly to TensorFlow Probability