You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Minuit instance is initialized every time we call StatisticalModel.fit, in some cases when there are a lot of hypotheses, the computational efficiency is not so high.
Well, if the toydata is generated once per iteration, and multiple hypotheses are required, we should initiate the Minuit once, because it is only a function of toydata set and likelihood definition.
It's true though if I remember correctly it caches some of the gradients. Do you have an estimate of whether this is a sizeable effect? Only then I would consider reusing the same instance multiple time (we should anyways time all of this at some point (#20 ).
If we want to implement it we could do it by defining self.minuit_object = None in the init, only generate it when it's not None and set it to None if we assign new data or something 😊
A
Minuit
instance is initialized every time we callStatisticalModel.fit
, in some cases when there are a lot of hypotheses, the computational efficiency is not so high.alea/alea/statistical_model.py
Lines 243 to 245 in 80f6b16
The text was updated successfully, but these errors were encountered: