probmods / webppl-viz

Visualization for WebPPL
http://probmods.github.io/webppl-viz/
Other
14 stars 9 forks source link

Don't render bad charts? #12

Open longouyang opened 8 years ago

longouyang commented 8 years ago

the user probably doesn't intend to do something like hist(repeat(1e5, gaussian)) (every value is unique, so histogram isn't a good summary)...

mhtess commented 8 years ago

Or can you use a default binwidth option?

On Feb 12, 2016, at 17:19, Long Ouyang notifications@github.com<mailto:notifications@github.com> wrote:

the user probably doesn't intend to do something like hist(repeat(1e5, gaussian)) (every value is unique, so histogram isn't a good summary)...

Reply to this email directly or view it on GitHubhttps://github.com/probmods/webppl-viz/issues/12.

longouyang commented 8 years ago

I guess this issue is more food for thought than a pressing problem that I'm likely to address soon.

For instance, your binwidth suggestion works for continuous values but what if my distribution is discrete (e.g., sampling 10k words from the English language)? Or a mixture of a discrete and continuous?

I think ultimately an intelligent plotting system needs rich understanding of types and possibly pragmatic inference; here, I'm starting to write down examples that motivate this (e.g., this hist problem).