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
In Julia, there are a few PPLs being developed, and we will be using two of them, Turing.l!jl and Soss.jl. We will be focusing on some examples to explain the general approach when using this tools.
Here we mention that we are going to use Soss.jl, but we ended up only using Turing.jl. This should be fixed unless we add Soss.jl to the chapter.
We should mention the libraries we are going to use beside Turing.jl and import them in the code. These libraries are:
Distributions: For everything related to the sampling from common probability distributions.
StatsPlots: For plotting distributions.
Turing (It was mentioned but not imported).
So the block:
using Distributions
using StatsPlots
using Turing
should be in some place at the beginning of the chapter.
The plotting code should be more consistent; for setting the labels we sometimes do that inside the plot() function with the xlabel and ylabel keyword arguments and sometimes we do it outside the plotting functions with the xlabel!() and ylabel!() calls. I think we should do it all inside. This should be done for all the plotting code of the chapter.
Change all this code:
begin
p_summary = chain[:p]
plot(p_summary, seriestype = :histogram, normed=true, legend=false, size=(500, 250), color="purple", alpha=0.7)
title!("Posterior distribution of p after getting tails")
ylabel!("Probability")
xlabel!("p")
end
to
histogram(chain[:p], xlabel="p", ylabel="Probability", title="Posterior distribution of p after getting tails")
Change this code:
begin
plots = histogram.(samples, normalized=true, legend=false, bins=10);
p_ = plot(plots[1], plots[2], plots[3], plots[4], plots[5], plots[6], plots[7],plots[8], plots[9], layout = 9 , title = ["$i outcomes" for j in 1:1, i in 2:10], titleloc = :right, titlefont = font(8))
end
to
plots = [histogram(samples[i], normalized=true, legend=false, bins=10, title="$(i+1) outcomes", titlefont = font(8)) for i in 1:9];
plot(plots...)
Change this code:
begin
plots_ = histogram.(samples_beta_prior, normalized=true, legend=false, bins=10, color="red", alpha=0.6);
p__ = plot(plots_[1], plots_[2], plots_[3], plots_[4], plots_[5], plots_[6], plots_[7], plots_[8], plots_[9], layout = 9, title = ["$i outcomes" for j in 1:1, i in 2:10], titleloc = :right, titlefont = font(8))
end
to
plots = [histogram(samples_beta_prior[i], normalized=true, legend=false, bins=10, title="$(i+1) outcomes", titlefont = font(10), color="red", alpha=0.6) for i in 1:9];
The text was updated successfully, but these errors were encountered:
Here we mention that we are going to use
Soss.jl
, but we ended up only usingTuring.jl
. This should be fixed unless we addSoss.jl
to the chapter.We should mention the libraries we are going to use beside
Turing.jl
and import them in the code. These libraries are:So the block:
should be in some place at the beginning of the chapter.
The plotting code should be more consistent; for setting the labels we sometimes do that inside the
plot()
function with thexlabel
andylabel
keyword arguments and sometimes we do it outside the plotting functions with thexlabel!()
andylabel!()
calls. I think we should do it all inside. This should be done for all the plotting code of the chapter.Change all this code:
to
Change this code:
to
Change this code:
to
The text was updated successfully, but these errors were encountered: