Home > Enterprise >  Is there a way to plot another distribution than the best performing when using distfit()?
Is there a way to plot another distribution than the best performing when using distfit()?

Time:05-05

I am using distfit() to fit my data to the best distribution. The results give me genextreme with and RSS of 0.00045 and loggamma with an RSS of 0.00048. Now my professor said that using genextreme and justifying that use as "the tools told me so" is not really good enough. Now I want to use the loggamma distribution as it is quite close as well (and easier to justify). When using the function dist.plot() it just plots the best performing distribution.

Is there anyway I can get it to plot a distribution of my choice?

The code I use is as follows (but I cant add my data as it is protected).

# Initialize distfit
dist = distfit()
# Determine best-fitting probability distribution for data
dist .fit_transform(X)
# Print summary of evaluated distributions
print(dist .summary)
dist .plot()

CodePudding user response:

you can recompute the dist only for the one you are looking for

dist = distfit(distr=['loggamma'])

  • Related