Skip to content

Do something sensible when running Minuit.hesse() turns valid minimum into invalid minimum #746

Open
@HDembinski

Description

@HDembinski

The following is a concern when using strategy 0 or 1 (default).

In most cases, Minuit.migrad calls MnHesse automatically at the end of the minimization, but if the correlations between parameters are small, then it does not.

In the former case, calling Minuit.hesse() after Minuit.migrad() does not do anything. In the latter case, calling Minuit.hesse() can turn a valid minimum into an invalid minimum, because the EDM value depends on the Hessian matrix, which is updated by Minuit.hesse(). This can turn a EDM value below threshold into a value above threshold and Minuit then reports that the fit has failed.

There are two options for what to do here:

  • Raise a IMinuitWarning when a valid minimum is turned invalid by running Minuit.hesse(). This gives users a chance to understand the issue and react to it accordingly. It is the responsibility of users to check Minuit.valid after Minuit.hesse() and run Minuit.migrad() again if Minuit.valid is False.
  • Minuit.hesse() calls Minuit.migrad() automatically if Minuit.valid is True before and False after calling MnHesse.

The second option is the most convenient for the casual user, but may irritate users that expect Minuit do to exactly what it is told and not more (people who use Minuit as a backend).

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