-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix the case that value < 0 for exp and geo dist #1142
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
fix the case that value < 0 for exp and geo dist #1142
Conversation
|
@brianwa84 could you help review this issue? Thx~ |
axch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
My default is not to make this change. 1) We often permit computation of analytical pdf/cdf formulas outside the support (eg, bernoulli or poisson at a non-integer). 2) We also generally default to not adding compute/RAM overhead by default, which "punishes" users who have already taken care not to feed inputs outside the support (eg, by constraining inputs, casting, etc). "Punish" here refers to the fact that with this change, all users will incur a computational/RAM cost (tf.where will cause both sides of the expression to be evaluated). We could save RAM in this change by not using |
|
While I respect the point about compute and compilation cost, I think there is at this point strong evidence that our users expect Perhaps we should add a new flag to control these checks? It could be named |
|
@csuter Ths for your clarification of the initial idea of the design, but we were still hoping that we could have this formula mathematically right. As explained in #1142 , the current formula will lead to some unreasonable numbers such as prob < 0 or > 1. @axch Thx for helping review this pr. Let me know if there is any further work from me(it looks that some ci failed) |
|
@blacksde After some internal discussion, we decided to add a generically-named flag to control whether to have these kinds of Rationale:
Action requested:
|
The plan looks great~Let me work on the update. |
… from code review update constructor function; add doc string
25244f9 to
7de66af
Compare
PiperOrigin-RevId: 344302481
resolve #1141