-
Notifications
You must be signed in to change notification settings - Fork 15
[Bug]: Mean/variance undefined for Uninformative() entries #588
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When expanding the documentation of RxInfer.jl with uninformative entries, I noticed that the basic beta-bernouilli example returns an error because the mean/variance of pointmasses of Uninformative() entries are not defined.
Expected Behavior
The inference call should complete without error.
Actual Behavior
The inference call stopped.
Minimal Reproducible Example or steps to reproduce the issue
@model function beta_bernoulli(y, a, b)
θ ~ Beta(a, b)
for i in 1:length(y)
y[i] ~ Bernoulli(θ)
end
end
result = infer(
model = beta_bernoulli(a = 1.0, b = 1.0),
data = (y = [ true, false, Uninformative(), true, false ], )
)
Error Message / Stack Trace
exception =
│ StackOverflowError:
│ Stacktrace:
│ [1] mean(itr::PointMass{Uninformative})
│ @ Statistics C:\Users\peter\.julia\packages\Statistics\gbcbG\src\Statistics.jl:44
│ [2] mean(fn::typeof(identity), distribution::PointMass{Uninformative})
│ @ BayesBase C:\Users\peter\.julia\packages\BayesBase\THarC\src\densities\pointmass.jl:29
│ --- the above 2 lines are repeated 39990 more times ---Julia Version
1.11
ReactiveMP Version
Latest stable
Environment Information
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog