-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refactor approximation methods #27
Comments
We can create a separate package for this purpose, but we need to come up with convenient user-friendly API. Some notes from our private discussion in Slack: We have quite some approximation methods in both Our suggestion is that the top-level API looks smth like: approximate(...) = approximate_as(Gaussian, ...)
approximate_as(::Type{T}, ::ApproximationMethod, ::Distribution, ::Function) where { T } = ...
Most probably by default the result of any approximation is a Gaussian distribution. This can be controlled by a user with e.g. What
|
Let's close this one as refactoring has happened - a separate package is created. This issue doesn't make much sense to me any longer. |
Approximation methods section is a bit outdated in comparison to other parts of the package and has been implemented long ago. It need revision, especially methods like
GaussHermite
,GaussLaguerre
,approximate_meancov
and others. We need to come up with a similar interface for all approximation methods or maybe just exploit another package?Approximation methods and their code is located under
src/approximations/
folder:We use it here:
https://github.com/biaslab/ReactiveMP.jl/blob/c8fab6b4d78f704ab3ba1311005ce6204efdda15/src/nodes/probit.jl#L34
https://github.com/biaslab/ReactiveMP.jl/blob/c7e60f907393bd732933ffb1503af88a38e2e0b0/src/distributions/exp_linear_quadratic.jl#L18
https://github.com/biaslab/ReactiveMP.jl/blob/c7e60f907393bd732933ffb1503af88a38e2e0b0/src/nodes/kernel_gcv.jl#L26
and maybe somewhere else..
The text was updated successfully, but these errors were encountered: