zfit: scalable, pythonic fitting


Click on the links or the images to explore zfit.

What is zfit?

zfit is a (likelihood) model fitting library using analytic distributions such as a Normal, Poisson. It is powerful and highly flexible such that it can be used to analyse data in High Energy Physics experiments like CERN.

(This looks similar to SciPy distributions and fitting, why zfit?)

zfit logo zfit logo

What can zfit do

It is built to be powerful and flexible enough to satisfy the strong requirements of High Energy Physics, but is a general purpose library. It focuses strongly on two points, namely:

  • performance: it is built on top of the low-level components of TensorFlow. This is a mathematical library very similar to Numpy but with the native ability to compile parts and imply various optimizations, including GPU support and automatic gradients.

  • custom models: While comparable libraries offer usually a limited set of model combinations or the possibility to implement custom models, zfit supports a variety of composed and multidimensional distributions, such as products and sums, out-of-the-box. Implementing a custom model with your own function (you can try your own shape) is straightforward and allows for arbitrary complicated functions - even functions reaching thousands of lines of code; if analytical methods for integration and sampling are not available, it automatically falls back to numerical methods. No further care needs to be taken by the user therefore.