-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Generalized Pareto Supported Below loc
?
#1370
Comments
Most TFP distributions will happily compute and return the "natural" formula for (log) prob outside of the support. This is an intentional, if somewhat surprising, choice. There are at least a few reasons:
This kind of question has come up before in other contexts, and for some distributions we've added a semi-standardized flag that lets the user say "please give me zero prob or -inf log prob outside the accepted support of this distribution". See, e.g., the One interpretation of the statement "The support of the distribution is always lower bounded by loc. " about the support of GeneralizedPareto is that sampling will never yield values outside this support. How a user chooses to call Hope this helps clarify our thinking on this kind of question. We'd welcome a PR adding a similar flag to the GeneralizedPareto distribution that allows users to control whether they want to include the control flow in the log prob computation! |
One more note: if you enable the Generally speaking, if anything about your TFP-based code is not working, it's a good idea to flip |
excellent answer. thank you. yes, honestly haven't delved into Bijectors yet, so perhaps I'm making my project a bit harder than it needs to be. Wouldn't be the first time ;) yes, i'll look into a flag for this. |
please feel free to raise problem/application-specific questions here or on the mailing list (tfprobability@tensorflow.org). people are generally eager to jump in with ideas/solutions and we all love thinking about this stuff, however big or small the problem :) |
Relatively new to TF/TFP so perhaps there is some obvious answer here. The pdf for the Generalized Pareto is typically defined as having support for
x >= loc
forshape >= 0
and the docs do even say the support of the distribution is always lower bounded by loc, but this isn't so. I compared with scipy below.Has impacted me as I'm using a hybrid that utilizes Pareto pdf only if x>=loc but I'm getting NaNs (I think) b/c the non-tail portion is being evaluated by the GenPareto at a number much greater than zero (and its alot more challenging to adjust for).
The text was updated successfully, but these errors were encountered: