Closed ismailsenoz closed 3 months ago
The projection for Bernoulli to Binomial is defined only for Binomial with number of trials 1.
julia> d = Binomial(2, 0.5)
Binomial{Float64}(n=2, p=0.5)
julia> rand(d, 2)
2-element Vector{Int64}:
2
1
julia> logpdf(Bernoulli(0.5), 2)
-Inf
Good catch! I pushed tests with conditioner equal to 1. They indeed pass.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.06%. Comparing base (
b46db83
) to head (d932d7a
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds projection tests for Binomial distribution. Simple projection and projection from Poisson to Binomial seems to work. ~However, projection from Bernoulli to Binomial with conditioner 2 is throwing NaN errors. That is why I put broken tests for that~