Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyMinuit vs IMinuit

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... =/

like image 714
pekapa Avatar asked Sep 05 '13 21:09

pekapa


1 Answers

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.
like image 133
Piti Ongmongkolkul Avatar answered Nov 03 '22 02:11

Piti Ongmongkolkul