Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live-update histograms for query results #19

Open
ngoodman opened this issue Sep 20, 2013 · 3 comments
Open

Live-update histograms for query results #19

ngoodman opened this issue Sep 20, 2013 · 3 comments

Comments

@ngoodman
Copy link
Contributor

Have a flag to or variant of mh-query and rejection-query that makes a histogram of samples and updates it on each sample. This can be done by extending probabilistic-js inference routines to take a listener function (which is called when a sample is taken), and then creating a listener that calls the _hist vizualization tool.

@ngoodman
Copy link
Contributor Author

ngoodman commented Nov 5, 2013

I think a better solution is to have hist and other viz routines (optionally) take a thunk (instead of a list of data points). This thunk is a data stream, so this hist routine repeatedly asks for the next data point and updates the histogram, until some special 'nomoredata' object is returned.

This will interface nicely with the switch from diverse query forms to a unified conditional formthat returns a thunk (that samples from the conditional distribution).

@longouyang
Copy link
Member

Writing down our discussion today: the new conditional semantics might have performance issues, but it's an empirical question

@longouyang longouyang reopened this Nov 5, 2013
@longouyang
Copy link
Member

Also, re new conditional semantics: proposals for new versions of Javascript (ECMAscript 6) include support for iterators/generators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants