arviz.InferenceData.unstack — ArviZ 0.14.0 documentation (original) (raw)
InferenceData.unstack(dim=None, groups=None, filter_groups=None, inplace=False)[source]#
Perform an xarray unstacking on all groups.
Unstack existing dimensions corresponding to MultiIndexes into multiple new dimensions. Loops groups to perform Dataset.unstack(key=value). The selection is performed on all relevant groups (like posterior, prior, sample stats) while non relevant groups like observed data are omitted. See xarray.Dataset.unstack()
Parameters
dimHashable or iterable of Hashable, optional
Dimension(s) over which to unstack. By default unstacks all MultiIndexes.
groupsstr or list of str, optional
Groups where the selection is to be applied. Can either be group names or metagroup names.
filter_groups{None, “like”, “regex”}, optional
If None
(default), interpret groups as the real group or metagroup names. If “like”, interpret groups as substrings of the real group or metagroup names. If “regex”, interpret groups as regular expressions on the real group or metagroup names. A la pandas.filter
.
inplacebool, optional
If True
, modify the InferenceData object inplace, otherwise, return the modified copy.
Returns
InferenceData
A new InferenceData object by default. When inplace==True
perform selection in place and return None
See also
Unstack existing dimensions corresponding to MultiIndexes into multiple new dimensions.
Perform an xarray stacking on all groups of InferenceData object.
Examples
Use unstack
to unstack existing dimensions corresponding to MultiIndexes into multiple new dimensions. We first stack two dimensions c1
and c99
to z
:
import arviz as az import numpy as np datadict = { "a": np.random.randn(100), "b": np.random.randn(1, 100, 10), "c": np.random.randn(1, 100, 3, 4), } coords = { "c1": np.arange(3), "c99": np.arange(4), "b1": np.arange(10), } dims = {"c": ["c1", "c99"], "b": ["b1"]} idata = az.from_dict( posterior=datadict, posterior_predictive=datadict, coords=coords, dims=dims ) idata.stack(z=["c1", "c99"], inplace=True) idata
- posterior
<xarray.Dataset>
Dimensions: (chain: 1, draw: 100, b1: 10, z: 12)
Coordinates:- chain (chain) int64 0
- draw (draw) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 0 1 2 3 4 5 6 7 8 9
- z (z) object MultiIndex
- c1 (z) int64 0 0 0 0 1 1 1 1 2 2 2 2
- c99 (z) int64 0 1 2 3 0 1 2 3 0 1 2 3
Data variables:
a (chain, draw) float64 -2.68 0.5467 -1.011 ... -1.152 -0.01084
b (chain, draw, b1) float64 0.3065 -0.8422 -0.3263 ... -2.723 -0.6444
c (chain, draw, z) float64 0.02843 -0.4307 1.479 ... -0.08412 -0.8064
Attributes:
created_at: 2022-11-16T10:14:49.129354
arviz_version: 0.14.0- Dimensions:
* chain: 1
* draw: 100
* b1: 10
* z: 12 - Coordinates: (6)
* chain
(chain)
int64
0
* draw
(draw)
int64
0 1 2 3 4 5 6 ... 94 95 96 97 98 99
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99])
* b1
(b1)
int64
0 1 2 3 4 5 6 7 8 9
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
* z
(z)
object
MultiIndex
array([(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 0),
(2, 1), (2, 2), (2, 3)], dtype=object)
* c1
(z)
int64
0 0 0 0 1 1 1 1 2 2 2 2
array([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2])
* c99
(z)
int64
0 1 2 3 0 1 2 3 0 1 2 3
array([0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]) - Data variables: (3)
* a
(chain, draw)
float64
-2.68 0.5467 ... -1.152 -0.01084
array([[-2.67996575, 0.54671699, -1.01107829, -1.15717662, 1.80773173,
0.53197978, 0.61143797, 1.5574098 , -0.9583279 , 3.28632785,
-0.45040863, -0.26871754, -0.37044628, 0.39187621, 0.25754158,
-1.86184981, -1.38245623, -0.50781173, 1.74971647, 1.68954575,
-1.70949525, -1.64143732, 0.43667049, -0.12941964, -0.40166925,
0.2183123 , -1.91556507, -1.93601309, 0.12741605, -0.44112167,
0.19068194, 0.09840599, 0.1863909 , -0.45632865, -0.82790734,
0.28201322, -0.49019496, -0.66467092, -0.97364598, 0.18846566,
-0.10932028, 0.16343587, -2.743357 , -1.14188554, 0.90268129,
0.67786217, -0.57951993, -0.82106849, 2.23812406, -0.23744975,
1.09442033, 0.32911665, 1.02776625, -0.3831971 , 0.15329355,
0.64645657, -0.16381416, 1.15890649, -0.74108322, -0.4901621 ,
0.80756568, -0.51186649, -1.2030385 , -0.03978989, -0.39240038,
-1.35964728, -1.09572941, 0.57186156, -0.37303182, -0.91163113,
0.08007168, -0.42773679, 2.36511908, 0.88130161, 0.55004126,
1.1276661 , -0.56999164, 0.07457979, -0.86836816, -2.03945511,
1.01516924, -0.83915662, -0.24594692, 0.62777748, 1.15920374,
-1.32165981, -1.34040967, 0.84257265, -1.23430036, 0.62946611,
0.02553444, -1.35183564, 0.91373508, -0.3175774 , -0.13690377,
-0.26584863, -1.09974892, -0.76426728, -1.1522408 , -0.0108441 ]])
* b
(chain, draw, b1)
float64
0.3065 -0.8422 ... -2.723 -0.6444
array([[[ 3.06527752e-01, -8.42190714e-01, -3.26255681e-01,
-4.86928255e-01, -5.20114616e-01, 1.31514451e+00,
3.35368745e-01, 1.45262963e+00, 1.70344810e+00,
9.49346451e-01],
[ 1.98164638e-01, -2.23086082e+00, -1.06441862e+00,
1.32465872e-02, -1.59920928e+00, -3.59664671e-01,
2.63186158e-01, 1.28566746e+00, 2.81084216e-01,
2.00689002e+00],
[-6.82513939e-01, 2.09977903e+00, 1.07476586e+00,
3.01300858e-01, -4.07554433e-01, 3.82044249e-01,
-2.43129409e+00, 1.10177456e+00, -7.13526453e-01,
-4.46037244e-01],
[-6.34958633e-01, -1.14324680e+00, 1.73538165e+00,
3.29020266e-01, -7.79444867e-01, -1.00453227e+00,
1.77623701e-01, 3.15002019e-01, -6.37417686e-01,
-2.35142723e-01],
[ 2.15234473e-02, 6.34746312e-02, -3.30318451e-01,
8.34122104e-01, -1.62082406e-01, 1.00648233e+00,
-3.18089472e-01, -8.01935271e-01, -7.23269010e-01,
-1.91413757e+00],
...
[ 2.56214131e+00, -5.59055927e-01, -1.00851342e+00,
-7.09860011e-01, -6.38431768e-01, -1.04780176e-01,
-8.78954640e-01, 2.46718586e+00, 9.83408555e-01,
8.80929141e-01],
[ 4.87061895e-01, 7.54600927e-01, -1.80973105e-01,
-2.60626276e-01, 3.83161611e-01, -3.01536787e-01,
-1.54022847e+00, -1.11728993e+00, 7.75899313e-01,
1.74299293e-01],
[-1.35496674e-01, -3.96077049e-01, -1.16852895e+00,
-1.16714375e+00, -1.76467979e+00, 2.93656867e-01,
-4.55523030e-01, -2.76122515e-01, -1.10913605e+00,
-9.09707075e-01],
[ 2.83544015e+00, 4.53230673e-01, -1.49201318e+00,
-5.07109608e-01, -1.39653259e-01, -2.02161442e-01,
9.17819438e-01, 1.00051671e+00, -7.33894405e-01,
7.11268881e-01],
[ 4.14711602e-01, -7.78232692e-01, -1.09966965e+00,
-2.82209857e-01, -1.28466476e+00, 5.55340211e-01,
3.49001972e-01, -9.19923530e-02, -2.72321574e+00,
-6.44354733e-01]]])
* c
(chain, draw, z)
float64
0.02843 -0.4307 ... -0.8064
array([[[ 0.0284331 , -0.43069283, 1.47877544, ..., -0.51585226,
0.09229765, 0.79256174],
[ 0.69627288, 0.11084467, 0.8673181 , ..., 0.5619162 ,
1.05632607, -1.13466826],
[-0.07994639, 0.87718041, -0.87122286, ..., -0.51920968,
-0.24748006, 0.7833486 ],
...,
[-1.16012382, 0.46811048, 0.17667321, ..., 0.53340148,
0.35766583, -1.88848476],
[ 1.19638696, -1.31021254, 1.36722323, ..., 0.49279559,
1.50063708, 0.69866746],
[-0.55329812, -0.92018925, -0.91286036, ..., 1.07667242,
-0.08412271, -0.8063891 ]]]) - Indexes: (4)
* PandasIndex
PandasIndex(Int64Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Int64Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],
dtype='int64', name='draw'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='b1'))
* PandasMultiIndex
PandasIndex(MultiIndex([(0, 0),
(0, 1),
(0, 2),
(0, 3),
(1, 0),
(1, 1),
(1, 2),
(1, 3),
(2, 0),
(2, 1),
(2, 2),
(2, 3)],
name='z')) - Attributes: (2)
created_at :
2022-11-16T10:14:49.129354
arviz_version :
0.14.0
- Dimensions:
- posterior_predictive
<xarray.Dataset>
Dimensions: (chain: 1, draw: 100, b1: 10, z: 12)
Coordinates:- chain (chain) int64 0
- draw (draw) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 0 1 2 3 4 5 6 7 8 9
- z (z) object MultiIndex
- c1 (z) int64 0 0 0 0 1 1 1 1 2 2 2 2
- c99 (z) int64 0 1 2 3 0 1 2 3 0 1 2 3
Data variables:
a (chain, draw) float64 -2.68 0.5467 -1.011 ... -1.152 -0.01084
b (chain, draw, b1) float64 0.3065 -0.8422 -0.3263 ... -2.723 -0.6444
c (chain, draw, z) float64 0.02843 -0.4307 1.479 ... -0.08412 -0.8064
Attributes:
created_at: 2022-11-16T10:14:49.133447
arviz_version: 0.14.0- Dimensions:
* chain: 1
* draw: 100
* b1: 10
* z: 12 - Coordinates: (6)
* chain
(chain)
int64
0
* draw
(draw)
int64
0 1 2 3 4 5 6 ... 94 95 96 97 98 99
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99])
* b1
(b1)
int64
0 1 2 3 4 5 6 7 8 9
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
* z
(z)
object
MultiIndex
array([(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 0),
(2, 1), (2, 2), (2, 3)], dtype=object)
* c1
(z)
int64
0 0 0 0 1 1 1 1 2 2 2 2
array([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2])
* c99
(z)
int64
0 1 2 3 0 1 2 3 0 1 2 3
array([0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]) - Data variables: (3)
* a
(chain, draw)
float64
-2.68 0.5467 ... -1.152 -0.01084
array([[-2.67996575, 0.54671699, -1.01107829, -1.15717662, 1.80773173,
0.53197978, 0.61143797, 1.5574098 , -0.9583279 , 3.28632785,
-0.45040863, -0.26871754, -0.37044628, 0.39187621, 0.25754158,
-1.86184981, -1.38245623, -0.50781173, 1.74971647, 1.68954575,
-1.70949525, -1.64143732, 0.43667049, -0.12941964, -0.40166925,
0.2183123 , -1.91556507, -1.93601309, 0.12741605, -0.44112167,
0.19068194, 0.09840599, 0.1863909 , -0.45632865, -0.82790734,
0.28201322, -0.49019496, -0.66467092, -0.97364598, 0.18846566,
-0.10932028, 0.16343587, -2.743357 , -1.14188554, 0.90268129,
0.67786217, -0.57951993, -0.82106849, 2.23812406, -0.23744975,
1.09442033, 0.32911665, 1.02776625, -0.3831971 , 0.15329355,
0.64645657, -0.16381416, 1.15890649, -0.74108322, -0.4901621 ,
0.80756568, -0.51186649, -1.2030385 , -0.03978989, -0.39240038,
-1.35964728, -1.09572941, 0.57186156, -0.37303182, -0.91163113,
0.08007168, -0.42773679, 2.36511908, 0.88130161, 0.55004126,
1.1276661 , -0.56999164, 0.07457979, -0.86836816, -2.03945511,
1.01516924, -0.83915662, -0.24594692, 0.62777748, 1.15920374,
-1.32165981, -1.34040967, 0.84257265, -1.23430036, 0.62946611,
0.02553444, -1.35183564, 0.91373508, -0.3175774 , -0.13690377,
-0.26584863, -1.09974892, -0.76426728, -1.1522408 , -0.0108441 ]])
* b
(chain, draw, b1)
float64
0.3065 -0.8422 ... -2.723 -0.6444
array([[[ 3.06527752e-01, -8.42190714e-01, -3.26255681e-01,
-4.86928255e-01, -5.20114616e-01, 1.31514451e+00,
3.35368745e-01, 1.45262963e+00, 1.70344810e+00,
9.49346451e-01],
[ 1.98164638e-01, -2.23086082e+00, -1.06441862e+00,
1.32465872e-02, -1.59920928e+00, -3.59664671e-01,
2.63186158e-01, 1.28566746e+00, 2.81084216e-01,
2.00689002e+00],
[-6.82513939e-01, 2.09977903e+00, 1.07476586e+00,
3.01300858e-01, -4.07554433e-01, 3.82044249e-01,
-2.43129409e+00, 1.10177456e+00, -7.13526453e-01,
-4.46037244e-01],
[-6.34958633e-01, -1.14324680e+00, 1.73538165e+00,
3.29020266e-01, -7.79444867e-01, -1.00453227e+00,
1.77623701e-01, 3.15002019e-01, -6.37417686e-01,
-2.35142723e-01],
[ 2.15234473e-02, 6.34746312e-02, -3.30318451e-01,
8.34122104e-01, -1.62082406e-01, 1.00648233e+00,
-3.18089472e-01, -8.01935271e-01, -7.23269010e-01,
-1.91413757e+00],
...
[ 2.56214131e+00, -5.59055927e-01, -1.00851342e+00,
-7.09860011e-01, -6.38431768e-01, -1.04780176e-01,
-8.78954640e-01, 2.46718586e+00, 9.83408555e-01,
8.80929141e-01],
[ 4.87061895e-01, 7.54600927e-01, -1.80973105e-01,
-2.60626276e-01, 3.83161611e-01, -3.01536787e-01,
-1.54022847e+00, -1.11728993e+00, 7.75899313e-01,
1.74299293e-01],
[-1.35496674e-01, -3.96077049e-01, -1.16852895e+00,
-1.16714375e+00, -1.76467979e+00, 2.93656867e-01,
-4.55523030e-01, -2.76122515e-01, -1.10913605e+00,
-9.09707075e-01],
[ 2.83544015e+00, 4.53230673e-01, -1.49201318e+00,
-5.07109608e-01, -1.39653259e-01, -2.02161442e-01,
9.17819438e-01, 1.00051671e+00, -7.33894405e-01,
7.11268881e-01],
[ 4.14711602e-01, -7.78232692e-01, -1.09966965e+00,
-2.82209857e-01, -1.28466476e+00, 5.55340211e-01,
3.49001972e-01, -9.19923530e-02, -2.72321574e+00,
-6.44354733e-01]]])
* c
(chain, draw, z)
float64
0.02843 -0.4307 ... -0.8064
array([[[ 0.0284331 , -0.43069283, 1.47877544, ..., -0.51585226,
0.09229765, 0.79256174],
[ 0.69627288, 0.11084467, 0.8673181 , ..., 0.5619162 ,
1.05632607, -1.13466826],
[-0.07994639, 0.87718041, -0.87122286, ..., -0.51920968,
-0.24748006, 0.7833486 ],
...,
[-1.16012382, 0.46811048, 0.17667321, ..., 0.53340148,
0.35766583, -1.88848476],
[ 1.19638696, -1.31021254, 1.36722323, ..., 0.49279559,
1.50063708, 0.69866746],
[-0.55329812, -0.92018925, -0.91286036, ..., 1.07667242,
-0.08412271, -0.8063891 ]]]) - Indexes: (4)
* PandasIndex
PandasIndex(Int64Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Int64Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],
dtype='int64', name='draw'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='b1'))
* PandasMultiIndex
PandasIndex(MultiIndex([(0, 0),
(0, 1),
(0, 2),
(0, 3),
(1, 0),
(1, 1),
(1, 2),
(1, 3),
(2, 0),
(2, 1),
(2, 2),
(2, 3)],
name='z')) - Attributes: (2)
created_at :
2022-11-16T10:14:49.133447
arviz_version :
0.14.0
- Dimensions:
In order to unstack the dimension z
, we use:
idata.unstack(inplace=True) idata
- posterior
<xarray.Dataset>
Dimensions: (c1: 3, c99: 4, chain: 1, draw: 100, b1: 10)
Coordinates:- c1 (c1) int64 0 1 2
- c99 (c99) int64 0 1 2 3
- chain (chain) int64 0
- draw (draw) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 0 1 2 3 4 5 6 7 8 9
Data variables:
a (chain, draw) float64 -2.68 0.5467 -1.011 ... -1.152 -0.01084
b (chain, draw, b1) float64 0.3065 -0.8422 -0.3263 ... -2.723 -0.6444
c (chain, draw, c1, c99) float64 0.02843 -0.4307 ... -0.08412 -0.8064
Attributes:
created_at: 2022-11-16T10:14:49.129354
arviz_version: 0.14.0- Dimensions:
* c1: 3
* c99: 4
* chain: 1
* draw: 100
* b1: 10 - Coordinates: (5)
* c1
(c1)
int64
0 1 2
* c99
(c99)
int64
0 1 2 3
* chain
(chain)
int64
0
* draw
(draw)
int64
0 1 2 3 4 5 6 ... 94 95 96 97 98 99
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99])
* b1
(b1)
int64
0 1 2 3 4 5 6 7 8 9
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) - Data variables: (3)
* a
(chain, draw)
float64
-2.68 0.5467 ... -1.152 -0.01084
array([[-2.67996575, 0.54671699, -1.01107829, -1.15717662, 1.80773173,
0.53197978, 0.61143797, 1.5574098 , -0.9583279 , 3.28632785,
-0.45040863, -0.26871754, -0.37044628, 0.39187621, 0.25754158,
-1.86184981, -1.38245623, -0.50781173, 1.74971647, 1.68954575,
-1.70949525, -1.64143732, 0.43667049, -0.12941964, -0.40166925,
0.2183123 , -1.91556507, -1.93601309, 0.12741605, -0.44112167,
0.19068194, 0.09840599, 0.1863909 , -0.45632865, -0.82790734,
0.28201322, -0.49019496, -0.66467092, -0.97364598, 0.18846566,
-0.10932028, 0.16343587, -2.743357 , -1.14188554, 0.90268129,
0.67786217, -0.57951993, -0.82106849, 2.23812406, -0.23744975,
1.09442033, 0.32911665, 1.02776625, -0.3831971 , 0.15329355,
0.64645657, -0.16381416, 1.15890649, -0.74108322, -0.4901621 ,
0.80756568, -0.51186649, -1.2030385 , -0.03978989, -0.39240038,
-1.35964728, -1.09572941, 0.57186156, -0.37303182, -0.91163113,
0.08007168, -0.42773679, 2.36511908, 0.88130161, 0.55004126,
1.1276661 , -0.56999164, 0.07457979, -0.86836816, -2.03945511,
1.01516924, -0.83915662, -0.24594692, 0.62777748, 1.15920374,
-1.32165981, -1.34040967, 0.84257265, -1.23430036, 0.62946611,
0.02553444, -1.35183564, 0.91373508, -0.3175774 , -0.13690377,
-0.26584863, -1.09974892, -0.76426728, -1.1522408 , -0.0108441 ]])
* b
(chain, draw, b1)
float64
0.3065 -0.8422 ... -2.723 -0.6444
array([[[ 3.06527752e-01, -8.42190714e-01, -3.26255681e-01,
-4.86928255e-01, -5.20114616e-01, 1.31514451e+00,
3.35368745e-01, 1.45262963e+00, 1.70344810e+00,
9.49346451e-01],
[ 1.98164638e-01, -2.23086082e+00, -1.06441862e+00,
1.32465872e-02, -1.59920928e+00, -3.59664671e-01,
2.63186158e-01, 1.28566746e+00, 2.81084216e-01,
2.00689002e+00],
[-6.82513939e-01, 2.09977903e+00, 1.07476586e+00,
3.01300858e-01, -4.07554433e-01, 3.82044249e-01,
-2.43129409e+00, 1.10177456e+00, -7.13526453e-01,
-4.46037244e-01],
[-6.34958633e-01, -1.14324680e+00, 1.73538165e+00,
3.29020266e-01, -7.79444867e-01, -1.00453227e+00,
1.77623701e-01, 3.15002019e-01, -6.37417686e-01,
-2.35142723e-01],
[ 2.15234473e-02, 6.34746312e-02, -3.30318451e-01,
8.34122104e-01, -1.62082406e-01, 1.00648233e+00,
-3.18089472e-01, -8.01935271e-01, -7.23269010e-01,
-1.91413757e+00],
...
[ 2.56214131e+00, -5.59055927e-01, -1.00851342e+00,
-7.09860011e-01, -6.38431768e-01, -1.04780176e-01,
-8.78954640e-01, 2.46718586e+00, 9.83408555e-01,
8.80929141e-01],
[ 4.87061895e-01, 7.54600927e-01, -1.80973105e-01,
-2.60626276e-01, 3.83161611e-01, -3.01536787e-01,
-1.54022847e+00, -1.11728993e+00, 7.75899313e-01,
1.74299293e-01],
[-1.35496674e-01, -3.96077049e-01, -1.16852895e+00,
-1.16714375e+00, -1.76467979e+00, 2.93656867e-01,
-4.55523030e-01, -2.76122515e-01, -1.10913605e+00,
-9.09707075e-01],
[ 2.83544015e+00, 4.53230673e-01, -1.49201318e+00,
-5.07109608e-01, -1.39653259e-01, -2.02161442e-01,
9.17819438e-01, 1.00051671e+00, -7.33894405e-01,
7.11268881e-01],
[ 4.14711602e-01, -7.78232692e-01, -1.09966965e+00,
-2.82209857e-01, -1.28466476e+00, 5.55340211e-01,
3.49001972e-01, -9.19923530e-02, -2.72321574e+00,
-6.44354733e-01]]])
* c
(chain, draw, c1, c99)
float64
0.02843 -0.4307 ... -0.8064
array([[[[ 0.0284331 , -0.43069283, 1.47877544, 0.45292569],
[-0.41239471, 1.37963443, -1.27111845, 2.15893865],
[ 0.04517262, -0.51585226, 0.09229765, 0.79256174]],
[[ 0.69627288, 0.11084467, 0.8673181 , 0.00437462],
[ 0.83930075, 1.37299517, 0.60779849, -1.12783077],
[ 0.12207843, 0.5619162 , 1.05632607, -1.13466826]],
[[-0.07994639, 0.87718041, -0.87122286, -0.34899849],
[ 1.37664909, 0.13873904, 0.92841154, -1.16391511],
[-0.06556204, -0.51920968, -0.24748006, 0.7833486 ]],
...,
[[-1.16012382, 0.46811048, 0.17667321, -0.24483437],
[-0.28434338, 0.08714651, 0.29636341, 0.09922174],
[-1.65781153, 0.53340148, 0.35766583, -1.88848476]],
[[ 1.19638696, -1.31021254, 1.36722323, 0.23924873],
[-0.57563668, 1.02952721, 0.29087325, -1.50779772],
[-0.89460218, 0.49279559, 1.50063708, 0.69866746]],
[[-0.55329812, -0.92018925, -0.91286036, 0.30744453],
[ 0.78032827, -0.65594423, 0.54362994, 0.96564358],
[-1.03372192, 1.07667242, -0.08412271, -0.8063891 ]]]]) - Indexes: (5)
* PandasIndex
PandasIndex(Int64Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Int64Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],
dtype='int64', name='draw'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='b1'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2], dtype='int64', name='c1'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2, 3], dtype='int64', name='c99')) - Attributes: (2)
created_at :
2022-11-16T10:14:49.129354
arviz_version :
0.14.0
- Dimensions:
- posterior_predictive
<xarray.Dataset>
Dimensions: (c1: 3, c99: 4, chain: 1, draw: 100, b1: 10)
Coordinates:- c1 (c1) int64 0 1 2
- c99 (c99) int64 0 1 2 3
- chain (chain) int64 0
- draw (draw) int64 0 1 2 3 4 5 6 7 8 9 ... 90 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 0 1 2 3 4 5 6 7 8 9
Data variables:
a (chain, draw) float64 -2.68 0.5467 -1.011 ... -1.152 -0.01084
b (chain, draw, b1) float64 0.3065 -0.8422 -0.3263 ... -2.723 -0.6444
c (chain, draw, c1, c99) float64 0.02843 -0.4307 ... -0.08412 -0.8064
Attributes:
created_at: 2022-11-16T10:14:49.133447
arviz_version: 0.14.0- Dimensions:
* c1: 3
* c99: 4
* chain: 1
* draw: 100
* b1: 10 - Coordinates: (5)
* c1
(c1)
int64
0 1 2
* c99
(c99)
int64
0 1 2 3
* chain
(chain)
int64
0
* draw
(draw)
int64
0 1 2 3 4 5 6 ... 94 95 96 97 98 99
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99])
* b1
(b1)
int64
0 1 2 3 4 5 6 7 8 9
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) - Data variables: (3)
* a
(chain, draw)
float64
-2.68 0.5467 ... -1.152 -0.01084
array([[-2.67996575, 0.54671699, -1.01107829, -1.15717662, 1.80773173,
0.53197978, 0.61143797, 1.5574098 , -0.9583279 , 3.28632785,
-0.45040863, -0.26871754, -0.37044628, 0.39187621, 0.25754158,
-1.86184981, -1.38245623, -0.50781173, 1.74971647, 1.68954575,
-1.70949525, -1.64143732, 0.43667049, -0.12941964, -0.40166925,
0.2183123 , -1.91556507, -1.93601309, 0.12741605, -0.44112167,
0.19068194, 0.09840599, 0.1863909 , -0.45632865, -0.82790734,
0.28201322, -0.49019496, -0.66467092, -0.97364598, 0.18846566,
-0.10932028, 0.16343587, -2.743357 , -1.14188554, 0.90268129,
0.67786217, -0.57951993, -0.82106849, 2.23812406, -0.23744975,
1.09442033, 0.32911665, 1.02776625, -0.3831971 , 0.15329355,
0.64645657, -0.16381416, 1.15890649, -0.74108322, -0.4901621 ,
0.80756568, -0.51186649, -1.2030385 , -0.03978989, -0.39240038,
-1.35964728, -1.09572941, 0.57186156, -0.37303182, -0.91163113,
0.08007168, -0.42773679, 2.36511908, 0.88130161, 0.55004126,
1.1276661 , -0.56999164, 0.07457979, -0.86836816, -2.03945511,
1.01516924, -0.83915662, -0.24594692, 0.62777748, 1.15920374,
-1.32165981, -1.34040967, 0.84257265, -1.23430036, 0.62946611,
0.02553444, -1.35183564, 0.91373508, -0.3175774 , -0.13690377,
-0.26584863, -1.09974892, -0.76426728, -1.1522408 , -0.0108441 ]])
* b
(chain, draw, b1)
float64
0.3065 -0.8422 ... -2.723 -0.6444
array([[[ 3.06527752e-01, -8.42190714e-01, -3.26255681e-01,
-4.86928255e-01, -5.20114616e-01, 1.31514451e+00,
3.35368745e-01, 1.45262963e+00, 1.70344810e+00,
9.49346451e-01],
[ 1.98164638e-01, -2.23086082e+00, -1.06441862e+00,
1.32465872e-02, -1.59920928e+00, -3.59664671e-01,
2.63186158e-01, 1.28566746e+00, 2.81084216e-01,
2.00689002e+00],
[-6.82513939e-01, 2.09977903e+00, 1.07476586e+00,
3.01300858e-01, -4.07554433e-01, 3.82044249e-01,
-2.43129409e+00, 1.10177456e+00, -7.13526453e-01,
-4.46037244e-01],
[-6.34958633e-01, -1.14324680e+00, 1.73538165e+00,
3.29020266e-01, -7.79444867e-01, -1.00453227e+00,
1.77623701e-01, 3.15002019e-01, -6.37417686e-01,
-2.35142723e-01],
[ 2.15234473e-02, 6.34746312e-02, -3.30318451e-01,
8.34122104e-01, -1.62082406e-01, 1.00648233e+00,
-3.18089472e-01, -8.01935271e-01, -7.23269010e-01,
-1.91413757e+00],
...
[ 2.56214131e+00, -5.59055927e-01, -1.00851342e+00,
-7.09860011e-01, -6.38431768e-01, -1.04780176e-01,
-8.78954640e-01, 2.46718586e+00, 9.83408555e-01,
8.80929141e-01],
[ 4.87061895e-01, 7.54600927e-01, -1.80973105e-01,
-2.60626276e-01, 3.83161611e-01, -3.01536787e-01,
-1.54022847e+00, -1.11728993e+00, 7.75899313e-01,
1.74299293e-01],
[-1.35496674e-01, -3.96077049e-01, -1.16852895e+00,
-1.16714375e+00, -1.76467979e+00, 2.93656867e-01,
-4.55523030e-01, -2.76122515e-01, -1.10913605e+00,
-9.09707075e-01],
[ 2.83544015e+00, 4.53230673e-01, -1.49201318e+00,
-5.07109608e-01, -1.39653259e-01, -2.02161442e-01,
9.17819438e-01, 1.00051671e+00, -7.33894405e-01,
7.11268881e-01],
[ 4.14711602e-01, -7.78232692e-01, -1.09966965e+00,
-2.82209857e-01, -1.28466476e+00, 5.55340211e-01,
3.49001972e-01, -9.19923530e-02, -2.72321574e+00,
-6.44354733e-01]]])
* c
(chain, draw, c1, c99)
float64
0.02843 -0.4307 ... -0.8064
array([[[[ 0.0284331 , -0.43069283, 1.47877544, 0.45292569],
[-0.41239471, 1.37963443, -1.27111845, 2.15893865],
[ 0.04517262, -0.51585226, 0.09229765, 0.79256174]],
[[ 0.69627288, 0.11084467, 0.8673181 , 0.00437462],
[ 0.83930075, 1.37299517, 0.60779849, -1.12783077],
[ 0.12207843, 0.5619162 , 1.05632607, -1.13466826]],
[[-0.07994639, 0.87718041, -0.87122286, -0.34899849],
[ 1.37664909, 0.13873904, 0.92841154, -1.16391511],
[-0.06556204, -0.51920968, -0.24748006, 0.7833486 ]],
...,
[[-1.16012382, 0.46811048, 0.17667321, -0.24483437],
[-0.28434338, 0.08714651, 0.29636341, 0.09922174],
[-1.65781153, 0.53340148, 0.35766583, -1.88848476]],
[[ 1.19638696, -1.31021254, 1.36722323, 0.23924873],
[-0.57563668, 1.02952721, 0.29087325, -1.50779772],
[-0.89460218, 0.49279559, 1.50063708, 0.69866746]],
[[-0.55329812, -0.92018925, -0.91286036, 0.30744453],
[ 0.78032827, -0.65594423, 0.54362994, 0.96564358],
[-1.03372192, 1.07667242, -0.08412271, -0.8063891 ]]]]) - Indexes: (5)
* PandasIndex
PandasIndex(Int64Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Int64Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],
dtype='int64', name='draw'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='b1'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2], dtype='int64', name='c1'))
* PandasIndex
PandasIndex(Int64Index([0, 1, 2, 3], dtype='int64', name='c99')) - Attributes: (2)
created_at :
2022-11-16T10:14:49.133447
arviz_version :
0.14.0
- Dimensions: