quantified-uncertainty / squiggle

An estimation language
https://squiggle-language.com
MIT License
150 stars 23 forks source link

Don't allow sampling of non-normalized distributions #1907

Open OAGr opened 1 year ago

OAGr commented 1 year ago
a = normal(5,2) .+ uniform(8,30)
b = SampleSet.fromDist(a)

Sampling non-normalized pointset distributions is meaningless and easy to mess up. Arguably, these really aren't distributions, and should be appropriately named.

image image

Right now we have errors that many mx() distributions and similar are close to being normalized but not quite there. Ideally, we should fix this separately, or, if we decide that they're "close enough", then we should sample from them here.

berekuk commented 1 year ago

Related: #1734