Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add pdf, cdf, lopdf and logcdf functions. #58

Merged
merged 2 commits into from
Mar 26, 2021
Merged

ENH: Add pdf, cdf, lopdf and logcdf functions. #58

merged 2 commits into from
Mar 26, 2021

Conversation

zoj613
Copy link
Owner

@zoj613 zoj613 commented Mar 25, 2021

closes #54

In [5]: from polyagamma import polyagamma_pdf
   ...: import matplotlib.pyplot as plt
   ...: import numpy as np
   ...: plt.style.use("seaborn")
   ...: x = np.linspace(0.01, 10, 500);x.sort()
   ...: for h, z in zip([1, 4, 7, 10, 15, 25], [0] * 6):
   ...:    a = polyagamma_pdf(x, h=h, z=z)
   ...:    plt.plot(x, a, label=f'PG({h}, {z})')
   ...: plt.xlabel('x')
   ...: plt.ylabel('f(x)')
   ...: plt.ylim(bottom=0)
   ...: plt.legend()
   ...: plt.show()
Figure_pdf_0 Figure_pdf_5
Figure_cdf_0 Figure_cdf_5

@codecov-io
Copy link

codecov-io commented Mar 25, 2021

Codecov Report

Merging #58 (9c0a972) into main (2af0edb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #58   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           98       126   +28     
=========================================
+ Hits            98       126   +28     
Impacted Files Coverage Δ
polyagamma/__init__.py 100.00% <100.00%> (ø)
polyagamma/_polyagamma.pyx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2af0edb...9c0a972. Read the comment docs.

@zoj613 zoj613 merged commit 004b377 into main Mar 26, 2021
@zoj613 zoj613 deleted the pdf_cdf branch March 26, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Add logp and logcdf utiliy functions
2 participants