-
Notifications
You must be signed in to change notification settings - Fork 421
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
Constructing a censored distribution #1468
Comments
This is a good opportunity to see how well we did with https://github.com/JuliaMath/DensityInterface.jl |
Can you explain how it is related to the DensityInterface integration? I would imagine that |
It's a mixture between the
in the discrete case. For the Gaussian censored we could extend
but currently we get into
because discrete-continuous mixtures are not allowed in Distributions. These are exactly the discussions we had before Christmas. The good news is though: the example https://discourse.julialang.org/t/turing-censored-regression-example/53837/7 doesn't pose problems because the likelihood is weird, but the posterior density doesn't contain the truncated parameters so no problems with reference measures etc. |
Yes, definitely However, I assume you wouldn't define it as a |
I have to think if it's working exactly as in |
Also because sample generation for |
I also still don't understand how DensityInterface.jl is relevant here. |
If we did it right with DensityInterface.jl you can have a hierarchical model where |
I suggest we can have
|
I think this was @sethaxen's suggestion above as well 🙂 |
And then you want to follow the line of reasoning in TuringLang/Turing.jl#847 (comment) ? |
Which line of reasoning would that be? |
Hmm I'm not sure what you would like to refer to here. Maybe I'm oversimplifying a possible implementation since I haven't made a concrete draft but I don't think there are any problems with our type hierarchies: Analogously to |
Come on! We have to figure out if a censored continuous distribution is continuous. And it says there:
|
Note that a truncated continuous distribution has no atoms, but a censored has. |
I assumed that you wanted to refer to this question
and hence I commented on it. However, I was confused and unsure about your intentions since you linked to a comment in a completely different repo (and which I had already forgotten 😄) and more importantly we already agreed on this definition some weeks ago (well, at least that was my impression: #1391 (comment)) and hence it was unclear to me which part would be a new reasoning. I assumed we already agreed that
The point I wanted to raise above was that we have to decide what to do in the special cases where censoring of a ContinuousDistribution leaves us only with a discrete support: E.g., if we censor a mixture of a Hence I guess the question regarding these atoms is not the type structure but mainly how to define functions such as |
Yes, I understand we both think this is the way to go but we haven't really made it |
It would be handy to have a
Censored
object and correspondingcensored
function that behaved just likeTruncated
andtruncate
, respectively, but for censored data. The implementations would be much the same, with two main differences:logpdf
of the wrapped distribution at the bounds, they would evaluate itslogcdf
at the lower-bound andlogccdf
at the upper-boundrand
would useclamp
instead of rejection samplinginspired by the addition of
Censored
to PyMC and this Twitter threadThe text was updated successfully, but these errors were encountered: