Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by erdogant for What's the equivalent of fitdist and histfit in Python?

Try the distfit (or fitdist) library.

https://erdogant.github.io/distfit

pip install distfitimport numpy as np# Example dataX = np.random.normal(10, 3, 2000)y = [3,4,5,6,10,11,12,18,20]# From the distfit library import the class distfitfrom distfit import distfit# Initializedist = distfit()# Search for best theoretical fit on your emperical datadist.fit_transform(X)# Plotdist.plot()# summay plotdist.plot_summary()

So in your case it would be:

dist = distfit(distr='lognorm')dist.fit_transform(X)

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>