stan-dev / math

The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic modeling, linear algebra, and equation solving.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
753 stars 188 forks source link

poisson_log cdfs #90

Open syclik opened 9 years ago

syclik commented 9 years ago

From @bob-carpenter on April 29, 2015 13:47

Requested by Henrik Mannerström on stan-users:

Add:

And then we can do truncations.

Copied from original issue: stan-dev/stan#1432

syclik commented 9 years ago

From @betanalpha on April 29, 2015 14:6

There’s no computational benefit to having inputs on the log scale for the CDFs as they’re typically given by transcendental functions and not amenable to the analytic simplifications the PDFs are.

syclik commented 9 years ago

From @bob-carpenter on April 29, 2015 14:18

Even if there's no computational benefit, it's conceptually cleaner to have them match, and it also allows people to write truncated models, as in:

  y ~ poisson_log(alpha) T[3,];

So even a simple implementation in terms of just exp() transforming the alpha argument would be worth adding for convenience.

ghost commented 8 years ago

Question: in the stan manual at E.6 it says we're moving from say, poisson_cdf_log to poisson_lcdf etc.

It seems like this happened in the stan language as of 2.10 but not at all in the math library. Advice on how to proceed?

This already has a ticket: https://github.com/stan-dev/math/issues/320

bob-carpenter commented 8 years ago

The library should continue with the _log convention, then we'll change them all in one big pull request. The code generator isn't set up to understand built in _lpdfs yet.

On Oct 12, 2016, at 3:46 PM, thelseraphim notifications@github.com wrote:

Question: in the stan manual at E.6 it says we're moving from say, poisson_cdf_log to poisson_lcdf etc.

It seems like this happened in the stan language as of 2.10 but not at all in the math library. Advice on how to proceed?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.