Skip to content

Commit

Permalink
More robust unified fitting in Minuit.migrad and Minuit.mnprofile (#1009
Browse files Browse the repository at this point in the history
)

Closes #1008

This patch was developed in collaboration with
[ikrommyd](https://github.com/ikrommyd).

- Minuit.migrad: When we have to iterate, MnSimplex is now called by
default in between interations, since this seems to improve convergence
in pathological cases. The new keyword `use_simplex` can be used to
disable this feature. It is only used if the algorithm has to iterate,
so for well-behaved functions there is no penalty of extra function
calls. Also, when we have to iterate, the strategy is now automatically
increased to 2, since this also seems to help.
- Minuit.mnprofile: Now uses the same iterative robust fitting that
Minuit.migrad uses. New keywords `ncall`, `iterate`, `use_simplex` allow
to customize the fits. Strategy 0 is used first, and if that fails, the
code switches to Strategy 2 in the iterations.
- Minuit.mncontour: Now uses the same iterative robust fitting that
Minuit.mnprofile uses if `experimental` is True. New keywords `ncall`,
`iterate`, `use_simplex` allow to customize the fits.
- A new tutorial illustrates the benefits of iterating and strategy on a pathological function. It is also shown that Scipy minimizers perform worse than Minuit when the function is pathological.
  • Loading branch information
HDembinski authored Jul 30, 2024
1 parent 079432d commit 301ff07
Show file tree
Hide file tree
Showing 6 changed files with 478 additions and 47 deletions.
320 changes: 320 additions & 0 deletions doc/notebooks/unstable_fit.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Important for most users are only the first two entries.

notebooks/basic
notebooks/cost_functions
notebooks/unstable_fit
notebooks/correlated_data
notebooks/error_bands
notebooks/interactive
Expand Down
Loading

0 comments on commit 301ff07

Please sign in to comment.