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

simple_predictive_sample_unobserved draws randomly even for constrained columns #34

Closed
riastradh-probcomp opened this issue May 28, 2015 · 3 comments

Comments

@riastradh-probcomp
Copy link
Contributor

If you constrain column 3 to be 42, and sample column 3, Crosscat draws randomly instead of returning 42 as one might expect. This results in strange results in bayesdb like:

bayeslite> SIMULATE Murder FROM states_cc GIVEN Murder = 1 LIMIT 4;
Murder
-------------
2.96562662884
9.17781629692
4.15232993703
2.88644682395
@riastradh-probcomp
Copy link
Contributor Author

There is a candidate fix in the 20150924-riastradh-drawconstraint branch, to force a particular value and not just a particular cluster from which to draw in simple_predictive_sample_unobserved, with an OK from @axch. What remains:

  • Automatic test (probably easiest written in bayeslite)
  • Determine whether the same issue applies in simple_predictive_sample_observed.

I suspect it doesn't matter for observed rows, because we never ask PREDICT x GIVEN x = 0 expecting it to give 0; in fact bayeslite PREDICT explicitly omits any current value for the requested column in the constraints. But I'm not sure there is no application of simple_predictive_sample_observed for which you might pass a constraint that you're asking about.

@riastradh-probcomp
Copy link
Contributor Author

20150924-riastradh-drawconstraint now addresses simple_predictive_sample_observed with an essay arguing why this is not sensible and inviting arguments to the contrary before we reject such queries.

@riastradh-probcomp
Copy link
Contributor Author

Fixed in v0.1.29, abc491c.

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

No branches or pull requests

2 participants