-
Notifications
You must be signed in to change notification settings - Fork 423
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
Feature request: deterministic (Dirac) distribution #1040
Comments
A julia> d = Normal(4.5, 0.0)
Normal{Float64}(μ=4.5, σ=0.0)
julia> rand(d)
4.5
julia> logpdf(d, 4.5)
Inf
julia> logpdf(d, 5.0)
-Inf So one approach is just to say Dirac(x::Real) = Normal(x, zero(x)) |
Is it still interesting to define a Dirac struct in the repo ? One would only add the definition you propose and it would suffice |
There's an open PR, and I'm sure help getting it over the line would be appreciated :) https://github.com/JuliaStats/Distributions.jl/pull/861/files |
Closed
Fixed by #1231. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following this discussion, it appears the package could use a distribution that returns a fixed value.
In physics it is called a Dirac. It would be defined as
We should also add a multivariate equivalent where
T<:Array{<:Real}
The text was updated successfully, but these errors were encountered: