trace_plot¶
- trace_plot(posteriors: dict) None
Plots the traces and the probability density for each posterior. The plot shows the traces for each Markov chain, for each regression variable and the relative posterior density. The plot layout has number of rows equal to the number of regression variables and two columns: traces on the left and densities on the right.
Parameters¶
- posteriorsdict
Posterior samples. Posteriors and relative samples are key-value pairs. Each sample is a
numpy.ndarraywith a number of rows equal to the number of iterations and a number of columns equal to the number of Markov chains.
Raises¶
- TypeError
If
posteriorsis not adict,if a posterior sample is not a
numpy.ndarray.
- KeyError
If
posteriorsdoes not containinterceptkey.- ValueError
If a posterior sample is an empty
numpy.ndarray.
See Also¶