-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Labels
quick-winpick these offpick these off
Description
Hi,
with regard to distributions from which to sample in a model, the Guide states:
distr
can be a value of any type that implementsrand(distr)
, which samples a value from the distributiondistr
.
I have a set of samples from which I want to derive a distribution to sample from and use KernelDensityEstimate.jl
to build a KDE from which one can sample using rand()
.
This returns a 1x1 Matrix, funny enough, but I wrapped the KDE in my own struct and defined the method Random.rand()
such that it returns a float. It still does not work, I get the error:
ERROR: ArgumentError: the right-hand side of a `~` must be a `Distribution` or an array of `Distribution`s
From the Guide I was pretty sure my approach should work. Is the Guide wrong or is this a misunderstanding?
Thank you!
Turing v0.24.0, DynamicPPL v0.21.6, Julia 1.8.5
mchitre
Metadata
Metadata
Assignees
Labels
quick-winpick these offpick these off