tensorflow / tensorflow/probability

distributions.Poisson.quantile not implemented but exists in documentation

Open
#1,259 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
TensorFlow installed from (source or binary): pip
TensorFlow version (use command below): v2.4.0-49-g85c8b2a817f 2.4.1
Python version: 3.8.8

Running
tfp.distributions.Poisson(rate=1).quantile(0.5)
raises a

NotImplementedError: quantile is not implemented: Poisson

Despite that method being present in the documentation.

This seems to be the same issue as #20208, but for Poisson. There is a Poisson quantile implementation in scipy, which is making use of some Poisson survival functions from scipy.special.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the tfp.distributions.Poisson.quantile entry point and compare its behavior with scipy/stats/_discrete_distns.py, which the issue links as a reference. Verify the implementation against representative Poisson quantiles; done means tfp.distributions.Poisson(rate=1).quantile(0.5) returns a result instead of raising NotImplementedError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.