@@ -131,20 +131,19 @@ end
131131 params,
132132 ) -> T
133133
134- Draw a sample from the joint distribution specified by `model` conditioned on the values in
135- `params`.
134+ Draw a sample from the predictive distribution specified by `model` with its parameters fixed to `params`.
136135
137136The sample will be returned as format specified by `T`.
138137"""
139- function StatsBase. predict (rand :: AbstractRNG , T:: Type , model:: AbstractProbabilisticProgram , params)
140- return rand (rng, T, condition (model, params))
138+ function StatsBase. predict (rng :: AbstractRNG , T:: Type , model:: AbstractProbabilisticProgram , params)
139+ return rand (rng, T, fix (model, params))
141140end
142141function StatsBase. predict (T:: Type , model:: AbstractProbabilisticProgram , params)
143142 return StatsBase. predict (Random. default_rng (), T, model, params)
144143end
145144function StatsBase. predict (model:: AbstractProbabilisticProgram , params)
146145 return StatsBase. predict (NamedTuple, model, params)
147146end
148- function StatsBase. predict (rng:: AbstractRNG , params)
147+ function StatsBase. predict (rng:: AbstractRNG , T :: Type , model :: AbstractProbabilisticProgram , params)
149148 return StatsBase. predict (rng, NamedTuple, model, params)
150149end
0 commit comments