arviz 0.23.3__py3-none-any.whl → 1.0.0rc0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arviz/__init__.py +52 -367
- arviz-1.0.0rc0.dist-info/METADATA +182 -0
- arviz-1.0.0rc0.dist-info/RECORD +5 -0
- {arviz-0.23.3.dist-info → arviz-1.0.0rc0.dist-info}/WHEEL +1 -2
- {arviz-0.23.3.dist-info → arviz-1.0.0rc0.dist-info}/licenses/LICENSE +0 -1
- arviz/data/__init__.py +0 -55
- arviz/data/base.py +0 -596
- arviz/data/converters.py +0 -203
- arviz/data/datasets.py +0 -161
- arviz/data/example_data/code/radon/radon.json +0 -326
- arviz/data/example_data/data/centered_eight.nc +0 -0
- arviz/data/example_data/data/non_centered_eight.nc +0 -0
- arviz/data/example_data/data_local.json +0 -12
- arviz/data/example_data/data_remote.json +0 -58
- arviz/data/inference_data.py +0 -2386
- arviz/data/io_beanmachine.py +0 -112
- arviz/data/io_cmdstan.py +0 -1036
- arviz/data/io_cmdstanpy.py +0 -1233
- arviz/data/io_datatree.py +0 -23
- arviz/data/io_dict.py +0 -462
- arviz/data/io_emcee.py +0 -317
- arviz/data/io_json.py +0 -54
- arviz/data/io_netcdf.py +0 -68
- arviz/data/io_numpyro.py +0 -497
- arviz/data/io_pyjags.py +0 -378
- arviz/data/io_pyro.py +0 -333
- arviz/data/io_pystan.py +0 -1095
- arviz/data/io_zarr.py +0 -46
- arviz/data/utils.py +0 -139
- arviz/labels.py +0 -210
- arviz/plots/__init__.py +0 -61
- arviz/plots/autocorrplot.py +0 -171
- arviz/plots/backends/__init__.py +0 -223
- arviz/plots/backends/bokeh/__init__.py +0 -166
- arviz/plots/backends/bokeh/autocorrplot.py +0 -101
- arviz/plots/backends/bokeh/bfplot.py +0 -23
- arviz/plots/backends/bokeh/bpvplot.py +0 -193
- arviz/plots/backends/bokeh/compareplot.py +0 -167
- arviz/plots/backends/bokeh/densityplot.py +0 -239
- arviz/plots/backends/bokeh/distcomparisonplot.py +0 -23
- arviz/plots/backends/bokeh/distplot.py +0 -183
- arviz/plots/backends/bokeh/dotplot.py +0 -113
- arviz/plots/backends/bokeh/ecdfplot.py +0 -73
- arviz/plots/backends/bokeh/elpdplot.py +0 -203
- arviz/plots/backends/bokeh/energyplot.py +0 -155
- arviz/plots/backends/bokeh/essplot.py +0 -176
- arviz/plots/backends/bokeh/forestplot.py +0 -772
- arviz/plots/backends/bokeh/hdiplot.py +0 -54
- arviz/plots/backends/bokeh/kdeplot.py +0 -268
- arviz/plots/backends/bokeh/khatplot.py +0 -163
- arviz/plots/backends/bokeh/lmplot.py +0 -185
- arviz/plots/backends/bokeh/loopitplot.py +0 -211
- arviz/plots/backends/bokeh/mcseplot.py +0 -184
- arviz/plots/backends/bokeh/pairplot.py +0 -328
- arviz/plots/backends/bokeh/parallelplot.py +0 -81
- arviz/plots/backends/bokeh/posteriorplot.py +0 -324
- arviz/plots/backends/bokeh/ppcplot.py +0 -379
- arviz/plots/backends/bokeh/rankplot.py +0 -149
- arviz/plots/backends/bokeh/separationplot.py +0 -107
- arviz/plots/backends/bokeh/traceplot.py +0 -436
- arviz/plots/backends/bokeh/violinplot.py +0 -164
- arviz/plots/backends/matplotlib/__init__.py +0 -124
- arviz/plots/backends/matplotlib/autocorrplot.py +0 -72
- arviz/plots/backends/matplotlib/bfplot.py +0 -78
- arviz/plots/backends/matplotlib/bpvplot.py +0 -177
- arviz/plots/backends/matplotlib/compareplot.py +0 -135
- arviz/plots/backends/matplotlib/densityplot.py +0 -194
- arviz/plots/backends/matplotlib/distcomparisonplot.py +0 -119
- arviz/plots/backends/matplotlib/distplot.py +0 -178
- arviz/plots/backends/matplotlib/dotplot.py +0 -116
- arviz/plots/backends/matplotlib/ecdfplot.py +0 -70
- arviz/plots/backends/matplotlib/elpdplot.py +0 -189
- arviz/plots/backends/matplotlib/energyplot.py +0 -113
- arviz/plots/backends/matplotlib/essplot.py +0 -180
- arviz/plots/backends/matplotlib/forestplot.py +0 -656
- arviz/plots/backends/matplotlib/hdiplot.py +0 -48
- arviz/plots/backends/matplotlib/kdeplot.py +0 -177
- arviz/plots/backends/matplotlib/khatplot.py +0 -241
- arviz/plots/backends/matplotlib/lmplot.py +0 -149
- arviz/plots/backends/matplotlib/loopitplot.py +0 -144
- arviz/plots/backends/matplotlib/mcseplot.py +0 -161
- arviz/plots/backends/matplotlib/pairplot.py +0 -355
- arviz/plots/backends/matplotlib/parallelplot.py +0 -58
- arviz/plots/backends/matplotlib/posteriorplot.py +0 -348
- arviz/plots/backends/matplotlib/ppcplot.py +0 -478
- arviz/plots/backends/matplotlib/rankplot.py +0 -119
- arviz/plots/backends/matplotlib/separationplot.py +0 -97
- arviz/plots/backends/matplotlib/traceplot.py +0 -526
- arviz/plots/backends/matplotlib/tsplot.py +0 -121
- arviz/plots/backends/matplotlib/violinplot.py +0 -148
- arviz/plots/bfplot.py +0 -128
- arviz/plots/bpvplot.py +0 -308
- arviz/plots/compareplot.py +0 -177
- arviz/plots/densityplot.py +0 -284
- arviz/plots/distcomparisonplot.py +0 -197
- arviz/plots/distplot.py +0 -233
- arviz/plots/dotplot.py +0 -233
- arviz/plots/ecdfplot.py +0 -372
- arviz/plots/elpdplot.py +0 -174
- arviz/plots/energyplot.py +0 -147
- arviz/plots/essplot.py +0 -319
- arviz/plots/forestplot.py +0 -304
- arviz/plots/hdiplot.py +0 -211
- arviz/plots/kdeplot.py +0 -357
- arviz/plots/khatplot.py +0 -236
- arviz/plots/lmplot.py +0 -380
- arviz/plots/loopitplot.py +0 -224
- arviz/plots/mcseplot.py +0 -194
- arviz/plots/pairplot.py +0 -281
- arviz/plots/parallelplot.py +0 -204
- arviz/plots/plot_utils.py +0 -599
- arviz/plots/posteriorplot.py +0 -298
- arviz/plots/ppcplot.py +0 -369
- arviz/plots/rankplot.py +0 -232
- arviz/plots/separationplot.py +0 -167
- arviz/plots/styles/arviz-bluish.mplstyle +0 -1
- arviz/plots/styles/arviz-brownish.mplstyle +0 -1
- arviz/plots/styles/arviz-colors.mplstyle +0 -2
- arviz/plots/styles/arviz-cyanish.mplstyle +0 -1
- arviz/plots/styles/arviz-darkgrid.mplstyle +0 -40
- arviz/plots/styles/arviz-doc.mplstyle +0 -88
- arviz/plots/styles/arviz-docgrid.mplstyle +0 -88
- arviz/plots/styles/arviz-grayscale.mplstyle +0 -41
- arviz/plots/styles/arviz-greenish.mplstyle +0 -1
- arviz/plots/styles/arviz-orangish.mplstyle +0 -1
- arviz/plots/styles/arviz-plasmish.mplstyle +0 -1
- arviz/plots/styles/arviz-purplish.mplstyle +0 -1
- arviz/plots/styles/arviz-redish.mplstyle +0 -1
- arviz/plots/styles/arviz-royish.mplstyle +0 -1
- arviz/plots/styles/arviz-viridish.mplstyle +0 -1
- arviz/plots/styles/arviz-white.mplstyle +0 -40
- arviz/plots/styles/arviz-whitegrid.mplstyle +0 -40
- arviz/plots/traceplot.py +0 -273
- arviz/plots/tsplot.py +0 -440
- arviz/plots/violinplot.py +0 -192
- arviz/preview.py +0 -58
- arviz/py.typed +0 -0
- arviz/rcparams.py +0 -606
- arviz/sel_utils.py +0 -223
- arviz/static/css/style.css +0 -340
- arviz/static/html/icons-svg-inline.html +0 -15
- arviz/stats/__init__.py +0 -37
- arviz/stats/density_utils.py +0 -1013
- arviz/stats/diagnostics.py +0 -1013
- arviz/stats/ecdf_utils.py +0 -324
- arviz/stats/stats.py +0 -2422
- arviz/stats/stats_refitting.py +0 -119
- arviz/stats/stats_utils.py +0 -609
- arviz/tests/__init__.py +0 -1
- arviz/tests/base_tests/__init__.py +0 -1
- arviz/tests/base_tests/test_data.py +0 -1679
- arviz/tests/base_tests/test_data_zarr.py +0 -143
- arviz/tests/base_tests/test_diagnostics.py +0 -511
- arviz/tests/base_tests/test_diagnostics_numba.py +0 -87
- arviz/tests/base_tests/test_helpers.py +0 -18
- arviz/tests/base_tests/test_labels.py +0 -69
- arviz/tests/base_tests/test_plot_utils.py +0 -342
- arviz/tests/base_tests/test_plots_bokeh.py +0 -1288
- arviz/tests/base_tests/test_plots_matplotlib.py +0 -2197
- arviz/tests/base_tests/test_rcparams.py +0 -317
- arviz/tests/base_tests/test_stats.py +0 -925
- arviz/tests/base_tests/test_stats_ecdf_utils.py +0 -166
- arviz/tests/base_tests/test_stats_numba.py +0 -45
- arviz/tests/base_tests/test_stats_utils.py +0 -384
- arviz/tests/base_tests/test_utils.py +0 -376
- arviz/tests/base_tests/test_utils_numba.py +0 -87
- arviz/tests/conftest.py +0 -46
- arviz/tests/external_tests/__init__.py +0 -1
- arviz/tests/external_tests/test_data_beanmachine.py +0 -78
- arviz/tests/external_tests/test_data_cmdstan.py +0 -398
- arviz/tests/external_tests/test_data_cmdstanpy.py +0 -496
- arviz/tests/external_tests/test_data_emcee.py +0 -166
- arviz/tests/external_tests/test_data_numpyro.py +0 -434
- arviz/tests/external_tests/test_data_pyjags.py +0 -119
- arviz/tests/external_tests/test_data_pyro.py +0 -260
- arviz/tests/external_tests/test_data_pystan.py +0 -307
- arviz/tests/helpers.py +0 -677
- arviz/utils.py +0 -773
- arviz/wrappers/__init__.py +0 -13
- arviz/wrappers/base.py +0 -236
- arviz/wrappers/wrap_pymc.py +0 -36
- arviz/wrappers/wrap_stan.py +0 -148
- arviz-0.23.3.dist-info/METADATA +0 -264
- arviz-0.23.3.dist-info/RECORD +0 -183
- arviz-0.23.3.dist-info/top_level.txt +0 -1
arviz/sel_utils.py
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
"""Utilities for selecting and iterating on xarray objects."""
|
|
2
|
-
|
|
3
|
-
from itertools import product, tee
|
|
4
|
-
|
|
5
|
-
import numpy as np
|
|
6
|
-
import xarray as xr
|
|
7
|
-
|
|
8
|
-
from .labels import BaseLabeller
|
|
9
|
-
|
|
10
|
-
__all__ = ["xarray_sel_iter", "xarray_var_iter", "xarray_to_ndarray"]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def selection_to_string(selection):
|
|
14
|
-
"""Convert dictionary of coordinates to a string for labels.
|
|
15
|
-
|
|
16
|
-
Parameters
|
|
17
|
-
----------
|
|
18
|
-
selection : dict[Any] -> Any
|
|
19
|
-
|
|
20
|
-
Returns
|
|
21
|
-
-------
|
|
22
|
-
str
|
|
23
|
-
key1: value1, key2: value2, ...
|
|
24
|
-
"""
|
|
25
|
-
return ", ".join([f"{v}" for _, v in selection.items()])
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def make_label(var_name, selection, position="below"):
|
|
29
|
-
"""Consistent labelling for plots.
|
|
30
|
-
|
|
31
|
-
Parameters
|
|
32
|
-
----------
|
|
33
|
-
var_name : str
|
|
34
|
-
Name of the variable
|
|
35
|
-
|
|
36
|
-
selection : dict[Any] -> Any
|
|
37
|
-
Coordinates of the variable
|
|
38
|
-
position : str
|
|
39
|
-
Whether to position the coordinates' label "below" (default) or "beside"
|
|
40
|
-
the name of the variable
|
|
41
|
-
|
|
42
|
-
Returns
|
|
43
|
-
-------
|
|
44
|
-
label
|
|
45
|
-
A text representation of the label
|
|
46
|
-
"""
|
|
47
|
-
if selection:
|
|
48
|
-
sel = selection_to_string(selection)
|
|
49
|
-
if position == "below":
|
|
50
|
-
base = "{}\n{}"
|
|
51
|
-
elif position == "beside":
|
|
52
|
-
base = "{}[{}]"
|
|
53
|
-
else:
|
|
54
|
-
sel = ""
|
|
55
|
-
base = "{}{}"
|
|
56
|
-
return base.format(var_name, sel)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def _dims(data, var_name, skip_dims):
|
|
60
|
-
return [dim for dim in data[var_name].dims if dim not in skip_dims]
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def _zip_dims(new_dims, vals):
|
|
64
|
-
return [dict(zip(new_dims, prod)) for prod in product(*vals)]
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def xarray_sel_iter(data, var_names=None, combined=False, skip_dims=None, reverse_selections=False):
|
|
68
|
-
"""Convert xarray data to an iterator over variable names and selections.
|
|
69
|
-
|
|
70
|
-
Iterates over each var_name and all of its coordinates, returning the variable
|
|
71
|
-
names and selections that allow properly obtain the data from ``data`` as desired.
|
|
72
|
-
|
|
73
|
-
Parameters
|
|
74
|
-
----------
|
|
75
|
-
data : xarray.Dataset
|
|
76
|
-
Posterior data in an xarray
|
|
77
|
-
|
|
78
|
-
var_names : iterator of strings (optional)
|
|
79
|
-
Should be a subset of data.data_vars. Defaults to all of them.
|
|
80
|
-
|
|
81
|
-
combined : bool
|
|
82
|
-
Whether to combine chains or leave them separate
|
|
83
|
-
|
|
84
|
-
skip_dims : set
|
|
85
|
-
dimensions to not iterate over
|
|
86
|
-
|
|
87
|
-
reverse_selections : bool
|
|
88
|
-
Whether to reverse selections before iterating.
|
|
89
|
-
|
|
90
|
-
Returns
|
|
91
|
-
-------
|
|
92
|
-
Iterator of (var_name: str, selection: dict(str, any))
|
|
93
|
-
The string is the variable name, the dictionary are coordinate names to values,.
|
|
94
|
-
To get the values of the variable at these coordinates, do
|
|
95
|
-
``data[var_name].sel(**selection)``.
|
|
96
|
-
"""
|
|
97
|
-
if skip_dims is None:
|
|
98
|
-
skip_dims = set()
|
|
99
|
-
|
|
100
|
-
if combined:
|
|
101
|
-
skip_dims = skip_dims.union({"chain", "draw"})
|
|
102
|
-
else:
|
|
103
|
-
skip_dims.add("draw")
|
|
104
|
-
|
|
105
|
-
if var_names is None:
|
|
106
|
-
if isinstance(data, xr.Dataset):
|
|
107
|
-
var_names = list(data.data_vars)
|
|
108
|
-
elif isinstance(data, xr.DataArray):
|
|
109
|
-
var_names = [data.name]
|
|
110
|
-
data = {data.name: data}
|
|
111
|
-
|
|
112
|
-
for var_name in var_names:
|
|
113
|
-
if var_name in data:
|
|
114
|
-
new_dims = _dims(data, var_name, skip_dims)
|
|
115
|
-
vals = [list(dict.fromkeys(data[var_name][dim].values)) for dim in new_dims]
|
|
116
|
-
dims = _zip_dims(new_dims, vals)
|
|
117
|
-
idims = _zip_dims(new_dims, [range(len(v)) for v in vals])
|
|
118
|
-
if reverse_selections:
|
|
119
|
-
dims = reversed(dims)
|
|
120
|
-
idims = reversed(idims)
|
|
121
|
-
|
|
122
|
-
for selection, iselection in zip(dims, idims):
|
|
123
|
-
yield var_name, selection, iselection
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
def xarray_var_iter(
|
|
127
|
-
data, var_names=None, combined=False, skip_dims=None, reverse_selections=False, dim_order=None
|
|
128
|
-
):
|
|
129
|
-
"""Convert xarray data to an iterator over vectors.
|
|
130
|
-
|
|
131
|
-
Iterates over each var_name and all of its coordinates, returning the 1d
|
|
132
|
-
data.
|
|
133
|
-
|
|
134
|
-
Parameters
|
|
135
|
-
----------
|
|
136
|
-
data : xarray.Dataset
|
|
137
|
-
Posterior data in an xarray
|
|
138
|
-
|
|
139
|
-
var_names : iterator of strings (optional)
|
|
140
|
-
Should be a subset of data.data_vars. Defaults to all of them.
|
|
141
|
-
|
|
142
|
-
combined : bool
|
|
143
|
-
Whether to combine chains or leave them separate
|
|
144
|
-
|
|
145
|
-
skip_dims : set
|
|
146
|
-
dimensions to not iterate over
|
|
147
|
-
|
|
148
|
-
reverse_selections : bool
|
|
149
|
-
Whether to reverse selections before iterating.
|
|
150
|
-
|
|
151
|
-
dim_order: list
|
|
152
|
-
Order for the first dimensions. Skips dimensions not found in the variable.
|
|
153
|
-
|
|
154
|
-
Returns
|
|
155
|
-
-------
|
|
156
|
-
Iterator of (str, dict(str, any), np.array)
|
|
157
|
-
The string is the variable name, the dictionary are coordinate names to values,
|
|
158
|
-
and the array are the values of the variable at those coordinates.
|
|
159
|
-
"""
|
|
160
|
-
data_to_sel = data
|
|
161
|
-
if var_names is None and isinstance(data, xr.DataArray):
|
|
162
|
-
data_to_sel = {data.name: data}
|
|
163
|
-
|
|
164
|
-
if isinstance(dim_order, str):
|
|
165
|
-
dim_order = [dim_order]
|
|
166
|
-
|
|
167
|
-
for var_name, selection, iselection in xarray_sel_iter(
|
|
168
|
-
data,
|
|
169
|
-
var_names=var_names,
|
|
170
|
-
combined=combined,
|
|
171
|
-
skip_dims=skip_dims,
|
|
172
|
-
reverse_selections=reverse_selections,
|
|
173
|
-
):
|
|
174
|
-
selected_data = data_to_sel[var_name].sel(**selection)
|
|
175
|
-
if dim_order is not None:
|
|
176
|
-
dim_order_selected = [dim for dim in dim_order if dim in selected_data.dims]
|
|
177
|
-
if dim_order_selected:
|
|
178
|
-
selected_data = selected_data.transpose(*dim_order_selected, ...)
|
|
179
|
-
yield var_name, selection, iselection, selected_data.values
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
def xarray_to_ndarray(data, *, var_names=None, combined=True, label_fun=None):
|
|
183
|
-
"""Take xarray data and unpacks into variables and data into list and numpy array respectively.
|
|
184
|
-
|
|
185
|
-
Assumes that chain and draw are in coordinates
|
|
186
|
-
|
|
187
|
-
Parameters
|
|
188
|
-
----------
|
|
189
|
-
data: xarray.DataSet
|
|
190
|
-
Data in an xarray from an InferenceData object. Examples include posterior or sample_stats
|
|
191
|
-
|
|
192
|
-
var_names: iter
|
|
193
|
-
Should be a subset of data.data_vars not including chain and draws. Defaults to all of them
|
|
194
|
-
|
|
195
|
-
combined: bool
|
|
196
|
-
Whether to combine chain into one array
|
|
197
|
-
|
|
198
|
-
Returns
|
|
199
|
-
-------
|
|
200
|
-
var_names: list
|
|
201
|
-
List of variable names
|
|
202
|
-
data: np.array
|
|
203
|
-
Data values
|
|
204
|
-
"""
|
|
205
|
-
if label_fun is None:
|
|
206
|
-
label_fun = BaseLabeller().make_label_vert
|
|
207
|
-
data_to_sel = data
|
|
208
|
-
if var_names is None and isinstance(data, xr.DataArray):
|
|
209
|
-
data_to_sel = {data.name: data}
|
|
210
|
-
|
|
211
|
-
iterator1, iterator2 = tee(xarray_sel_iter(data, var_names=var_names, combined=combined))
|
|
212
|
-
vars_and_sel = list(iterator1)
|
|
213
|
-
unpacked_var_names = [
|
|
214
|
-
label_fun(var_name, selection, isel) for var_name, selection, isel in vars_and_sel
|
|
215
|
-
]
|
|
216
|
-
|
|
217
|
-
# Merge chains and variables, check dtype to be compatible with divergences data
|
|
218
|
-
data0 = data_to_sel[vars_and_sel[0][0]].sel(**vars_and_sel[0][1])
|
|
219
|
-
unpacked_data = np.empty((len(unpacked_var_names), data0.size), dtype=data0.dtype)
|
|
220
|
-
for idx, (var_name, selection, _) in enumerate(iterator2):
|
|
221
|
-
unpacked_data[idx] = data_to_sel[var_name].sel(**selection).values.flatten()
|
|
222
|
-
|
|
223
|
-
return unpacked_var_names, unpacked_data
|
arviz/static/css/style.css
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
/* CSS stylesheet for displaying InferenceData objects in jupyterlab.
|
|
2
|
-
*
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
:root {
|
|
6
|
-
--xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));
|
|
7
|
-
--xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));
|
|
8
|
-
--xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));
|
|
9
|
-
--xr-border-color: var(--jp-border-color2, #e0e0e0);
|
|
10
|
-
--xr-disabled-color: var(--jp-layout-color3, #bdbdbd);
|
|
11
|
-
--xr-background-color: var(--jp-layout-color0, white);
|
|
12
|
-
--xr-background-color-row-even: var(--jp-layout-color1, white);
|
|
13
|
-
--xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
html[theme=dark],
|
|
17
|
-
body.vscode-dark {
|
|
18
|
-
--xr-font-color0: rgba(255, 255, 255, 1);
|
|
19
|
-
--xr-font-color2: rgba(255, 255, 255, 0.54);
|
|
20
|
-
--xr-font-color3: rgba(255, 255, 255, 0.38);
|
|
21
|
-
--xr-border-color: #1F1F1F;
|
|
22
|
-
--xr-disabled-color: #515151;
|
|
23
|
-
--xr-background-color: #111111;
|
|
24
|
-
--xr-background-color-row-even: #111111;
|
|
25
|
-
--xr-background-color-row-odd: #313131;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.xr-wrap {
|
|
29
|
-
display: block;
|
|
30
|
-
min-width: 300px;
|
|
31
|
-
max-width: 700px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.xr-text-repr-fallback {
|
|
35
|
-
/* fallback to plain text repr when CSS is not injected (untrusted notebook) */
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.xr-header {
|
|
40
|
-
padding-top: 6px;
|
|
41
|
-
padding-bottom: 6px;
|
|
42
|
-
margin-bottom: 4px;
|
|
43
|
-
border-bottom: solid 1px var(--xr-border-color);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.xr-header > div,
|
|
47
|
-
.xr-header > ul {
|
|
48
|
-
display: inline;
|
|
49
|
-
margin-top: 0;
|
|
50
|
-
margin-bottom: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.xr-obj-type,
|
|
54
|
-
.xr-array-name {
|
|
55
|
-
margin-left: 2px;
|
|
56
|
-
margin-right: 10px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.xr-obj-type {
|
|
60
|
-
color: var(--xr-font-color2);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.xr-sections {
|
|
64
|
-
padding-left: 0 !important;
|
|
65
|
-
display: grid;
|
|
66
|
-
grid-template-columns: 150px auto auto 1fr 20px 20px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.xr-sections.group-sections {
|
|
70
|
-
grid-template-columns: auto;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.xr-section-item {
|
|
74
|
-
display: contents;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.xr-section-item input {
|
|
78
|
-
display: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.xr-section-item input + label {
|
|
82
|
-
color: var(--xr-disabled-color);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.xr-section-item input:enabled + label {
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
color: var(--xr-font-color2);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.xr-section-item input:enabled + label:hover {
|
|
91
|
-
color: var(--xr-font-color0);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.xr-section-summary {
|
|
95
|
-
grid-column: 1;
|
|
96
|
-
color: var(--xr-font-color2);
|
|
97
|
-
font-weight: 500;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.xr-section-summary > span {
|
|
101
|
-
display: inline-block;
|
|
102
|
-
padding-left: 0.5em;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.xr-section-summary-in:disabled + label {
|
|
106
|
-
color: var(--xr-font-color2);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.xr-section-summary-in + label:before {
|
|
110
|
-
display: inline-block;
|
|
111
|
-
content: '►';
|
|
112
|
-
font-size: 11px;
|
|
113
|
-
width: 15px;
|
|
114
|
-
text-align: center;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.xr-section-summary-in:disabled + label:before {
|
|
118
|
-
color: var(--xr-disabled-color);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.xr-section-summary-in:checked + label:before {
|
|
122
|
-
content: '▼';
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.xr-section-summary-in:checked + label > span {
|
|
126
|
-
display: none;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.xr-section-summary,
|
|
130
|
-
.xr-section-inline-details {
|
|
131
|
-
padding-top: 4px;
|
|
132
|
-
padding-bottom: 4px;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.xr-section-inline-details {
|
|
136
|
-
grid-column: 2 / -1;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.xr-section-details {
|
|
140
|
-
display: none;
|
|
141
|
-
grid-column: 1 / -1;
|
|
142
|
-
margin-bottom: 5px;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.xr-section-summary-in:checked ~ .xr-section-details {
|
|
146
|
-
display: contents;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.xr-array-wrap {
|
|
150
|
-
grid-column: 1 / -1;
|
|
151
|
-
display: grid;
|
|
152
|
-
grid-template-columns: 20px auto;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.xr-array-wrap > label {
|
|
156
|
-
grid-column: 1;
|
|
157
|
-
vertical-align: top;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.xr-preview {
|
|
161
|
-
color: var(--xr-font-color3);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.xr-array-preview,
|
|
165
|
-
.xr-array-data {
|
|
166
|
-
padding: 0 5px !important;
|
|
167
|
-
grid-column: 2;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.xr-array-data,
|
|
171
|
-
.xr-array-in:checked ~ .xr-array-preview {
|
|
172
|
-
display: none;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.xr-array-in:checked ~ .xr-array-data,
|
|
176
|
-
.xr-array-preview {
|
|
177
|
-
display: inline-block;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.xr-dim-list {
|
|
181
|
-
display: inline-block !important;
|
|
182
|
-
list-style: none;
|
|
183
|
-
padding: 0 !important;
|
|
184
|
-
margin: 0;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.xr-dim-list li {
|
|
188
|
-
display: inline-block;
|
|
189
|
-
padding: 0;
|
|
190
|
-
margin: 0;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.xr-dim-list:before {
|
|
194
|
-
content: '(';
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.xr-dim-list:after {
|
|
198
|
-
content: ')';
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.xr-dim-list li:not(:last-child):after {
|
|
202
|
-
content: ',';
|
|
203
|
-
padding-right: 5px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.xr-has-index {
|
|
207
|
-
font-weight: bold;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.xr-var-list,
|
|
211
|
-
.xr-var-item {
|
|
212
|
-
display: contents;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.xr-var-item > div,
|
|
216
|
-
.xr-var-item label,
|
|
217
|
-
.xr-var-item > .xr-var-name span {
|
|
218
|
-
background-color: var(--xr-background-color-row-even);
|
|
219
|
-
margin-bottom: 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.xr-var-item > .xr-var-name:hover span {
|
|
223
|
-
padding-right: 5px;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.xr-var-list > li:nth-child(odd) > div,
|
|
227
|
-
.xr-var-list > li:nth-child(odd) > label,
|
|
228
|
-
.xr-var-list > li:nth-child(odd) > .xr-var-name span {
|
|
229
|
-
background-color: var(--xr-background-color-row-odd);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.xr-var-name {
|
|
233
|
-
grid-column: 1;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.xr-var-dims {
|
|
237
|
-
grid-column: 2;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.xr-var-dtype {
|
|
241
|
-
grid-column: 3;
|
|
242
|
-
text-align: right;
|
|
243
|
-
color: var(--xr-font-color2);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.xr-var-preview {
|
|
247
|
-
grid-column: 4;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.xr-var-name,
|
|
251
|
-
.xr-var-dims,
|
|
252
|
-
.xr-var-dtype,
|
|
253
|
-
.xr-preview,
|
|
254
|
-
.xr-attrs dt {
|
|
255
|
-
white-space: nowrap;
|
|
256
|
-
overflow: hidden;
|
|
257
|
-
text-overflow: ellipsis;
|
|
258
|
-
padding-right: 10px;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.xr-var-name:hover,
|
|
262
|
-
.xr-var-dims:hover,
|
|
263
|
-
.xr-var-dtype:hover,
|
|
264
|
-
.xr-attrs dt:hover {
|
|
265
|
-
overflow: visible;
|
|
266
|
-
width: auto;
|
|
267
|
-
z-index: 1;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.xr-var-attrs,
|
|
271
|
-
.xr-var-data {
|
|
272
|
-
display: none;
|
|
273
|
-
background-color: var(--xr-background-color) !important;
|
|
274
|
-
padding-bottom: 5px !important;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.xr-var-attrs-in:checked ~ .xr-var-attrs,
|
|
278
|
-
.xr-var-data-in:checked ~ .xr-var-data {
|
|
279
|
-
display: block;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.xr-var-data > table {
|
|
283
|
-
float: right;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.xr-var-name span,
|
|
287
|
-
.xr-var-data,
|
|
288
|
-
.xr-attrs {
|
|
289
|
-
padding-left: 25px !important;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.xr-attrs,
|
|
293
|
-
.xr-var-attrs,
|
|
294
|
-
.xr-var-data {
|
|
295
|
-
grid-column: 1 / -1;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
dl.xr-attrs {
|
|
299
|
-
padding: 0;
|
|
300
|
-
margin: 0;
|
|
301
|
-
display: grid;
|
|
302
|
-
grid-template-columns: 125px auto;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.xr-attrs dt,
|
|
306
|
-
.xr-attrs dd {
|
|
307
|
-
padding: 0;
|
|
308
|
-
margin: 0;
|
|
309
|
-
float: left;
|
|
310
|
-
padding-right: 10px;
|
|
311
|
-
width: auto;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.xr-attrs dt {
|
|
315
|
-
font-weight: normal;
|
|
316
|
-
grid-column: 1;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.xr-attrs dt:hover span {
|
|
320
|
-
display: inline-block;
|
|
321
|
-
background: var(--xr-background-color);
|
|
322
|
-
padding-right: 10px;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.xr-attrs dd {
|
|
326
|
-
grid-column: 2;
|
|
327
|
-
white-space: pre-wrap;
|
|
328
|
-
word-break: break-all;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.xr-icon-database,
|
|
332
|
-
.xr-icon-file-text2 {
|
|
333
|
-
display: inline-block;
|
|
334
|
-
vertical-align: middle;
|
|
335
|
-
width: 1em;
|
|
336
|
-
height: 1.5em !important;
|
|
337
|
-
stroke-width: 0;
|
|
338
|
-
stroke: currentColor;
|
|
339
|
-
fill: currentColor;
|
|
340
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<svg style="position: absolute; width: 0; height: 0; overflow: hidden">
|
|
2
|
-
<defs>
|
|
3
|
-
<symbol id="icon-database" viewBox="0 0 32 32">
|
|
4
|
-
<path d="M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z"></path>
|
|
5
|
-
<path d="M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
|
|
6
|
-
<path d="M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
|
|
7
|
-
</symbol>
|
|
8
|
-
<symbol id="icon-file-text2" viewBox="0 0 32 32">
|
|
9
|
-
<path d="M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z"></path>
|
|
10
|
-
<path d="M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
|
|
11
|
-
<path d="M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
|
|
12
|
-
<path d="M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
|
|
13
|
-
</symbol>
|
|
14
|
-
</defs>
|
|
15
|
-
</svg>
|
arviz/stats/__init__.py
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# pylint: disable=wildcard-import
|
|
2
|
-
"""Statistical tests and diagnostics for ArviZ."""
|
|
3
|
-
from .density_utils import *
|
|
4
|
-
from .diagnostics import *
|
|
5
|
-
from .stats import *
|
|
6
|
-
from .stats import _calculate_ics
|
|
7
|
-
from .stats_refitting import *
|
|
8
|
-
from .stats_utils import *
|
|
9
|
-
|
|
10
|
-
__all__ = [
|
|
11
|
-
"apply_test_function",
|
|
12
|
-
"bayes_factor",
|
|
13
|
-
"bfmi",
|
|
14
|
-
"compare",
|
|
15
|
-
"hdi",
|
|
16
|
-
"kde",
|
|
17
|
-
"loo",
|
|
18
|
-
"loo_pit",
|
|
19
|
-
"psislw",
|
|
20
|
-
"r2_samples",
|
|
21
|
-
"r2_score",
|
|
22
|
-
"summary",
|
|
23
|
-
"waic",
|
|
24
|
-
"weight_predictions",
|
|
25
|
-
"ELPDData",
|
|
26
|
-
"ess",
|
|
27
|
-
"rhat",
|
|
28
|
-
"mcse",
|
|
29
|
-
"autocorr",
|
|
30
|
-
"autocov",
|
|
31
|
-
"make_ufunc",
|
|
32
|
-
"smooth_data",
|
|
33
|
-
"wrap_xarray_ufunc",
|
|
34
|
-
"reloo",
|
|
35
|
-
"_calculate_ics",
|
|
36
|
-
"psens",
|
|
37
|
-
]
|