API
ChainsMakie.autocorplot
ChainsMakie.chainsbarplot
ChainsMakie.chainsdensity
ChainsMakie.chainshist
ChainsMakie.forestplot
ChainsMakie.meanplot
ChainsMakie.ridgeline
ChainsMakie.traceplot
ChainsMakie.trankplot
Makie.barplot
Makie.density
Makie.hist
Makie.plot
Makie.violin
ChainsMakie.autocorplot Method
autocorplot(chains)
autocorplot(chains, parameters)
autocorplot(matrix)
Plots the autocorrelations of the samples for each chain and parameter or for an iteration × chains matrix.
Specific attributes to autocorplot
are:
lags = 0:20
: The lags at which autocorrelations should be calculated.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
autocorplot(chains)
ChainsMakie.chainsbarplot Method
chainsbarplot(matrix)
Plots a barplot of the distribution of parameter samples given an integer-valued iteration × chain matrix.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
samples = reshape(repeat(1:4, 300 ÷ 4 * 3 * 3), (300, 3, 3))
chains = Chains(samples, [:A, :B, :C])
chainsbarplot(chains[:, :B, :])
ChainsMakie.chainsdensity Method
chainsdensity(matrix)
Plots the density of the samples for an iteration × chain matrix
.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
chainsdensity(chains[:, :B, :])
ChainsMakie.chainshist Method
chainshist(matrix)
Plots the histogram of the samples for an iteration × chain matrix
.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
chainshist(chains)
ChainsMakie.forestplot Method
forestplot(chains)
forestplot(chains, parameters)
forestplot(vector_of_vectors)
Plots a summary of the samples in chains
for each parameter by showing a point_summary
and the central interval containing a specified coverage
.
When passing a vector_of_vectors
, each vector should contain the samples from all chains for one parameter.
Specific attributes to forestplot
are:
ci = [0.95, 0.9]
: The central intervals used to summarize the samples for each parameter.point_summary = :median
: The function used to calculate the point summary; must return a single number.min_width = 4
: The width of the lines showing the widest interval.max_width = 8
: The width of the lines showing the narrowest interval.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
forestplot(chains)
ChainsMakie.meanplot Method
meanplot(chains)
meanplot(chains, parameters)
meanplot(matrix)
Plots the running average of the samples for each chain and parameter or for an iteration × chains matrix.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
meanplot(chains)
ChainsMakie.ridgeline Method
ridgeline(chains)
ridgeline(chains, parameters)
ridgeline(vector_of_vectors)
Plots the densities of the samples for each parameter in a single axis by stacking them vertically.
When passing a vector_of_vectors
, each vector should contain the samples from all chains for one parameter.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
ridgeline(chains)
ChainsMakie.traceplot Method
traceplot(chains)
traceplot(chains, parameters)
traceplot(matrix)
Plots the sampled values per iteration for each chain and parameter or for an iteration × chains matrix.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
traceplot(chains)
ChainsMakie.trankplot Method
trankplot(chains)
trankplot(chains, parameters)
trankplot(matrix)
Plots the binned ranks of sampled values for each chain and parameter or for an iteration × chains matrix.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
trankplot(chains)
Makie.barplot Method
barplot(chains)
barplot(chains, parameters)
Plots integer-valued samples for each chain and parameter in chains
.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
samples = reshape(repeat(1:4, 300 ÷ 4 * 3 * 3), (300, 3, 3))
chains = Chains(samples, [:A, :B, :C])
barplot(chains)
Makie.density Method
density(chains)
density(chains, parameters)
Plots the density of the samples for each chain and parameter.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
density(chains)
Makie.hist Method
hist(chains)
hist(chains, parameters)
Plots the histogram of the samples for each chain and parameter.
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
hist(chains)
Makie.plot Method
plot(chains)
plot(chains, parameters)
plot(chains, functions...)
plot(chains, parameters, functions...)
Plots a multi-column summary of all parameters, showing traceplots and densities.
When also passing a vector of parameters
as either strings or symbols, only those parameters will be visualized.
The kinds and number of summary plots can be fully customized by splatting several mutating functions...
. Currently supported functions are:
autocorplot!
chainsdensity!
chainshist!
meanplot!
traceplot!
trankplot!
Attributes
WIP
Example
using CairoMakie, ChainsMakie, MCMCChains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
plot(chains)
Makie.violin Method
violin(chains)
violin(chains, parameters)
Plots a violin plot of the distribution of samples for each of the parameter
in chains
.
Attributes
WIP
Example
using CairoMakie, ChainsMakie
import MCMCChains: Chains
chains = Chains(randn(300, 3, 3), [:A, :B, :C])
violin(chains)