@@ -125,15 +125,15 @@ Evaluation in transformed space of course also works:
125125
126126```jldoctest simplevarinfo-general
127127julia> vi = DynamicPPL.settrans!!(SimpleVarInfo((x = -1.0,)), true)
128- Transformed SimpleVarInfo((x = -1.0,), (LogLikelihood = LogLikelihoodAccumulator (0.0), LogPrior = LogPriorAccumulator (0.0)))
128+ Transformed SimpleVarInfo((x = -1.0,), (LogPrior = LogPriorAccumulator (0.0), LogLikelihood = LogLikelihoodAccumulator (0.0), NumProduce = NumProduceAccumulator( 0)))
129129
130130julia> # (✓) Positive probability mass on negative numbers!
131131 getlogjoint(last(DynamicPPL.evaluate!!(m, vi, DynamicPPL.DefaultContext())))
132132-1.3678794411714423
133133
134134julia> # While if we forget to indicate that it's transformed:
135135 vi = DynamicPPL.settrans!!(SimpleVarInfo((x = -1.0,)), false)
136- SimpleVarInfo((x = -1.0,), (LogLikelihood = LogLikelihoodAccumulator (0.0), LogPrior = LogPriorAccumulator (0.0)))
136+ SimpleVarInfo((x = -1.0,), (LogPrior = LogPriorAccumulator (0.0), LogLikelihood = LogLikelihoodAccumulator (0.0), NumProduce = NumProduceAccumulator( 0)))
137137
138138julia> # (✓) No probability mass on negative numbers!
139139 getlogjoint(last(DynamicPPL.evaluate!!(m, vi, DynamicPPL.DefaultContext())))
@@ -204,9 +204,7 @@ function SimpleVarInfo(values, accs)
204204 return SimpleVarInfo (values, accs, NoTransformation ())
205205end
206206function SimpleVarInfo {T} (values) where {T<: Real }
207- return SimpleVarInfo (
208- values, AccumulatorTuple (LogLikelihoodAccumulator {T} (), LogPriorAccumulator {T} ())
209- )
207+ return SimpleVarInfo (values, default_accumulators ())
210208end
211209function SimpleVarInfo (values)
212210 return SimpleVarInfo {LogProbType} (values)
0 commit comments