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

Add PyMC-centric examples to commonly used pm.math functions #5537

Open
Tracked by #7053
ricardoV94 opened this issue Mar 3, 2022 · 7 comments
Open
Tracked by #7053

Add PyMC-centric examples to commonly used pm.math functions #5537

ricardoV94 opened this issue Mar 3, 2022 · 7 comments

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Mar 3, 2022

Would be nice to add code-block examples that show how to use frequent pm.math functions with PyMC models in the docstrings:

  • switch
  • stack
  • softmax
  • ...
@ricardoV94 ricardoV94 added the docs label Mar 3, 2022
@ricardoV94
Copy link
Member Author

CC @OriolAbril

@chritter
Copy link
Contributor

chritter commented Mar 4, 2022

I see that the math submodule is described by https://docs.pymc.io/en/v3/api/math.html. Functions such as pm.switch are not appearing in the submodule documentation because they are imported from aesara.tensor and hence there is no docstring where examples with PyMC models could be added. Could you provide advice on in which place you would like to see the examples?

General examples of the switch are in https://aesara.readthedocs.io/en/latest/library/tensor/basic.html.

@OriolAbril
Copy link
Member

@chritter you are looking at the old docs. The math module is now correctly rendered in https://docs.pymc.io/en/latest/api/math.html. You can click on each function and see the complete docstrings imported from aesara. The goal of this issue is to add examples of using these functions within pymc. The switch for example is often used to break symmetries in models and there should be an example of this in the docstring (or a link to pymc examples of this).

I am also adding the sphinx label, because this will only be beginner friendly if you are already familiar with both sphinx and numpydoc.

@iykat
Copy link
Contributor

iykat commented Mar 30, 2023

Hi, this is my first time contributing to the pymc library. I am writing to experience my interest to work on this issue.

@rag9704
Copy link

rag9704 commented Oct 26, 2023

@ricardoV94 , where to add examples?

@ricardoV94
Copy link
Member Author

@HarshvirSandhu
Copy link
Contributor

HarshvirSandhu commented Jan 23, 2024

@ricardoV94 @OriolAbril
Is this still open? I'd like to work on this.
Please let me know which pm.math functions have to be added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants