Omega.jl icon indicating copy to clipboard operation
Omega.jl copied to clipboard

Expand the types of things that can be ids

Open zenna opened this issue 4 years ago • 0 comments

Currently, in #lang, we are using integer and integer like types for indices. It makes sense to broaden these to basically any type, e.g.:

:name ~ Normal(0, 1)

This will allow us to index into the space of random variables using any type. One consequence is that we'll be able to do what mem is currently doing in other PPLs without any additional machinery. For instance if we want a strength random variable that depends on a person as in the Tug-of-War example from https://probmods.org/chapters/conditioning.html, we'd simply do

strength(person) = person ~ TruncatedNormal(1, 1, 0, Inf)

zenna avatar Dec 03 '21 02:12 zenna