1

I am using fitter to try to fit a distribution to a set of data. My problem is that when I try to do it, the results seem to show that fitter is not normalizing the data, so no distribution will ever fit. How could I fix this? Is there any parameter I should pass like normalize=True or something like that? My code is

f = Fitter(deg, distributions=get_common_distributions())
f.fit()
f.summary()

where deg is a Numpy array with thousands of positive integers which represent the degree distribution of a network. And the output:

          sumsquare_error          aic           bic  kl_div
exponpow         5.031107  1405.772702 -34016.407373     inf
chi2             5.047918  1323.657269 -33999.925057     inf
gamma            5.062847  1338.383959 -33985.334011     inf
expon            5.423209  1184.884871 -33654.102234     inf
lognorm          5.512355   994.097326 -33565.037948     inf

enter image description here

Pablo
  • 87
  • 5
  • 1
    I am not overly familiar with Fitter, but your distribution is discrete (variable takes only integer values) and you are trying to fit it with continuous distributions. It seems unlikely you will get a good fit. Perhaps this could be of some help: https://stackoverflow.com/questions/6620471/fitting-empirical-distribution-to-theoretical-ones-with-scipy-python – piterbarg Jan 19 '22 at 20:22

0 Answers0