-
Notifications
You must be signed in to change notification settings - Fork 415
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
Type hierarchy for Angular, Spherical and Manifold distributions. #224
Comments
Actually, having thought more about this, these should be new "support" types (instead of I would also propose that we provide an "unchecked" method for computing the densities for computational efficiency: perhaps Also, one more to consider would be |
My concern is that introducing a new type for each kind of manifold would complicate things a lot, which may not be necessary from the standpoint of API design. |
@lindahua I concede that it would add some complications, though I think the benefits outweigh the risks. The main advantage is that it would allow us to leverage dispatch. Some examples:
|
Maybe we should introduce an abstract type |
@lindahua That might be a better approach. If we're going to do that, it would also be useful to have different types to distinguish between distributions defined on the whole real line, and distributions defined on the positive reals, and distributions defined on compact intervals. |
This has come up in a couple of issues (#192, #223), so I thought I would propose creating some new abstract types:
AngularDistribution <: Distribution{Univariate,Continuous}
: e.g. von Mises distribution, wrapped normal. The problem is that they can be defined on any interval of length2pi
, so what I was thinking is that we definepdf
over the whole real line, such that the integral is 1 over any such interval. We could definecdf
andrand
on[0,2pi]
.SphericalDistribution <: Distribution{Multivariate,Continuous}
: e.g. Fisher-von Mises, Bingham, etc. We need to be a bit careful in how we deal with support (i.e. allow for some error in the conditionnorm(x) == 1
).StiefelDistribution <: Distribution{Matrixvariate,Continuous}
:MatrixBingham
etc. for distributions over orthogonal matrices.PDMatDistribution <: Distribution{Matrixvariate,Continuous}
forWishart
andInverseWishart
?The text was updated successfully, but these errors were encountered: