Skip to content

Guide for writing custom distributions #184

Open
@ally-lee

Description

@ally-lee

I would like to contribute a guide for defining custom PyMC3 distributions. I was working with count data and realized that the Poisson distribution didn't offer the flexibility in dispersion I needed since the mean and variance are fixed to each other. I decided that the Generalized Poisson was a better likelihood for my model, so I wrote a custom distribution for it. I have put together a notebook outlining this, and I'll link my PR to this issue.

I posted about this on discourse a while back, so it would be great to post updates for the community in this thread:
https://discourse.pymc.io/t/generalized-poisson-distribution/6535

Since I have now worked with the Generalized Poisson in PyMC3, I would also like to contribute this distribution to the main project: pymc-devs/pymc#4775

File:
Reviewers:

The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates

Known changes needed

Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.

General updates

ArviZ related

Changes for discussion

Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.

General updates

ArviZ related

Notes

Exotic dependencies

Computing requirements

Metadata

Metadata

Assignees

No one assigned

    Labels

    tracker idIssues used as trackers in the notebook update project, do not close!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions