-
Notifications
You must be signed in to change notification settings - Fork 31
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
comprehension_expr for Categorical distributions #329
Comments
Very good suggestion! It is not list-comprehension, but a dictionary-comprehension. In blog, the list-comprehension is planned but not supported yet. If you plan to work on this, we would very welcome your contribute.
Alternatively, you donot really need dictionary-comprehension if your type Lei On Tue, Nov 4, 2014 at 10:34 PM, Karl Cronburg notifications@github.com
|
Thanks for the info! The example I had in mind is definitely closed domain - |
I would be interested in seeing a list-comprehension-like syntax for categorical distributions. For instance:
would create a distribution over cards
c
satisfyingbar(c) < limit
with probabilitiesfoo(c)
.The only other way I can think of to do this right now is with meta-programming in a general purpose language to generate the exhaustive list of categorical values and probabilities in the existing BLOG syntax. Is there an alternative I'm missing?
I tried adding a rule like
expression_pair:ep FOR type_var_lst:vars opt_colon_expr:condexpr
to thecomprehension_expr
grammar rule, where:but I couldn't get the compile & stage to notice my changes - I've never used sbt or jflex before, and don't really have time anytime soon to figure it out myself.
The text was updated successfully, but these errors were encountered: