Skip to content

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

Open

Description

@ricardoV94

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

  • switch
  • stack
  • softmax
  • ...

Activity

  1. ricardoV94 commented on Mar 3, 2022

    @ricardoV94
    MemberAuthor
  2. chritter commented on Mar 4, 2022

    @chritter
    Contributor

    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.

  3. OriolAbril commented on Mar 4, 2022

    @OriolAbril
    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.

  4. iykat commented on Mar 30, 2023

    @iykat
    Contributor

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

  5. rag9704 commented on Oct 26, 2023

    @rag9704

    @ricardoV94 , where to add examples?

  6. ricardoV94 commented on Oct 27, 2023

    @ricardoV94
    MemberAuthor
  7. HarshvirSandhu commented on Jan 23, 2024

    @HarshvirSandhu
    Contributor

    @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

  8. self-assigned this
    on Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions