Skip to main content

Distribution Fitting/Regression Library

Project description

https://img.shields.io/pypi/v/probfit.svg https://zenodo.org/badge/DOI/10.5281/zenodo.1477853.svg https://github.com/scikit-hep/probfit/actions/workflows/main.yml/badge.svg

probfit is a set of functions that helps you construct a complex fit. It’s intended to be used with iminuit. The tool includes Binned/Unbinned Likelihood estimators, 𝝌² regression, Binned 𝝌² estimator and Simultaneous fit estimator. Various functors for manipulating PDFs such as Normalization and Convolution (with caching) and various built-in functions normally used in B physics are also provided.

Strict dependencies

Optional dependencies

Getting started

import numpy as np
from iminuit import Minuit
from probfit import UnbinnedLH, gaussian
data = np.random.randn(10000)
unbinned_likelihood = UnbinnedLH(gaussian, data)
minuit = Minuit(unbinned_likelihood, mean=0.1, sigma=1.1)
minuit.migrad()
unbinned_likelihood.draw(minuit)

Documentation and Tutorial

  • Documentation
  • The tutorial is an IPython notebook that you can view online here. To run it locally: cd tutorial; ipython notebook –pylab=inline tutorial.ipynb.
  • Developing probfit: see the development page

License

The package is licensed under the MIT license (open source).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for probfit, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size probfit-1.2.0.tar.gz (1.5 MB) File type Source Python version None Upload date Hashes View
Filename, size probfit-1.2.0-cp39-cp39-win_amd64.whl (404.2 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size probfit-1.2.0-cp39-cp39-win32.whl (343.7 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size probfit-1.2.0-cp39-cp39-manylinux1_x86_64.whl (1.7 MB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size probfit-1.2.0-cp39-cp39-manylinux1_i686.whl (1.6 MB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size probfit-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl (445.8 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size probfit-1.2.0-cp38-cp38-win_amd64.whl (405.1 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size probfit-1.2.0-cp38-cp38-win32.whl (344.5 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size probfit-1.2.0-cp38-cp38-manylinux1_x86_64.whl (1.9 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size probfit-1.2.0-cp38-cp38-manylinux1_i686.whl (1.8 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size probfit-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl (439.1 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size probfit-1.2.0-cp37-cp37m-win_amd64.whl (393.2 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size probfit-1.2.0-cp37-cp37m-win32.whl (335.7 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size probfit-1.2.0-cp37-cp37m-manylinux1_x86_64.whl (1.8 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size probfit-1.2.0-cp37-cp37m-manylinux1_i686.whl (1.6 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size probfit-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl (431.5 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size probfit-1.2.0-cp36-cp36m-win_amd64.whl (392.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size probfit-1.2.0-cp36-cp36m-win32.whl (335.3 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size probfit-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (1.8 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size probfit-1.2.0-cp36-cp36m-manylinux1_i686.whl (1.7 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size probfit-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (432.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size probfit-1.2.0-cp35-cp35m-win_amd64.whl (381.8 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size probfit-1.2.0-cp35-cp35m-win32.whl (325.8 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size probfit-1.2.0-cp35-cp35m-manylinux1_x86_64.whl (1.7 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size probfit-1.2.0-cp35-cp35m-manylinux1_i686.whl (1.6 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size probfit-1.2.0-cp35-cp35m-macosx_10_9_x86_64.whl (410.4 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size probfit-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl (1.6 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size probfit-1.2.0-cp27-cp27mu-manylinux1_i686.whl (1.5 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size probfit-1.2.0-cp27-cp27m-manylinux1_x86_64.whl (1.6 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size probfit-1.2.0-cp27-cp27m-manylinux1_i686.whl (1.5 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size probfit-1.2.0-cp27-cp27m-macosx_10_9_x86_64.whl (434.9 kB) File type Wheel Python version cp27 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page