Skip to content

Inconsistent use of 'errordef' attribute #3

Description

@HumanAlien

In the Week 2 exercises, the iMinuit errordef attribute is explicitly redefined as 0.5 several time in the following files,

"minuit_bllh.errordef = 0.5 # Value for likelihood fits\n",

"minuit_bllh.errordef = 0.5 # Value for likelihood fits\n",

"minuit_fit_bllh.errordef = 0.5 # Value for likelihood fit\n",

Conversely, in the case of the example solution to LikelihoodFit_original.ipynb, that's not the case:

"minuit_fit_bllh = Minuit(bllh_object_fit, tau=tau_truth, N0=Ntimes)\n",


Initially, I was perplexed, and couldn't figure out why the BLLH and ULLH fits still worked. However, it seems the UnbinnedLH() and BinnedLH() classes redefine the errordef attribute by default,

which is incredibly useful. But also seems inconsistent and confusing.


I suggest adding a comment to the relevant files, explaining the errordef attribute. I also suggest usage of errordef to be consistent accross notebooks: either let the UnbinnedLH() and BinnedLH() classes handle it - or make the student deal with errordef explicitly in each case.

Maybe even consider illustrating what happens if you use the wrong errordef for the wrong fit, and to what degree it matters because I'm not entirely sure myself. What I gather from the documentation, is that understanding and defining errordef correctly is important for doing correct error calculation, so it seems important to get right!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions