arviz.InferenceData.unstack — ArviZ dev 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:
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> Size: 20kB
Dimensions: (chain: 1, draw: 100, b1: 10, z: 12)
Coordinates:- chain (chain) int64 8B 0
- draw (draw) int64 800B 0 1 2 3 4 5 6 7 8 ... 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 80B 0 1 2 3 4 5 6 7 8 9
- z (z) object 96B MultiIndex
- c1 (z) int64 96B 0 0 0 0 1 1 1 1 2 2 2 2
- c99 (z) int64 96B 0 1 2 3 0 1 2 3 0 1 2 3
Data variables:
a (chain, draw) float64 800B -2.559 0.1125 0.01386 ... 1.282 -0.8526
b (chain, draw, b1) float64 8kB 0.2069 -0.268 1.293 ... 1.623 -0.1557
c (chain, draw, z) float64 10kB -1.06 0.02003 1.642 ... 1.123 -0.7974
Attributes:
created_at: 2025-05-27T21:35:38.544549+00:00
arviz_version: 0.22.0dev- 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.559 0.1125 ... 1.282 -0.8526
array([[-2.55883647, 0.11245795, 0.01386183, 0.63983345, 2.16315229,
-2.40579955, 0.48997012, -0.80025424, 0.09236681, -0.684147 ,
-0.93420935, 0.63964169, -0.80418161, -0.32211441, -0.4295091 ,
-0.90632308, 0.66635211, -0.41685641, 1.74123309, -1.42160305,
1.20804435, 1.41400101, -0.0460607 , -0.86728249, -0.75782548,
-0.21979324, -0.2103059 , -0.52558061, 0.42120688, 0.93753371,
-1.36808991, -0.22159933, -0.70667174, -1.53700068, 0.63801015,
-0.98434421, -1.88791879, -0.46837856, 0.67355985, -1.23984302,
-0.92963713, -1.70378528, 0.2835394 , 1.13188231, -0.12554308,
-1.04817408, 1.66858905, 2.31291717, -0.30111609, -0.77062893,
-0.65139849, 2.27356869, 0.05052243, 0.28351448, 1.03158787,
-0.16969894, 1.81191937, 0.95985419, 0.60800894, 0.42458729,
1.07704278, -0.92228695, -1.22002155, 0.22127286, -0.71017445,
-0.15299146, -0.90966984, 0.12415695, -0.07057038, -0.28543899,
-0.84264902, -0.11572398, -1.15934036, -1.20995069, 0.88341935,
0.23550364, -1.61181153, 1.15561627, 1.00106112, -0.0589006 ,
0.33234427, 0.9847089 , 0.82181549, -0.01311455, 0.03141085,
0.17525267, 0.15609704, -0.79011526, 0.65065048, -0.55208353,
0.4938309 , 0.52501549, -0.37572429, -1.5168802 , -1.10888143,
0.15559037, -0.66681147, 0.53816092, 1.28208695, -0.85264732]])
* b
(chain, draw, b1)
float64
0.2069 -0.268 ... 1.623 -0.1557
array([[[ 2.06926943e-01, -2.68004854e-01, 1.29313406e+00,
-4.58843389e-01, -3.16458636e-01, -2.10167989e-01,
-7.45115296e-01, 4.02577914e-01, 9.31653608e-01,
-1.03959073e-02],
[ 1.76756924e+00, -3.22196403e-01, 1.67719763e+00,
9.17321263e-01, 1.09123867e+00, 2.65239920e-01,
1.76183331e-01, 6.80713171e-01, -1.28320573e+00,
-5.94475040e-01],
[ 6.66200719e-01, -6.97727411e-01, -2.26908829e-01,
1.97447588e+00, 6.50076639e-01, 4.93832899e-01,
5.72420513e-02, 1.33551601e+00, 7.20435477e-01,
-9.91541106e-01],
[ 6.69531669e-01, 2.04635788e-01, 7.86621886e-01,
-8.54028225e-01, -1.42642870e+00, -4.45353697e-01,
-3.09969763e-01, 9.21997329e-01, 6.10787194e-01,
-3.34000909e-01],
[ 3.99857104e-01, 2.50747081e-01, -7.90772025e-01,
-2.30473624e-01, 4.62072424e-01, -6.99625161e-02,
2.46335670e+00, -8.23352420e-01, -6.83761988e-01,
-1.16898872e-01],
...
[-1.36438057e+00, -8.00418059e-01, -1.33259467e+00,
5.98047657e-01, -9.12307686e-01, -1.14965298e+00,
5.90459078e-01, 1.06791845e+00, 6.75497991e-01,
-1.14363782e+00],
[ 1.20092314e-02, 1.17713648e+00, -2.05936539e-01,
1.01002410e+00, -3.59234125e-01, -5.02852457e-01,
9.56686468e-01, 1.29332935e+00, 6.47868416e-01,
3.94673174e-01],
[-7.16112805e-01, 3.60224397e-01, -3.52832338e-01,
-1.84926665e+00, -2.18106573e+00, -9.36550294e-02,
3.44553395e-01, -9.16989521e-01, -2.06790353e+00,
-6.18920499e-01],
[ 7.72808311e-01, 4.38982595e-01, 1.35528477e+00,
-1.19635901e+00, 1.91639277e+00, 9.58725041e-02,
8.21266599e-01, 1.54082502e+00, 5.01457147e-02,
9.37949891e-01],
[-3.34581034e-02, -2.75344335e-02, -1.58128989e-01,
-2.22213892e+00, -3.92240228e-01, -1.33860690e+00,
1.26880180e+00, -7.57444974e-01, 1.62319372e+00,
-1.55679508e-01]]])
* c
(chain, draw, z)
float64
-1.06 0.02003 ... 1.123 -0.7974
array([[[-1.05967401, 0.02002945, 1.64182735, ..., 1.36712159,
-0.32414334, -0.38522292],
[-0.23788166, -1.07901428, 0.59759602, ..., -1.7025859 ,
1.06015695, 0.71741589],
[-0.70833586, -0.08503315, -1.27027003, ..., 0.35951961,
-0.48345742, -0.48626736],
...,
[-0.31899191, -1.06340683, -0.36828309, ..., 0.99791691,
-0.70902635, -2.00941202],
[ 0.05862946, 2.01865041, 1.76779448, ..., 0.70255064,
0.71100663, 0.74436673],
[-0.88429673, -1.17343939, 0.19758123, ..., -1.19676186,
1.12322228, -0.79737025]]], shape=(1, 100, 12)) - Indexes: (4)
* PandasIndex
PandasIndex(Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Index([ 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(Index([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 :
2025-05-27T21:35:38.544549+00:00
arviz_version :
0.22.0dev
- Dimensions:
- posterior_predictive
<xarray.Dataset> Size: 20kB
Dimensions: (chain: 1, draw: 100, b1: 10, z: 12)
Coordinates:- chain (chain) int64 8B 0
- draw (draw) int64 800B 0 1 2 3 4 5 6 7 8 ... 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 80B 0 1 2 3 4 5 6 7 8 9
- z (z) object 96B MultiIndex
- c1 (z) int64 96B 0 0 0 0 1 1 1 1 2 2 2 2
- c99 (z) int64 96B 0 1 2 3 0 1 2 3 0 1 2 3
Data variables:
a (chain, draw) float64 800B -2.559 0.1125 0.01386 ... 1.282 -0.8526
b (chain, draw, b1) float64 8kB 0.2069 -0.268 1.293 ... 1.623 -0.1557
c (chain, draw, z) float64 10kB -1.06 0.02003 1.642 ... 1.123 -0.7974
Attributes:
created_at: 2025-05-27T21:35:38.546696+00:00
arviz_version: 0.22.0dev- 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.559 0.1125 ... 1.282 -0.8526
array([[-2.55883647, 0.11245795, 0.01386183, 0.63983345, 2.16315229,
-2.40579955, 0.48997012, -0.80025424, 0.09236681, -0.684147 ,
-0.93420935, 0.63964169, -0.80418161, -0.32211441, -0.4295091 ,
-0.90632308, 0.66635211, -0.41685641, 1.74123309, -1.42160305,
1.20804435, 1.41400101, -0.0460607 , -0.86728249, -0.75782548,
-0.21979324, -0.2103059 , -0.52558061, 0.42120688, 0.93753371,
-1.36808991, -0.22159933, -0.70667174, -1.53700068, 0.63801015,
-0.98434421, -1.88791879, -0.46837856, 0.67355985, -1.23984302,
-0.92963713, -1.70378528, 0.2835394 , 1.13188231, -0.12554308,
-1.04817408, 1.66858905, 2.31291717, -0.30111609, -0.77062893,
-0.65139849, 2.27356869, 0.05052243, 0.28351448, 1.03158787,
-0.16969894, 1.81191937, 0.95985419, 0.60800894, 0.42458729,
1.07704278, -0.92228695, -1.22002155, 0.22127286, -0.71017445,
-0.15299146, -0.90966984, 0.12415695, -0.07057038, -0.28543899,
-0.84264902, -0.11572398, -1.15934036, -1.20995069, 0.88341935,
0.23550364, -1.61181153, 1.15561627, 1.00106112, -0.0589006 ,
0.33234427, 0.9847089 , 0.82181549, -0.01311455, 0.03141085,
0.17525267, 0.15609704, -0.79011526, 0.65065048, -0.55208353,
0.4938309 , 0.52501549, -0.37572429, -1.5168802 , -1.10888143,
0.15559037, -0.66681147, 0.53816092, 1.28208695, -0.85264732]])
* b
(chain, draw, b1)
float64
0.2069 -0.268 ... 1.623 -0.1557
array([[[ 2.06926943e-01, -2.68004854e-01, 1.29313406e+00,
-4.58843389e-01, -3.16458636e-01, -2.10167989e-01,
-7.45115296e-01, 4.02577914e-01, 9.31653608e-01,
-1.03959073e-02],
[ 1.76756924e+00, -3.22196403e-01, 1.67719763e+00,
9.17321263e-01, 1.09123867e+00, 2.65239920e-01,
1.76183331e-01, 6.80713171e-01, -1.28320573e+00,
-5.94475040e-01],
[ 6.66200719e-01, -6.97727411e-01, -2.26908829e-01,
1.97447588e+00, 6.50076639e-01, 4.93832899e-01,
5.72420513e-02, 1.33551601e+00, 7.20435477e-01,
-9.91541106e-01],
[ 6.69531669e-01, 2.04635788e-01, 7.86621886e-01,
-8.54028225e-01, -1.42642870e+00, -4.45353697e-01,
-3.09969763e-01, 9.21997329e-01, 6.10787194e-01,
-3.34000909e-01],
[ 3.99857104e-01, 2.50747081e-01, -7.90772025e-01,
-2.30473624e-01, 4.62072424e-01, -6.99625161e-02,
2.46335670e+00, -8.23352420e-01, -6.83761988e-01,
-1.16898872e-01],
...
[-1.36438057e+00, -8.00418059e-01, -1.33259467e+00,
5.98047657e-01, -9.12307686e-01, -1.14965298e+00,
5.90459078e-01, 1.06791845e+00, 6.75497991e-01,
-1.14363782e+00],
[ 1.20092314e-02, 1.17713648e+00, -2.05936539e-01,
1.01002410e+00, -3.59234125e-01, -5.02852457e-01,
9.56686468e-01, 1.29332935e+00, 6.47868416e-01,
3.94673174e-01],
[-7.16112805e-01, 3.60224397e-01, -3.52832338e-01,
-1.84926665e+00, -2.18106573e+00, -9.36550294e-02,
3.44553395e-01, -9.16989521e-01, -2.06790353e+00,
-6.18920499e-01],
[ 7.72808311e-01, 4.38982595e-01, 1.35528477e+00,
-1.19635901e+00, 1.91639277e+00, 9.58725041e-02,
8.21266599e-01, 1.54082502e+00, 5.01457147e-02,
9.37949891e-01],
[-3.34581034e-02, -2.75344335e-02, -1.58128989e-01,
-2.22213892e+00, -3.92240228e-01, -1.33860690e+00,
1.26880180e+00, -7.57444974e-01, 1.62319372e+00,
-1.55679508e-01]]])
* c
(chain, draw, z)
float64
-1.06 0.02003 ... 1.123 -0.7974
array([[[-1.05967401, 0.02002945, 1.64182735, ..., 1.36712159,
-0.32414334, -0.38522292],
[-0.23788166, -1.07901428, 0.59759602, ..., -1.7025859 ,
1.06015695, 0.71741589],
[-0.70833586, -0.08503315, -1.27027003, ..., 0.35951961,
-0.48345742, -0.48626736],
...,
[-0.31899191, -1.06340683, -0.36828309, ..., 0.99791691,
-0.70902635, -2.00941202],
[ 0.05862946, 2.01865041, 1.76779448, ..., 0.70255064,
0.71100663, 0.74436673],
[-0.88429673, -1.17343939, 0.19758123, ..., -1.19676186,
1.12322228, -0.79737025]]], shape=(1, 100, 12)) - Indexes: (4)
* PandasIndex
PandasIndex(Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Index([ 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(Index([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 :
2025-05-27T21:35:38.546696+00:00
arviz_version :
0.22.0dev
- Dimensions:
In order to unstack the dimension z
, we use:
idata.unstack(inplace=True) idata
- posterior
<xarray.Dataset> Size: 19kB
Dimensions: (c1: 3, c99: 4, chain: 1, draw: 100, b1: 10)
Coordinates:- c1 (c1) int64 24B 0 1 2
- c99 (c99) int64 32B 0 1 2 3
- chain (chain) int64 8B 0
- draw (draw) int64 800B 0 1 2 3 4 5 6 7 8 ... 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 80B 0 1 2 3 4 5 6 7 8 9
Data variables:
a (chain, draw) float64 800B -2.559 0.1125 0.01386 ... 1.282 -0.8526
b (chain, draw, b1) float64 8kB 0.2069 -0.268 1.293 ... 1.623 -0.1557
c (chain, draw, c1, c99) float64 10kB -1.06 0.02003 ... 1.123 -0.7974
Attributes:
created_at: 2025-05-27T21:35:38.544549+00:00
arviz_version: 0.22.0dev- 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.559 0.1125 ... 1.282 -0.8526
array([[-2.55883647, 0.11245795, 0.01386183, 0.63983345, 2.16315229,
-2.40579955, 0.48997012, -0.80025424, 0.09236681, -0.684147 ,
-0.93420935, 0.63964169, -0.80418161, -0.32211441, -0.4295091 ,
-0.90632308, 0.66635211, -0.41685641, 1.74123309, -1.42160305,
1.20804435, 1.41400101, -0.0460607 , -0.86728249, -0.75782548,
-0.21979324, -0.2103059 , -0.52558061, 0.42120688, 0.93753371,
-1.36808991, -0.22159933, -0.70667174, -1.53700068, 0.63801015,
-0.98434421, -1.88791879, -0.46837856, 0.67355985, -1.23984302,
-0.92963713, -1.70378528, 0.2835394 , 1.13188231, -0.12554308,
-1.04817408, 1.66858905, 2.31291717, -0.30111609, -0.77062893,
-0.65139849, 2.27356869, 0.05052243, 0.28351448, 1.03158787,
-0.16969894, 1.81191937, 0.95985419, 0.60800894, 0.42458729,
1.07704278, -0.92228695, -1.22002155, 0.22127286, -0.71017445,
-0.15299146, -0.90966984, 0.12415695, -0.07057038, -0.28543899,
-0.84264902, -0.11572398, -1.15934036, -1.20995069, 0.88341935,
0.23550364, -1.61181153, 1.15561627, 1.00106112, -0.0589006 ,
0.33234427, 0.9847089 , 0.82181549, -0.01311455, 0.03141085,
0.17525267, 0.15609704, -0.79011526, 0.65065048, -0.55208353,
0.4938309 , 0.52501549, -0.37572429, -1.5168802 , -1.10888143,
0.15559037, -0.66681147, 0.53816092, 1.28208695, -0.85264732]])
* b
(chain, draw, b1)
float64
0.2069 -0.268 ... 1.623 -0.1557
array([[[ 2.06926943e-01, -2.68004854e-01, 1.29313406e+00,
-4.58843389e-01, -3.16458636e-01, -2.10167989e-01,
-7.45115296e-01, 4.02577914e-01, 9.31653608e-01,
-1.03959073e-02],
[ 1.76756924e+00, -3.22196403e-01, 1.67719763e+00,
9.17321263e-01, 1.09123867e+00, 2.65239920e-01,
1.76183331e-01, 6.80713171e-01, -1.28320573e+00,
-5.94475040e-01],
[ 6.66200719e-01, -6.97727411e-01, -2.26908829e-01,
1.97447588e+00, 6.50076639e-01, 4.93832899e-01,
5.72420513e-02, 1.33551601e+00, 7.20435477e-01,
-9.91541106e-01],
[ 6.69531669e-01, 2.04635788e-01, 7.86621886e-01,
-8.54028225e-01, -1.42642870e+00, -4.45353697e-01,
-3.09969763e-01, 9.21997329e-01, 6.10787194e-01,
-3.34000909e-01],
[ 3.99857104e-01, 2.50747081e-01, -7.90772025e-01,
-2.30473624e-01, 4.62072424e-01, -6.99625161e-02,
2.46335670e+00, -8.23352420e-01, -6.83761988e-01,
-1.16898872e-01],
...
[-1.36438057e+00, -8.00418059e-01, -1.33259467e+00,
5.98047657e-01, -9.12307686e-01, -1.14965298e+00,
5.90459078e-01, 1.06791845e+00, 6.75497991e-01,
-1.14363782e+00],
[ 1.20092314e-02, 1.17713648e+00, -2.05936539e-01,
1.01002410e+00, -3.59234125e-01, -5.02852457e-01,
9.56686468e-01, 1.29332935e+00, 6.47868416e-01,
3.94673174e-01],
[-7.16112805e-01, 3.60224397e-01, -3.52832338e-01,
-1.84926665e+00, -2.18106573e+00, -9.36550294e-02,
3.44553395e-01, -9.16989521e-01, -2.06790353e+00,
-6.18920499e-01],
[ 7.72808311e-01, 4.38982595e-01, 1.35528477e+00,
-1.19635901e+00, 1.91639277e+00, 9.58725041e-02,
8.21266599e-01, 1.54082502e+00, 5.01457147e-02,
9.37949891e-01],
[-3.34581034e-02, -2.75344335e-02, -1.58128989e-01,
-2.22213892e+00, -3.92240228e-01, -1.33860690e+00,
1.26880180e+00, -7.57444974e-01, 1.62319372e+00,
-1.55679508e-01]]])
* c
(chain, draw, c1, c99)
float64
-1.06 0.02003 ... 1.123 -0.7974
array([[[[-1.05967401, 0.02002945, 1.64182735, -0.5445604 ],
[-1.36069687, -1.87769801, 1.10394298, 0.22864344],
[-0.04624625, 1.36712159, -0.32414334, -0.38522292]],
[[-0.23788166, -1.07901428, 0.59759602, 1.26852794],
[ 0.17893628, 1.27726777, 0.83498619, -0.29740804],
[-0.78713172, -1.7025859 , 1.06015695, 0.71741589]],
[[-0.70833586, -0.08503315, -1.27027003, -0.45093143],
[ 0.00700297, -1.18293699, 1.10293832, -0.73126952],
[ 1.36989057, 0.35951961, -0.48345742, -0.48626736]],
...,
[[-0.31899191, -1.06340683, -0.36828309, -0.10154666],
[ 1.1687852 , 1.04654067, -1.57360419, -1.86963594],
[-1.30849162, 0.99791691, -0.70902635, -2.00941202]],
[[ 0.05862946, 2.01865041, 1.76779448, -1.33000206],
[-0.46533616, 0.56480509, 0.42432647, -0.60002599],
[ 0.197629 , 0.70255064, 0.71100663, 0.74436673]],
[[-0.88429673, -1.17343939, 0.19758123, 1.32524893],
[ 0.42496679, -2.10127513, -1.1172272 , 0.04328512],
[ 1.27789442, -1.19676186, 1.12322228, -0.79737025]]]],
shape=(1, 100, 3, 4)) - Indexes: (5)
* PandasIndex
PandasIndex(Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Index([ 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(Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='b1'))
* PandasIndex
PandasIndex(Index([0, 1, 2], dtype='int64', name='c1'))
* PandasIndex
PandasIndex(Index([0, 1, 2, 3], dtype='int64', name='c99')) - Attributes: (2)
created_at :
2025-05-27T21:35:38.544549+00:00
arviz_version :
0.22.0dev
- Dimensions:
- posterior_predictive
<xarray.Dataset> Size: 19kB
Dimensions: (c1: 3, c99: 4, chain: 1, draw: 100, b1: 10)
Coordinates:- c1 (c1) int64 24B 0 1 2
- c99 (c99) int64 32B 0 1 2 3
- chain (chain) int64 8B 0
- draw (draw) int64 800B 0 1 2 3 4 5 6 7 8 ... 91 92 93 94 95 96 97 98 99
- b1 (b1) int64 80B 0 1 2 3 4 5 6 7 8 9
Data variables:
a (chain, draw) float64 800B -2.559 0.1125 0.01386 ... 1.282 -0.8526
b (chain, draw, b1) float64 8kB 0.2069 -0.268 1.293 ... 1.623 -0.1557
c (chain, draw, c1, c99) float64 10kB -1.06 0.02003 ... 1.123 -0.7974
Attributes:
created_at: 2025-05-27T21:35:38.546696+00:00
arviz_version: 0.22.0dev- 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.559 0.1125 ... 1.282 -0.8526
array([[-2.55883647, 0.11245795, 0.01386183, 0.63983345, 2.16315229,
-2.40579955, 0.48997012, -0.80025424, 0.09236681, -0.684147 ,
-0.93420935, 0.63964169, -0.80418161, -0.32211441, -0.4295091 ,
-0.90632308, 0.66635211, -0.41685641, 1.74123309, -1.42160305,
1.20804435, 1.41400101, -0.0460607 , -0.86728249, -0.75782548,
-0.21979324, -0.2103059 , -0.52558061, 0.42120688, 0.93753371,
-1.36808991, -0.22159933, -0.70667174, -1.53700068, 0.63801015,
-0.98434421, -1.88791879, -0.46837856, 0.67355985, -1.23984302,
-0.92963713, -1.70378528, 0.2835394 , 1.13188231, -0.12554308,
-1.04817408, 1.66858905, 2.31291717, -0.30111609, -0.77062893,
-0.65139849, 2.27356869, 0.05052243, 0.28351448, 1.03158787,
-0.16969894, 1.81191937, 0.95985419, 0.60800894, 0.42458729,
1.07704278, -0.92228695, -1.22002155, 0.22127286, -0.71017445,
-0.15299146, -0.90966984, 0.12415695, -0.07057038, -0.28543899,
-0.84264902, -0.11572398, -1.15934036, -1.20995069, 0.88341935,
0.23550364, -1.61181153, 1.15561627, 1.00106112, -0.0589006 ,
0.33234427, 0.9847089 , 0.82181549, -0.01311455, 0.03141085,
0.17525267, 0.15609704, -0.79011526, 0.65065048, -0.55208353,
0.4938309 , 0.52501549, -0.37572429, -1.5168802 , -1.10888143,
0.15559037, -0.66681147, 0.53816092, 1.28208695, -0.85264732]])
* b
(chain, draw, b1)
float64
0.2069 -0.268 ... 1.623 -0.1557
array([[[ 2.06926943e-01, -2.68004854e-01, 1.29313406e+00,
-4.58843389e-01, -3.16458636e-01, -2.10167989e-01,
-7.45115296e-01, 4.02577914e-01, 9.31653608e-01,
-1.03959073e-02],
[ 1.76756924e+00, -3.22196403e-01, 1.67719763e+00,
9.17321263e-01, 1.09123867e+00, 2.65239920e-01,
1.76183331e-01, 6.80713171e-01, -1.28320573e+00,
-5.94475040e-01],
[ 6.66200719e-01, -6.97727411e-01, -2.26908829e-01,
1.97447588e+00, 6.50076639e-01, 4.93832899e-01,
5.72420513e-02, 1.33551601e+00, 7.20435477e-01,
-9.91541106e-01],
[ 6.69531669e-01, 2.04635788e-01, 7.86621886e-01,
-8.54028225e-01, -1.42642870e+00, -4.45353697e-01,
-3.09969763e-01, 9.21997329e-01, 6.10787194e-01,
-3.34000909e-01],
[ 3.99857104e-01, 2.50747081e-01, -7.90772025e-01,
-2.30473624e-01, 4.62072424e-01, -6.99625161e-02,
2.46335670e+00, -8.23352420e-01, -6.83761988e-01,
-1.16898872e-01],
...
[-1.36438057e+00, -8.00418059e-01, -1.33259467e+00,
5.98047657e-01, -9.12307686e-01, -1.14965298e+00,
5.90459078e-01, 1.06791845e+00, 6.75497991e-01,
-1.14363782e+00],
[ 1.20092314e-02, 1.17713648e+00, -2.05936539e-01,
1.01002410e+00, -3.59234125e-01, -5.02852457e-01,
9.56686468e-01, 1.29332935e+00, 6.47868416e-01,
3.94673174e-01],
[-7.16112805e-01, 3.60224397e-01, -3.52832338e-01,
-1.84926665e+00, -2.18106573e+00, -9.36550294e-02,
3.44553395e-01, -9.16989521e-01, -2.06790353e+00,
-6.18920499e-01],
[ 7.72808311e-01, 4.38982595e-01, 1.35528477e+00,
-1.19635901e+00, 1.91639277e+00, 9.58725041e-02,
8.21266599e-01, 1.54082502e+00, 5.01457147e-02,
9.37949891e-01],
[-3.34581034e-02, -2.75344335e-02, -1.58128989e-01,
-2.22213892e+00, -3.92240228e-01, -1.33860690e+00,
1.26880180e+00, -7.57444974e-01, 1.62319372e+00,
-1.55679508e-01]]])
* c
(chain, draw, c1, c99)
float64
-1.06 0.02003 ... 1.123 -0.7974
array([[[[-1.05967401, 0.02002945, 1.64182735, -0.5445604 ],
[-1.36069687, -1.87769801, 1.10394298, 0.22864344],
[-0.04624625, 1.36712159, -0.32414334, -0.38522292]],
[[-0.23788166, -1.07901428, 0.59759602, 1.26852794],
[ 0.17893628, 1.27726777, 0.83498619, -0.29740804],
[-0.78713172, -1.7025859 , 1.06015695, 0.71741589]],
[[-0.70833586, -0.08503315, -1.27027003, -0.45093143],
[ 0.00700297, -1.18293699, 1.10293832, -0.73126952],
[ 1.36989057, 0.35951961, -0.48345742, -0.48626736]],
...,
[[-0.31899191, -1.06340683, -0.36828309, -0.10154666],
[ 1.1687852 , 1.04654067, -1.57360419, -1.86963594],
[-1.30849162, 0.99791691, -0.70902635, -2.00941202]],
[[ 0.05862946, 2.01865041, 1.76779448, -1.33000206],
[-0.46533616, 0.56480509, 0.42432647, -0.60002599],
[ 0.197629 , 0.70255064, 0.71100663, 0.74436673]],
[[-0.88429673, -1.17343939, 0.19758123, 1.32524893],
[ 0.42496679, -2.10127513, -1.1172272 , 0.04328512],
[ 1.27789442, -1.19676186, 1.12322228, -0.79737025]]]],
shape=(1, 100, 3, 4)) - Indexes: (5)
* PandasIndex
PandasIndex(Index([0], dtype='int64', name='chain'))
* PandasIndex
PandasIndex(Index([ 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(Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='b1'))
* PandasIndex
PandasIndex(Index([0, 1, 2], dtype='int64', name='c1'))
* PandasIndex
PandasIndex(Index([0, 1, 2, 3], dtype='int64', name='c99')) - Attributes: (2)
created_at :
2025-05-27T21:35:38.546696+00:00
arviz_version :
0.22.0dev
- Dimensions: