Search code examples
pythonstatisticsdistribution

How to identify the distribution of the given data in Python?


I have some data and want to find the distribution that fits them well. I found one post inMATLAB and one post in r. This post talks about a method in Python. It is trying different distributions and see which one fits better. I was wondering if there is any direct way (like allfitdist() in MATLAB) in Python.


Solution

  • Fitter in python provides similar functionality. The code looks like:

    from fitter import Fitter
    f = Fitter(data)
    f.fit()
    

    For more information, please take a look at https://pypi.python.org/pypi/fitter