Skip to content

Implement numpy-like Rayleigh distribution #750

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

Merged
merged 1 commit into from
May 10, 2024

Conversation

Dhruvanshu-Joshi
Copy link
Member

Description

Incorporate Rayleigh distribution as square root of chi2 distribution with degree of freedom 2.
As per the reference.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.81%. Comparing base (c9f5f65) to head (eb1ee57).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #750   +/-   ##
=======================================
  Coverage   80.80%   80.81%           
=======================================
  Files         162      162           
  Lines       46816    46822    +6     
  Branches    11454    11455    +1     
=======================================
+ Hits        37832    37838    +6     
  Misses       6735     6735           
  Partials     2249     2249           
Files Coverage Δ
pytensor/tensor/random/basic.py 99.05% <100.00%> (+0.01%) ⬆️

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a small tweak and need for docstrings

@ricardoV94 ricardoV94 changed the title Implement Rayleigh distribution in Pytensor Implement numpy-like Rayleigh distribution May 7, 2024
@ricardoV94 ricardoV94 added enhancement New feature or request NumPy compatibility labels May 7, 2024
Scale parameter of the distribution (positive). Default is 1.0.
size : int or tuple of ints, optional
Output shape. If the given shape is, e.g., `(m, n, k)`, then `m * n * k` samples
are drawn. Default is None, in which case a single value is returned.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. Is it what the other docstrings write? If not provided the size is implied by the shape of scale

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this is a error on my side

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@twiecki twiecki merged commit c40d692 into pymc-devs:main May 10, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Rayleigh RV as a scaled Chi2
3 participants