Skip to content

Add HalfStudentT moment #5152

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 7 commits into from
Nov 8, 2021
Merged

Conversation

azihna
Copy link
Contributor

@azihna azihna commented Nov 8, 2021

Add moments and tests for the below distribution as part of #5078

pymc.distributions.continuous.HalfStudentT

@azihna azihna changed the title Moment halfstudentt HalfStudentT moment Nov 8, 2021
@azihna azihna changed the title HalfStudentT moment Add HalfStudentT moment Nov 8, 2021
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 for opening the PR. I left some comments

@twiecki twiecki mentioned this pull request Nov 8, 2021
51 tasks
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.

There we still some issues in the get_moment. Let me know if the suggestion makes sense

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, waiting to see if tests pass

@ricardoV94
Copy link
Member

Pre-commit was failing due to sorting of imports. There is a guide here on how to setup locally to make sure it's working before pushing: https://github.com/pymc-devs/pymc/wiki/Python-Code-Style

@codecov
Copy link

codecov bot commented Nov 8, 2021

Codecov Report

Merging #5152 (0c6c46c) into main (2efedc1) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5152      +/-   ##
==========================================
+ Coverage   77.86%   78.00%   +0.14%     
==========================================
  Files          88       88              
  Lines       14165    14114      -51     
==========================================
- Hits        11029    11010      -19     
+ Misses       3136     3104      -32     
Impacted Files Coverage Δ
pymc/distributions/continuous.py 95.96% <100.00%> (+0.16%) ⬆️
pymc/backends/report.py 89.51% <0.00%> (-2.10%) ⬇️
pymc/tests/backend_fixtures.py 77.55% <0.00%> (-1.43%) ⬇️
pymc/backends/tracetab.py 100.00% <0.00%> (ø)
pymc/distributions/discrete.py 99.04% <0.00%> (+0.03%) ⬆️
pymc/util.py 75.00% <0.00%> (+0.64%) ⬆️
pymc/backends/ndarray.py 89.38% <0.00%> (+19.25%) ⬆️

(1, 1, 5, np.ones(5)),
(1, np.arange(5), None, np.arange(5)),
(1, np.arange(5), (2, 5), np.full((2, 5), np.arange(5))),
(np.arange(1, 6), 1, 5, np.full(5, 1)),
Copy link
Member

Choose a reason for hiding this comment

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

This one does not really test the broadcast because size is not None. Maybe something like this?

Suggested change
(np.arange(1, 6), 1, 5, np.full(5, 1)),
(np.arange(1, 6), 1, None, np.full(5, 1)),

And you can remove one of the previous 2 tests, we don't need 5 in total.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! Thanks for your patience!

Copy link
Member

Choose a reason for hiding this comment

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

I thank you :)

@ricardoV94 ricardoV94 merged commit 741f207 into pymc-devs:main Nov 8, 2021
@ricardoV94
Copy link
Member

Thanks!

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.

2 participants