-
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
Lack of Half-Cauchy distribution #100
Comments
Half-Cauchy is a common prior, so it'd be great to have this explicitly. The implementation should be fairly straightforward, following the half-normal distribution. As a workaround, in defining log-densities for inference you can generally also just use the Cauchy density, assuming you're already using variable transformations to constrain your inferences to be positive (which typically has nicer properties than just relying on -inf's in the log density). |
How about:
|
Wouldn't you need to apply the AbsoluteValue in a standardized space? Something like, bijector = tfp.bijectors.Chain([
tfp.bijectors.AffineScalar(shift=loc),
tfp.bijectors.AbsoluteValue(),
tfp.bijectors.AffineScalar(shift=-loc)]) |
Yes, but the problem is that Chain doesnt know how to work with non-injective bijectors such as AbsoluteValue. It might be possible to add this capability, and if so would be a very nice improvement. In my comment, I should have indicated that this isnt HalfCauchy but should have the desired similar properties, esp if all you need is a prior. |
FYI, we have a PR for this internally coming soon. |
Half-Cauchy distribution is a requirement for the well known centered eight schools model.
pymc4 issue: pymc-devs/pymc4#12
The text was updated successfully, but these errors were encountered: