why scipy poisson do not have a pdf probability density function method

0 votes

I want to plot the probability density function of a Poisson distribution in python created using scipy. If I want to plot the pdf of a beta distribution, I would do something like the following:

x = np.linspace(0, 1, 200)
alphas = 4
betas = 10
pdf = st.beta.pdf(x, alpha, beta)
plt.plot(x, pdf, label=r'$\alpha$ = {}, $\beta$ = {}'.format(alpha, beta))

I thought I could do the same with a Poisson distribution, but unfortunately, the object does not have the pdf method! why? how can I plot a Poisson pdf without writing the formula myself?

Apr 4, 2022 in Machine Learning by Nandini
• 5,480 points
660 views

1 answer to this question.

0 votes
The poisson distribution has no density function and is a discontinuous distribution. It does, however, include a mass function, which you may use using the scipy.stats.poisson.pmf()
answered Apr 5, 2022 by Dev
• 6,000 points

Related Questions In Machine Learning

0 votes
1 answer

How do I create a decision tree?

Let us consider the following example. Suppose a ...READ MORE

answered May 13, 2019 in Machine Learning by Fatima
900 views
0 votes
1 answer
0 votes
0 answers
+1 vote
1 answer

not able to see all columns and rows of a pandas DataFrame?

Hi@akhtar, Your data set contains lots of rows ...READ MORE

answered Apr 8, 2020 in Machine Learning by MD
• 95,460 points
5,501 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
0 votes
1 answer

Is Genetic Algorithm a Machine Learning Method?

A pure Genetic Algorithm solution does not ...READ MORE

answered Feb 15, 2022 in Machine Learning by Dev
• 6,000 points
1,203 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP