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.

Source Distribution

probfit-1.2.0.tar.gz (1.5 MB view hashes)

Uploaded source

Built Distributions

probfit-1.2.0-cp39-cp39-win_amd64.whl (404.2 kB view hashes)

Uploaded cp39

probfit-1.2.0-cp39-cp39-win32.whl (343.7 kB view hashes)

Uploaded cp39

probfit-1.2.0-cp38-cp38-win_amd64.whl (405.1 kB view hashes)

Uploaded cp38

probfit-1.2.0-cp38-cp38-win32.whl (344.5 kB view hashes)

Uploaded cp38

probfit-1.2.0-cp37-cp37m-win_amd64.whl (393.2 kB view hashes)

Uploaded cp37

probfit-1.2.0-cp37-cp37m-win32.whl (335.7 kB view hashes)

Uploaded cp37

probfit-1.2.0-cp36-cp36m-win_amd64.whl (392.8 kB view hashes)

Uploaded cp36

probfit-1.2.0-cp36-cp36m-win32.whl (335.3 kB view hashes)

Uploaded cp36

probfit-1.2.0-cp35-cp35m-win_amd64.whl (381.8 kB view hashes)

Uploaded cp35

probfit-1.2.0-cp35-cp35m-win32.whl (325.8 kB view hashes)

Uploaded cp35

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