J Jara-Ettinger, L Schulz, JB Tenenbaum (2015).
Zenna Tavares
Computer Assisted Programming Group (PI: Armando Solar Lezama)
Department of Brain and Cognitive Sciences
CSAIL
JuliaCon 6/25/2015
J Jara-Ettinger, L Schulz, JB Tenenbaum (2015).
λ = uniform(0,2) x1 = exponential(λ) x2 = exponential(λ) x3 = exponential(λ) observations = (x1 == 0.083) & (x2 == 0.55) & (x3 == 2.37) rand(λ, observations, 100)
λ = uniform(0,2) typeof(λ) => RandVar{Float64}
function λ(ω) = ω * 2 end # input ω ∈ [0, 1]
λ(0.1) => 0.2 # x is just a function
λ = randunif() λ(ω) => 0.6923295214 # to sample: call with uniformly sampled input
a = exponential(0.5); b = exponential(0.5) c = a + b typeof(c) => RandVar{Float64} rand(c, 5) => [3.425, 2.990, 9.670, 0.45759, 3.6357]
d = c + 100 typeof(d) => RandVar{Float64} rand(d, 5) => [104.883, 103.50, 100.50, 100.485, 100.549]
e = exponential(d) typeof(e) => RandVar{Float64} rand(e, 5) => [0.020, 0.0043, 0.00108, 0.0041, 0.0052]
rand(X::RandVar{T}, Y::RandVar{Bool}, n::Integer) = ...
type RandArray{T,N} <: DenseArray{RandVar{T},N} ...
λ = uniform(0,2) x = mvexponential(λ, 3) observations = x == [0.083, 0.55, 2.37] rand(x, observations, 100)
function rand(X::RandVar, Y::RandVar{Bool}) while true ω = rand_unif_vector() if Y(ω) return X(ω) end end end
function rand(X::RandVar, Y::RandVar{Bool}) while true ω = rand_unif_vector() if Y(ω) return X(ω) end end end
The Good
The Ugly
What is Probabilistic Programming?
Do we need new languages?
Contributors Welcome! - https://github.com/zenna/Sigma.jl