You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than trying to rebuild all functionality from Distributions.jl, we're first focusing on reimplementing logdensity (logpdf in Distributions), and delegating most other functions to the current Distributions implementations.
This makes some functions in Distributions.jl available through distproxy.jl:
PROXIES =Dict(
:Distributions=> [
:mean:std:var:entropy:cdf:quantile
],
:MonteCarloMeasurements=> [
:Particles
]
)
for m inkeys(PROXIES)
for f in PROXIES[m]
@evalbeginimport$m:$f
export$f
$m.$f(d::AbstractMeasure, args...) =$m.$f(MeasureTheory.distproxy(d), args...)
endendend
So for example, without ever defining cdf explicitly, we get
julia> Dists.cdf(Normal(2,5),3.1)
0.5870644226482147
julia>@which Dists.cdf(Normal(2,5),3.1)
cdf(d::AbstractMeasure, args...) in MeasureTheory at /home/chad/git/MeasureTheory.jl/src/distproxy.jl:21
We need a distproxy for every parameterization. For example, we should have something like
Rather than trying to rebuild all functionality from Distributions.jl, we're first focusing on reimplementing
logdensity
(logpdf
in Distributions), and delegating most other functions to the current Distributions implementations.So for example, we have
This makes some functions in Distributions.jl available through
distproxy.jl
:So for example, without ever defining
cdf
explicitly, we getWe need a
distproxy
for every parameterization. For example, we should have something likeThe text was updated successfully, but these errors were encountered: