You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
m =@model X, s, t begin
p =size(X, 2) # number of features
β ~Normal(0, s) |>iid(p) # coefficients
σ ~HalfNormal(t) # dispersion
η = X * β # linear predictor
μ = η # `μ = g⁻¹(η) = η`
y ~For(eachindex(μ)) do j
Normal(μ[j], σ) # `Yᵢ ~ Normal(mean=μᵢ, variance=σ²)`endend;
Just want to be sure you know that we can now write this as
m =@model X, s, t begin
p =size(X, 2) # number of features
β ~Normal(0, s) |>iid(p) # coefficients
σ ~HalfNormal(t) # dispersion
η = X * β # linear predictor
μ = η # `μ = g⁻¹(η) = η`
y ~For(μ) do μⱼ
Normal(μⱼ, σ) # `Yᵢ ~ Normal(mean=μᵢ, variance=σ²)`endend;
or even
m =@model X, s, t begin
p =size(X, 2) # number of features
β ~Normal(0, s) |>iid(p) # coefficients
σ ~HalfNormal(t) # dispersion
η = X * β # linear predictor
μ = η # `μ = g⁻¹(η) = η`
y .~Normal.(μ,σ)
end;
The text was updated successfully, but these errors were encountered:
m =@model X,pool begin
n =size(X, 1) # number of observations
p =size(X, 2) # number of features
k =length(pool.levels) # number of classes
β ~Normal(0.0, 1.0) |>iid(p, k) # coefficients
η = X * β # linear predictor
μ = NNlib.softmax(η; dims=2) # μ = g⁻¹(η) = softmax(η)
y .~UnivariateFinite(pool.levels, μ; pool=pool)
end;
Hi @DilumAluthge , we currently have
Just want to be sure you know that we can now write this as
or even
The text was updated successfully, but these errors were encountered: