generate_mcmc_like_dataset

xarray_einstats.tutorial.generate_mcmc_like_dataset(seed=None)[source]

Generate a Dataset with multiple variables, some with dimensions from mcmc sampling.

Parameters:
seedint or sequence of int, optional

The random seed used to initialize numpy.random.default_rng.

Notes

This function is not part of the public API and is designed for use in our documentation. In addition to generating the data, it also sets display_expand_data=False to avoid taking too much virtual space with examples.

Examples

The dataset generated is the following:

from xarray_einstats import tutorial
tutorial.generate_mcmc_like_dataset(3)
<xarray.Dataset> Size: 6kB
Dimensions:  (plot_dim: 20, chain: 4, draw: 10, team: 6, match: 12)
Coordinates:
  * team     (team) <U1 24B 'a' 'b' 'c' 'd' 'e' 'f'
  * chain    (chain) int64 32B 0 1 2 3
  * draw     (draw) int64 80B 0 1 2 3 4 5 6 7 8 9
Dimensions without coordinates: plot_dim, match
Data variables:
    x_plot   (plot_dim) float64 160B 0.0 0.5263 1.053 1.579 ... 8.947 9.474 10.0
    mu       (chain, draw, team) float64 2kB 0.11 0.3897 1.4 ... 0.5328 0.3053
    sigma    (chain, draw) float64 320B 2.385 0.5272 1.184 ... 0.372 1.572
    score    (chain, draw, match) int64 4kB 2 2 0 0 2 2 1 0 ... 0 1 2 2 0 1 2 0