How to fit a poisson distribution with seaborn?
问题 I try to fit my data to a poisson distribution: import seaborn as sns import scipy.stats as stats sns.distplot(x, kde = False, fit = stats.poisson) But I get this error: AttributeError: 'poisson_gen' object has no attribute 'fit' Other distribution (gamma, etc) de work well. 回答1: The Poisson distribution (implemented in scipy as scipy.stats.poisson) is a discrete distribution. The discrete distributions in scipy do not have a fit method. I'm not very familiar with the seaborn.distplot