probcomp / bayeslite

BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.
http://probcomp.csail.mit.edu/software/bayesdb
Apache License 2.0
922 stars 64 forks source link

Add optional `CONDITIONAL` keyword for `SIMULATE MUTUAL INFORMATION` #514

Open versar opened 7 years ago

versar commented 7 years ago

@fsaad cc @vkm Hi Feras, I am getting an error on some syntax from the appendix of your recent paper. I was wondering if you could help me debug when you have a moment. Here is the code I am running: ⁠⁠⁠⁠%bql SIMULATE CONDITIONAL MUTUAL INFORMATION OF (gmraw, elraw) WITH vrraw GIVEN (drain_ext_dic) USING 10 SAMPLES FROM MODELS OF bangladesh_all_data_pop⁠⁠⁠⁠ .

@vsw try the query without ⁠⁠⁠⁠CONDITIONAL ⁠⁠⁠⁠. %bql SIMULATE MUTUAL INFORMATION OF (gmraw, elraw) WITH vrraw GIVEN (drain_ext_dic) USING 10 SAMPLES FROM MODELS OF bangladesh_all_data_pop @vsw if that resolves the issue please also file a ticket in the Github tracker reminding to add an (optional) ⁠⁠⁠⁠CONDITIONAL⁠⁠⁠⁠ keyword.

@vsw right, the BQL grammar allows univariate targets and multivariate conditionals -- please also a file ticket asking to activate the multivariate targets. I can't remember why I didn't implement it from the front-end. @vsw I recall I wasn't sure at the time whether we were going to rewrite the entire BQL grammar/parser/compiler. But it should be straightforward to extend the grammar for multivariate targets.