7

I was looking for a minuit equivalent on Python 2.7 and I found this two variants:
PyMinuit and
iMinuit.

My question is: what's the difference between them?

Both uses Seal 1.7.9 Minuit and in a few 2D Gaussian fit tests that I had both brought the same answers. So, beside the installation method (iMinuit being easier), why should I choose one over the other?


Thanks for your help! xD

P.S. I tryied to tag iminuit as well but I can't create a new tag... =/

tamasgal
  • 24,826
  • 18
  • 96
  • 135
pekapa
  • 881
  • 1
  • 11
  • 25

1 Answers1

10

Disclaimer: I wrote iminuit. Let me give you a bit of history.

I was a proud user of PyMinuit. I loved it and the syntax he came up with is just brilliant. However, I eventually found that I couldn't really do build a cost function programatically(and efficiently). For example, if you want to make a generic chi^2 functor which takes the data and the pdf of n parameter as the arguments and spit out a chi^2 function of n-1 parameter, it is (almost)impossible to do in PyMinuit.

So, I try to modify PyMinuit to add that exact function and to modify some print out. I found that PyMinuit code is in C which is a pain to modify. So, I rewrite it using cython.

Couple addition you will find in iminuit:

  1. Better integration with IPython notebook. It prints the result in a nice table and can graph you for free a couple things.
  2. Function signature extraction is much more forgiving than PyMinuit
  3. Long parameter name. Not really PyMinuit Bug but there is a bug in Minuit 1.7.x that the name length was hardcoded.
  4. One side limit I'm not sure but I think PyMinuit doesn't do this
  5. Progress printout is a bit different but it's a matter of taste. The one I have is inspired by ROOT which IMO make more sense.
  6. probfit integration. Remember I mention function that takes data and pdf and spit out chi^2 function for minimization? See tutorial.
Piti Ongmongkolkul
  • 2,110
  • 21
  • 20
  • 2
    The PyMinuit author now also recommends iminuit: https://github.com/jpivarski/pyminuit#pyminuit---minuit-numerical-function-minimization-in-python – Christoph Aug 02 '15 at 09:05
  • 1
    Yes: install iminuit. (I'm the author of PyMinuit.) I'm using iminuit in tutorials for new students. – Jim Pivarski May 24 '18 at 21:03