Skip to content

Instantly share code, notes, and snippets.

@GStechschulte
Created November 17, 2023 08:47
Show Gist options
  • Select an option

  • Save GStechschulte/83f017e926df2eb0eeaadce82e202b91 to your computer and use it in GitHub Desktop.

Select an option

Save GStechschulte/83f017e926df2eb0eeaadce82e202b91 to your computer and use it in GitHub Desktop.
Return InferenceData in interpret
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"import warnings\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import xarray as xr\n",
"\n",
"import bambi as bmb\n",
"\n",
"bmb.config[\"INTERPRET_VERBOSE\"] = False\n",
"warnings.simplefilter(action='ignore', category=FutureWarning)\n",
"\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"fish_data = pd.read_stata(\"http://www.stata-press.com/data/r11/fish.dta\")\n",
"cols = [\"count\", \"livebait\", \"camper\", \"persons\", \"child\"]\n",
"fish_data = fish_data[cols]\n",
"fish_data[\"livebait\"] = pd.Categorical(fish_data[\"livebait\"])\n",
"fish_data[\"camper\"] = pd.Categorical(fish_data[\"camper\"])"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Auto-assigning NUTS sampler...\n",
"Initializing NUTS using jitter+adapt_diag...\n",
"Multiprocess sampling (4 chains in 4 jobs)\n",
"NUTS: [count_psi, Intercept, livebait, camper, persons, child]\n"
]
},
{
"data": {
"text/html": [
"\n",
"<style>\n",
" /* Turns off some styling */\n",
" progress {\n",
" /* gets rid of default border in Firefox and Opera. */\n",
" border: none;\n",
" /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
" background-size: auto;\n",
" }\n",
" progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
" background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
" }\n",
" .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
" background: #F44336;\n",
" }\n",
"</style>\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
" <div>\n",
" <progress value='8000' class='' max='8000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
" 100.00% [8000/8000 00:02&lt;00:00 Sampling 4 chains, 0 divergences]\n",
" </div>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 3 seconds.\n"
]
}
],
"source": [
"fish_model = bmb.Model(\n",
" \"count ~ livebait + camper + persons + child\", \n",
" fish_data, \n",
" family='zero_inflated_poisson'\n",
")\n",
"\n",
"fish_idata = fish_model.fit(chains=4, random_seed=1234)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Return InferenceData"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# here I have returned the data used as `data` in `model.predict()` and the \n",
"# idata returned by `model.predict(..., inplace=False)`\n",
"df, idata = bmb.interpret.comparisons(\n",
" model=fish_model,\n",
" idata=fish_idata,\n",
" contrast={\"persons\": [1, 4]},\n",
" conditional={\"child\": [0, 1, 2], \"livebait\": [0, 1]},\n",
" return_idata=True\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Potential solution\n",
"\n",
"Code to be used within `effects.py` to return an `InferenceData` object."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"xr_df = xr.Dataset.from_dataframe(df)\n",
"\n",
"# it may be possible to append new data variables in the observed_data group instead \n",
"# of deleting, but we also don't need the existing data variable currently in this group\n",
"del idata.observed_data\n",
"\n",
"# use group name 'data' because this is the same param. name in model.predict(data=<...>)\n",
"idata.add_groups(data=xr_df)\n",
"idata.data = idata.data.rename({\"index\": \"count_obs\"})"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <div>\n",
" <div class='xr-header'>\n",
" <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
" </div>\n",
" <ul class=\"xr-sections group-sections\">\n",
" \n",
" <li class = \"xr-section-item\">\n",
" <input id=\"idata_posteriorf68c850e-a1ea-40b3-9c1d-8d0d72ee7498\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
" <label for=\"idata_posteriorf68c850e-a1ea-40b3-9c1d-8d0d72ee7498\" class = \"xr-section-summary\">posterior</label>\n",
" <div class=\"xr-section-inline-details\"></div>\n",
" <div class=\"xr-section-details\">\n",
" <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
" <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
"Dimensions: (chain: 4, draw: 1000, livebait_dim: 1, camper_dim: 1,\n",
" count_obs: 12)\n",
"Coordinates:\n",
" * chain (chain) int64 0 1 2 3\n",
" * draw (draw) int64 0 1 2 3 4 5 6 7 ... 993 994 995 996 997 998 999\n",
" * livebait_dim (livebait_dim) &lt;U3 &#x27;1.0&#x27;\n",
" * camper_dim (camper_dim) &lt;U3 &#x27;1.0&#x27;\n",
" * count_obs (count_obs) int64 0 1 2 3 4 5 6 7 8 9 10 11\n",
"Data variables:\n",
" Intercept (chain, draw) float64 -2.561 -2.746 -2.67 ... -2.067 -2.12\n",
" livebait (chain, draw, livebait_dim) float64 1.877 1.852 ... 1.461\n",
" camper (chain, draw, camper_dim) float64 0.6588 0.795 ... 0.6569\n",
" persons (chain, draw) float64 0.8503 0.8481 0.9236 ... 0.8651 0.8262\n",
" child (chain, draw) float64 -1.256 -1.303 -1.588 ... -1.409 -1.411\n",
" count_psi (chain, draw) float64 0.6191 0.6438 0.6831 ... 0.6576 0.6696\n",
" count_mean (chain, draw, count_obs) float64 0.3495 4.48 ... 0.1356 1.617\n",
"Attributes:\n",
" created_at: 2023-11-17T08:11:21.688789\n",
" arviz_version: 0.16.1\n",
" inference_library: pymc\n",
" inference_library_version: 5.8.1\n",
" sampling_time: 2.6377978324890137\n",
" tuning_steps: 1000\n",
" modeling_interface: bambi\n",
" modeling_interface_version: 0.13.0.dev0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-934601ca-aa01-4996-b33c-5bd909f90de6' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-934601ca-aa01-4996-b33c-5bd909f90de6' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 1000</li><li><span class='xr-has-index'>livebait_dim</span>: 1</li><li><span class='xr-has-index'>camper_dim</span>: 1</li><li><span class='xr-has-index'>count_obs</span>: 12</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-7e71e8a0-82b9-4c37-9590-7859a6f07c01' class='xr-section-summary-in' type='checkbox' checked><label for='section-7e71e8a0-82b9-4c37-9590-7859a6f07c01' class='xr-section-summary' >Coordinates: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-32cb4e9c-5ad0-4c09-8ac1-ecaae2cc18c5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-32cb4e9c-5ad0-4c09-8ac1-ecaae2cc18c5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-01493a1e-edd2-4f62-9104-00ec8dfe4096' class='xr-var-data-in' type='checkbox'><label for='data-01493a1e-edd2-4f62-9104-00ec8dfe4096' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 995 996 997 998 999</div><input id='attrs-122d933b-867c-4b63-be26-e635ecb87330' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-122d933b-867c-4b63-be26-e635ecb87330' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-96ec15cb-9991-4280-b73e-956c3f806aee' class='xr-var-data-in' type='checkbox'><label for='data-96ec15cb-9991-4280-b73e-956c3f806aee' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 997, 998, 999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>livebait_dim</span></div><div class='xr-var-dims'>(livebait_dim)</div><div class='xr-var-dtype'>&lt;U3</div><div class='xr-var-preview xr-preview'>&#x27;1.0&#x27;</div><input id='attrs-62253171-830f-48c7-a8d0-111919c46689' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-62253171-830f-48c7-a8d0-111919c46689' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a2d1df42-5192-4d57-be6c-82ec09855d63' class='xr-var-data-in' type='checkbox'><label for='data-a2d1df42-5192-4d57-be6c-82ec09855d63' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;1.0&#x27;], dtype=&#x27;&lt;U3&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>camper_dim</span></div><div class='xr-var-dims'>(camper_dim)</div><div class='xr-var-dtype'>&lt;U3</div><div class='xr-var-preview xr-preview'>&#x27;1.0&#x27;</div><input id='attrs-7102c3af-01ac-40e8-a712-a16796699e3d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7102c3af-01ac-40e8-a712-a16796699e3d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ad9da4c3-ba3d-4520-a84f-94819fca4edc' class='xr-var-data-in' type='checkbox'><label for='data-ad9da4c3-ba3d-4520-a84f-94819fca4edc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;1.0&#x27;], dtype=&#x27;&lt;U3&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>count_obs</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 7 8 9 10 11</div><input id='attrs-bc2c07cf-f11a-4be4-bd17-d62a4e57abf0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bc2c07cf-f11a-4be4-bd17-d62a4e57abf0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f4741561-364f-42e9-94fb-80b7d14bad58' class='xr-var-data-in' type='checkbox'><label for='data-f4741561-364f-42e9-94fb-80b7d14bad58' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f8383c76-32f3-4e93-a2d7-58ca61edfb38' class='xr-section-summary-in' type='checkbox' checked><label for='section-f8383c76-32f3-4e93-a2d7-58ca61edfb38' class='xr-section-summary' >Data variables: <span>(7)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>Intercept</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-2.561 -2.746 ... -2.067 -2.12</div><input id='attrs-8adab180-6218-4359-8906-52f975cf3833' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8adab180-6218-4359-8906-52f975cf3833' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e8d77888-efeb-4fb9-b415-519939120d12' class='xr-var-data-in' type='checkbox'><label for='data-e8d77888-efeb-4fb9-b415-519939120d12' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-2.56051511, -2.74607872, -2.66961933, ..., -2.90664123,\n",
" -1.94025657, -1.96231209],\n",
" [-2.76442884, -2.4931398 , -2.68945727, ..., -2.44233802,\n",
" -2.87288175, -2.99301516],\n",
" [-2.54073685, -2.63865547, -2.40055799, ..., -2.58708551,\n",
" -2.56517338, -2.77058831],\n",
" [-2.38866456, -2.38866456, -3.11000902, ..., -2.81784897,\n",
" -2.0665375 , -2.11988613]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>livebait</span></div><div class='xr-var-dims'>(chain, draw, livebait_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.877 1.852 1.675 ... 1.296 1.461</div><input id='attrs-3e92dbc2-4c0b-4919-aa00-40108bb02482' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3e92dbc2-4c0b-4919-aa00-40108bb02482' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d35510df-452e-418e-beca-787cbb88cb2f' class='xr-var-data-in' type='checkbox'><label for='data-d35510df-452e-418e-beca-787cbb88cb2f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[1.87727051],\n",
" [1.85234663],\n",
" [1.67464225],\n",
" ...,\n",
" [1.59826469],\n",
" [1.51041867],\n",
" [1.56191212]],\n",
"\n",
" [[2.17540067],\n",
" [1.40245245],\n",
" [2.09550323],\n",
" ...,\n",
" [1.60038429],\n",
" [1.88241837],\n",
" [1.72162314]],\n",
"\n",
" [[1.77539862],\n",
" [1.8242263 ],\n",
" [1.65034889],\n",
" ...,\n",
" [1.67263541],\n",
" [1.74124459],\n",
" [2.00770152]],\n",
"\n",
" [[1.45986915],\n",
" [1.45986915],\n",
" [2.20841226],\n",
" ...,\n",
" [2.03848856],\n",
" [1.29599303],\n",
" [1.46078825]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>camper</span></div><div class='xr-var-dims'>(chain, draw, camper_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.6588 0.795 ... 0.666 0.6569</div><input id='attrs-12d323b7-1ad2-4c68-a437-f4a3adf3b255' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-12d323b7-1ad2-4c68-a437-f4a3adf3b255' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4a8c7639-85eb-4a98-b8b5-7fbd54b80672' class='xr-var-data-in' type='checkbox'><label for='data-4a8c7639-85eb-4a98-b8b5-7fbd54b80672' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.6588193 ],\n",
" [0.79496339],\n",
" [0.69383527],\n",
" ...,\n",
" [0.70841586],\n",
" [0.56156595],\n",
" [0.61233821]],\n",
"\n",
" [[0.55568084],\n",
" [0.79551562],\n",
" [0.57287656],\n",
" ...,\n",
" [0.56407351],\n",
" [0.8544596 ],\n",
" [0.71803045]],\n",
"\n",
" [[0.49228331],\n",
" [0.49483011],\n",
" [0.59406043],\n",
" ...,\n",
" [0.69317061],\n",
" [0.56845761],\n",
" [0.56572534]],\n",
"\n",
" [[0.73729746],\n",
" [0.73729746],\n",
" [0.69397148],\n",
" ...,\n",
" [0.76805915],\n",
" [0.66597618],\n",
" [0.65688547]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>persons</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8503 0.8481 ... 0.8651 0.8262</div><input id='attrs-e15fc7af-382f-4443-a5b6-288a3315ca48' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e15fc7af-382f-4443-a5b6-288a3315ca48' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2c6b0b18-a7b0-4b1c-95a0-c4d835e68631' class='xr-var-data-in' type='checkbox'><label for='data-2c6b0b18-a7b0-4b1c-95a0-c4d835e68631' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.85031322, 0.84814518, 0.92359021, ..., 1.01473033, 0.77804758,\n",
" 0.77282878],\n",
" [0.85534443, 0.91844441, 0.83513711, ..., 0.8844652 , 0.87067793,\n",
" 0.9921716 ],\n",
" [0.91707175, 0.90095888, 0.86388135, ..., 0.9029071 , 0.90511015,\n",
" 0.86823992],\n",
" [0.89729431, 0.89729431, 0.90072703, ..., 0.84003138, 0.8650762 ,\n",
" 0.82622838]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>child</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-1.256 -1.303 ... -1.409 -1.411</div><input id='attrs-b71cd9ee-09d6-48f4-ba75-d5b6f35a83a6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b71cd9ee-09d6-48f4-ba75-d5b6f35a83a6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-88c22b19-8803-4b4a-bd8a-0f3208e92755' class='xr-var-data-in' type='checkbox'><label for='data-88c22b19-8803-4b4a-bd8a-0f3208e92755' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-1.2564687 , -1.30258341, -1.58841685, ..., -1.54343758,\n",
" -1.17843016, -1.27736409],\n",
" [-1.49339077, -1.37706641, -1.52860219, ..., -1.4762509 ,\n",
" -1.38632383, -1.26244671],\n",
" [-1.45183844, -1.30613131, -1.46968315, ..., -1.44280439,\n",
" -1.43391527, -1.30078405],\n",
" [-1.57587563, -1.57587563, -1.40453166, ..., -1.38717826,\n",
" -1.40892891, -1.41097232]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>count_psi</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.6191 0.6438 ... 0.6576 0.6696</div><input id='attrs-fe2b5f9f-d49c-4e77-973c-f25ceaeeb7ec' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fe2b5f9f-d49c-4e77-973c-f25ceaeeb7ec' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c1b583e3-a497-4a9f-b322-4d75b7629b6e' class='xr-var-data-in' type='checkbox'><label for='data-c1b583e3-a497-4a9f-b322-4d75b7629b6e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.61909366, 0.64384176, 0.68306546, ..., 0.67447408, 0.59490119,\n",
" 0.54067083],\n",
" [0.60722387, 0.64525659, 0.6310865 , ..., 0.59559851, 0.62794532,\n",
" 0.58663883],\n",
" [0.59130989, 0.61473438, 0.58919778, ..., 0.51008254, 0.57478784,\n",
" 0.65695581],\n",
" [0.66901963, 0.66901963, 0.56406779, ..., 0.57790949, 0.65764937,\n",
" 0.66961487]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>count_mean</span></div><div class='xr-var-dims'>(chain, draw, count_obs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.3495 4.48 2.284 ... 0.1356 1.617</div><input id='attrs-8138827e-d80f-436c-8fe6-1c934f89d21a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8138827e-d80f-436c-8fe6-1c934f89d21a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-624add0c-ad26-4395-ac9b-e7d9724b2b5a' class='xr-var-data-in' type='checkbox'><label for='data-624add0c-ad26-4395-ac9b-e7d9724b2b5a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.34945426, 4.47970452, 2.28390779, ..., 0.36298989,\n",
" 0.18506476, 2.37237178],\n",
" [0.33188387, 4.22688531, 2.11568044, ..., 0.31232798,\n",
" 0.15632934, 1.99101626],\n",
" [0.34917088, 5.57658615, 1.86348503, ..., 0.23264144,\n",
" 0.07774 , 1.24158073],\n",
" ...,\n",
" [0.30620666, 6.42820903, 1.51402195, ..., 0.29341151,\n",
" 0.06910657, 1.45075701],\n",
" [0.54845884, 5.66042903, 2.48376518, ..., 0.53613964,\n",
" 0.23525513, 2.42797612],\n",
" [0.5614991 , 5.70499004, 2.67718806, ..., 0.4433539 ,\n",
" 0.20805326, 2.11388009]],\n",
"\n",
" [[0.25835942, 3.36231495, 2.27503877, ..., 0.16962726,\n",
" 0.11477467, 1.4936889 ],\n",
" [0.45878216, 7.21493684, 1.86502167, ..., 0.45933321,\n",
" 0.11873512, 1.86726177],\n",
" [0.27763621, 3.40065384, 2.2570522 , ..., 0.1598952 ,\n",
" 0.10612424, 1.299873 ],\n",
"...\n",
" [0.37120241, 5.57177405, 1.97709305, ..., 0.31102086,\n",
" 0.11036291, 1.65655496],\n",
" [0.33567709, 5.07194723, 1.91484938, ..., 0.28819852,\n",
" 0.1088057 , 1.64401079],\n",
" [0.2627314 , 3.55408166, 1.95634603, ..., 0.26356075,\n",
" 0.14507715, 1.96252149]],\n",
"\n",
" [[0.47044661, 6.94352902, 2.02545902, ..., 0.29702437,\n",
" 0.08664336, 1.27880755],\n",
" [0.47044661, 6.94352902, 2.02545902, ..., 0.29702437,\n",
" 0.08664336, 1.27880755],\n",
" [0.21973995, 3.2768107 , 1.99990917, ..., 0.19746524,\n",
" 0.12051735, 1.79718139],\n",
" ...,\n",
" [0.29826932, 3.70741807, 2.29040835, ..., 0.23130437,\n",
" 0.14289769, 1.77618489],\n",
" [0.58538524, 7.84395741, 2.13936254, ..., 0.46854912,\n",
" 0.12779218, 1.71237053],\n",
" [0.52899712, 6.30859406, 2.2796364 , ..., 0.37529916,\n",
" 0.13561589, 1.61729732]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1aa7cd89-8d68-4ac0-85d5-d33f8858d71c' class='xr-section-summary-in' type='checkbox' ><label for='section-1aa7cd89-8d68-4ac0-85d5-d33f8858d71c' class='xr-section-summary' >Indexes: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-7c7bb591-6487-4eda-b6ed-a6ce23b6f350' class='xr-index-data-in' type='checkbox'/><label for='index-7c7bb591-6487-4eda-b6ed-a6ce23b6f350' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-314e29c1-8aa6-455b-b3ec-ea74f54ab493' class='xr-index-data-in' type='checkbox'/><label for='index-314e29c1-8aa6-455b-b3ec-ea74f54ab493' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n",
" ...\n",
" 990, 991, 992, 993, 994, 995, 996, 997, 998, 999],\n",
" dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=1000))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>livebait_dim</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-1d557b0d-2c75-4ded-b69d-55519e404c3f' class='xr-index-data-in' type='checkbox'/><label for='index-1d557b0d-2c75-4ded-b69d-55519e404c3f' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;1.0&#x27;], dtype=&#x27;object&#x27;, name=&#x27;livebait_dim&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>camper_dim</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-2f7919f1-556a-4540-872b-5ec5d451fac8' class='xr-index-data-in' type='checkbox'/><label for='index-2f7919f1-556a-4540-872b-5ec5d451fac8' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;1.0&#x27;], dtype=&#x27;object&#x27;, name=&#x27;camper_dim&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>count_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-c1856979-3182-4680-a9a0-6338e291b978' class='xr-index-data-in' type='checkbox'/><label for='index-c1856979-3182-4680-a9a0-6338e291b978' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], dtype=&#x27;int64&#x27;, name=&#x27;count_obs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1d40d620-4c63-4589-8ea9-7ff7076c3752' class='xr-section-summary-in' type='checkbox' checked><label for='section-1d40d620-4c63-4589-8ea9-7ff7076c3752' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-11-17T08:11:21.688789</dd><dt><span>arviz_version :</span></dt><dd>0.16.1</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.8.1</dd><dt><span>sampling_time :</span></dt><dd>2.6377978324890137</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0.dev0</dd></dl></div></li></ul></div></div><br></div>\n",
" </ul>\n",
" </div>\n",
" </li>\n",
" \n",
" <li class = \"xr-section-item\">\n",
" <input id=\"idata_sample_stats31aba79f-808a-43e1-a25b-d62481e96541\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
" <label for=\"idata_sample_stats31aba79f-808a-43e1-a25b-d62481e96541\" class = \"xr-section-summary\">sample_stats</label>\n",
" <div class=\"xr-section-inline-details\"></div>\n",
" <div class=\"xr-section-details\">\n",
" <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
" <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
"Dimensions: (chain: 4, draw: 1000)\n",
"Coordinates:\n",
" * chain (chain) int64 0 1 2 3\n",
" * draw (draw) int64 0 1 2 3 4 5 ... 994 995 996 997 998 999\n",
"Data variables: (12/17)\n",
" perf_counter_start (chain, draw) float64 1.356e+05 ... 1.356e+05\n",
" acceptance_rate (chain, draw) float64 0.8615 1.0 ... 0.9558 0.9276\n",
" tree_depth (chain, draw) int64 4 4 4 3 4 3 3 3 ... 3 3 3 3 3 3 3\n",
" largest_eigval (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
" step_size (chain, draw) float64 0.503 0.503 ... 0.4153 0.4153\n",
" n_steps (chain, draw) float64 15.0 15.0 15.0 ... 7.0 7.0 7.0\n",
" ... ...\n",
" perf_counter_diff (chain, draw) float64 0.001769 0.001763 ... 0.0008867\n",
" process_time_diff (chain, draw) float64 0.001768 0.001763 ... 0.000886\n",
" diverging (chain, draw) bool False False False ... False False\n",
" smallest_eigval (chain, draw) float64 nan nan nan nan ... nan nan nan\n",
" index_in_trajectory (chain, draw) int64 5 -13 3 -2 -5 -3 ... 6 3 1 -5 2\n",
" lp (chain, draw) float64 -752.6 -752.5 ... -752.2 -752.2\n",
"Attributes:\n",
" created_at: 2023-11-17T08:11:21.696419\n",
" arviz_version: 0.16.1\n",
" inference_library: pymc\n",
" inference_library_version: 5.8.1\n",
" sampling_time: 2.6377978324890137\n",
" tuning_steps: 1000\n",
" modeling_interface: bambi\n",
" modeling_interface_version: 0.13.0.dev0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-d6d8c9b1-8785-4fd2-aa30-890b267d2a4d' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-d6d8c9b1-8785-4fd2-aa30-890b267d2a4d' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 1000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-874b462b-57f8-4ccc-a95b-3f12a76cca42' class='xr-section-summary-in' type='checkbox' checked><label for='section-874b462b-57f8-4ccc-a95b-3f12a76cca42' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-300fb84f-5055-4476-a8c9-68c2eaccec5b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-300fb84f-5055-4476-a8c9-68c2eaccec5b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b10636f3-2780-4561-adb7-207ad99ccff9' class='xr-var-data-in' type='checkbox'><label for='data-b10636f3-2780-4561-adb7-207ad99ccff9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 995 996 997 998 999</div><input id='attrs-6cba66c9-14ac-473c-9d64-9b870dee99dc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6cba66c9-14ac-473c-9d64-9b870dee99dc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2c883e9c-42f5-41e9-b234-7e86a4c3c4cb' class='xr-var-data-in' type='checkbox'><label for='data-2c883e9c-42f5-41e9-b234-7e86a4c3c4cb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 997, 998, 999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8cb470d3-0201-491f-91d7-36d08687f1d7' class='xr-section-summary-in' type='checkbox' ><label for='section-8cb470d3-0201-491f-91d7-36d08687f1d7' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.356e+05 1.356e+05 ... 1.356e+05</div><input id='attrs-89c14527-4de5-4cf9-b44d-613bfc83f912' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-89c14527-4de5-4cf9-b44d-613bfc83f912' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7f38f0ca-04d6-4170-9f8e-7b8a4d4e034d' class='xr-var-data-in' type='checkbox'><label for='data-7f38f0ca-04d6-4170-9f8e-7b8a4d4e034d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[135580.50761354, 135580.50946079, 135580.51129329, ...,\n",
" 135581.66923492, 135581.67018921, 135581.672037 ],\n",
" [135580.58928129, 135580.59112179, 135580.59207771, ...,\n",
" 135581.69142579, 135581.69238483, 135581.69335117],\n",
" [135580.527233 , 135580.52820312, 135580.52916713, ...,\n",
" 135581.59564371, 135581.59661417, 135581.59756467],\n",
" [135580.57290021, 135580.57388667, 135580.57440054, ...,\n",
" 135581.67720604, 135581.67816004, 135581.67911542]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8615 1.0 0.9873 ... 0.9558 0.9276</div><input id='attrs-16c4775b-65b0-4ce6-9909-caf0be6769b8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-16c4775b-65b0-4ce6-9909-caf0be6769b8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d3b524e4-60ae-4fe9-b9a9-b9dfaec557d9' class='xr-var-data-in' type='checkbox'><label for='data-d3b524e4-60ae-4fe9-b9a9-b9dfaec557d9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.86147535, 1. , 0.98733096, ..., 0.77412642, 0.99166458,\n",
" 1. ],\n",
" [0.66567752, 0.99400401, 0.54812756, ..., 0.34340114, 0.82191968,\n",
" 0.85166212],\n",
" [0.76077139, 1. , 0.9848221 , ..., 0.9653024 , 0.89673321,\n",
" 0.54210598],\n",
" [0.99209051, 0.28416281, 0.90010907, ..., 0.9494831 , 0.95583095,\n",
" 0.92761481]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>4 4 4 3 4 3 3 3 ... 3 3 3 3 3 3 3 3</div><input id='attrs-5dab3403-1c46-41f8-8088-17c95cb2f307' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5dab3403-1c46-41f8-8088-17c95cb2f307' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7399a976-f8bf-4b6e-b233-6329a1467e77' class='xr-var-data-in' type='checkbox'><label for='data-7399a976-f8bf-4b6e-b233-6329a1467e77' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[4, 4, 4, ..., 3, 4, 3],\n",
" [4, 3, 3, ..., 3, 3, 3],\n",
" [3, 3, 3, ..., 3, 3, 3],\n",
" [3, 2, 3, ..., 3, 3, 3]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-c869ab37-c841-45bb-a11a-b5ea2d59f5b3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c869ab37-c841-45bb-a11a-b5ea2d59f5b3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-db7d3ab5-5d6f-41a9-920a-65b6fe8622e4' class='xr-var-data-in' type='checkbox'><label for='data-db7d3ab5-5d6f-41a9-920a-65b6fe8622e4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
" [nan, nan, nan, ..., nan, nan, nan],\n",
" [nan, nan, nan, ..., nan, nan, nan],\n",
" [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.503 0.503 0.503 ... 0.4153 0.4153</div><input id='attrs-17d287f0-b2e1-4b95-8c9d-26ebbf8e039a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-17d287f0-b2e1-4b95-8c9d-26ebbf8e039a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9f82ff23-5fb3-469d-ba18-93b957660ef4' class='xr-var-data-in' type='checkbox'><label for='data-9f82ff23-5fb3-469d-ba18-93b957660ef4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.50302822, 0.50302822, 0.50302822, ..., 0.50302822, 0.50302822,\n",
" 0.50302822],\n",
" [0.42019779, 0.42019779, 0.42019779, ..., 0.42019779, 0.42019779,\n",
" 0.42019779],\n",
" [0.64865701, 0.64865701, 0.64865701, ..., 0.64865701, 0.64865701,\n",
" 0.64865701],\n",
" [0.41525417, 0.41525417, 0.41525417, ..., 0.41525417, 0.41525417,\n",
" 0.41525417]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>15.0 15.0 15.0 7.0 ... 7.0 7.0 7.0</div><input id='attrs-05951470-c990-49e6-b277-da19def079bf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-05951470-c990-49e6-b277-da19def079bf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-70fa9e32-7739-4a4c-8aad-53722b295cc8' class='xr-var-data-in' type='checkbox'><label for='data-70fa9e32-7739-4a4c-8aad-53722b295cc8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[15., 15., 15., ..., 7., 15., 7.],\n",
" [15., 7., 7., ..., 7., 7., 7.],\n",
" [ 7., 7., 7., ..., 7., 7., 7.],\n",
" [ 7., 3., 7., ..., 7., 7., 7.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5079 -0.2443 ... 0.096 0.2382</div><input id='attrs-e917f47e-b9de-4919-bf5b-43a0d460ade8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e917f47e-b9de-4919-bf5b-43a0d460ade8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0b261437-ef6a-423f-98fd-f0d4adc003a0' class='xr-var-data-in' type='checkbox'><label for='data-0b261437-ef6a-423f-98fd-f0d4adc003a0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.50793015, -0.24430037, -0.52917232, ..., 0.39344958,\n",
" -0.23495379, -0.15992195],\n",
" [ 1.27107322, -0.6389006 , 1.40751264, ..., 2.14751846,\n",
" -1.38421771, 0.40108392],\n",
" [ 0.64466459, -0.52038195, -0.44733845, ..., -0.23446625,\n",
" 0.32697733, 1.35635631],\n",
" [-0.22742139, 1.99921348, 0.22788393, ..., -0.78564424,\n",
" 0.09600201, 0.2381999 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-52a93d1e-88a3-4e2f-ab39-4b3469a58afc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-52a93d1e-88a3-4e2f-ab39-4b3469a58afc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-96f7d73b-3644-4330-824d-cf38364ca658' class='xr-var-data-in' type='checkbox'><label for='data-96f7d73b-3644-4330-824d-cf38364ca658' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
" [False, False, False, ..., False, False, False],\n",
" [False, False, False, ..., False, False, False],\n",
" [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>762.4 756.3 756.6 ... 753.5 753.9</div><input id='attrs-06bcb023-0b16-439a-99ba-93dabb863670' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-06bcb023-0b16-439a-99ba-93dabb863670' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-34f5744c-0b20-4db8-8fd0-e37689b29f18' class='xr-var-data-in' type='checkbox'><label for='data-34f5744c-0b20-4db8-8fd0-e37689b29f18' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[762.41648869, 756.29455876, 756.59374213, ..., 758.20644801,\n",
" 761.26511632, 756.35093197],\n",
" [758.93281113, 754.08090716, 754.84300617, ..., 757.17786149,\n",
" 754.84428581, 760.08507799],\n",
" [756.35739411, 754.24267445, 753.66495484, ..., 759.38010255,\n",
" 758.5504394 , 754.29741669],\n",
" [759.17280904, 761.23339188, 756.12217127, ..., 754.22325433,\n",
" 753.47859169, 753.94949023]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.09871 -0.009506 ... 0.002434</div><input id='attrs-37106c9e-f3ca-406c-b8b3-3d4c20267c76' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-37106c9e-f3ca-406c-b8b3-3d4c20267c76' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7ed753d0-9f2b-4bc4-b812-cae6904be6bb' class='xr-var-data-in' type='checkbox'><label for='data-7ed753d0-9f2b-4bc4-b812-cae6904be6bb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.09871041, -0.00950576, -0.52917232, ..., 0.301087 ,\n",
" -0.19798062, -0.08166106],\n",
" [ 0.15911728, -0.6389006 , 0.13404835, ..., 1.55996202,\n",
" -1.38421771, 0.25583404],\n",
" [ 0.43687494, -0.18311001, -0.01893209, ..., -0.23446625,\n",
" -0.31650912, 0.59130337],\n",
" [-0.22435929, 0. , 0.15275452, ..., -0.66005583,\n",
" 0.09600201, 0.0024336 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.4155 0.4155 ... 0.4389 0.4389</div><input id='attrs-668614a9-93a4-4b7b-96b1-8b43d939de35' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-668614a9-93a4-4b7b-96b1-8b43d939de35' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3f3d357c-8465-4e92-9348-778144a47037' class='xr-var-data-in' type='checkbox'><label for='data-3f3d357c-8465-4e92-9348-778144a47037' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.41549669, 0.41549669, 0.41549669, ..., 0.41549669, 0.41549669,\n",
" 0.41549669],\n",
" [0.45943846, 0.45943846, 0.45943846, ..., 0.45943846, 0.45943846,\n",
" 0.45943846],\n",
" [0.47165357, 0.47165357, 0.47165357, ..., 0.47165357, 0.47165357,\n",
" 0.47165357],\n",
" [0.43888963, 0.43888963, 0.43888963, ..., 0.43888963, 0.43888963,\n",
" 0.43888963]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.001769 0.001763 ... 0.0008867</div><input id='attrs-f57e7588-06dc-4e85-8b85-1ab2189714e5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f57e7588-06dc-4e85-8b85-1ab2189714e5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8b7ab606-0596-49b4-a581-0d1f86d96b57' class='xr-var-data-in' type='checkbox'><label for='data-8b7ab606-0596-49b4-a581-0d1f86d96b57' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00176879, 0.00176321, 0.00175775, ..., 0.00089038, 0.00177838,\n",
" 0.00089625],\n",
" [0.001765 , 0.000888 , 0.00088558, ..., 0.0008925 , 0.00090258,\n",
" 0.00089471],\n",
" [0.00089317, 0.00089346, 0.00088829, ..., 0.00090321, 0.00088946,\n",
" 0.00088625],\n",
" [0.00090608, 0.00045167, 0.00087554, ..., 0.00089113, 0.000891 ,\n",
" 0.00088667]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.001768 0.001763 ... 0.000886</div><input id='attrs-a8f549e2-02d3-42fd-b232-7214d1309b1d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a8f549e2-02d3-42fd-b232-7214d1309b1d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9917f868-8939-460d-87bd-3b41779cca52' class='xr-var-data-in' type='checkbox'><label for='data-9917f868-8939-460d-87bd-3b41779cca52' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.001768, 0.001763, 0.001757, ..., 0.00089 , 0.001774, 0.000895],\n",
" [0.001765, 0.000887, 0.000885, ..., 0.000892, 0.000899, 0.000895],\n",
" [0.000889, 0.000894, 0.000888, ..., 0.000897, 0.000889, 0.000885],\n",
" [0.00089 , 0.000452, 0.000875, ..., 0.00089 , 0.00089 , 0.000886]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-51ff71c1-7c86-491c-8d59-1aa8c4b5e92f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-51ff71c1-7c86-491c-8d59-1aa8c4b5e92f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e74d5c5b-857e-45d4-acab-d4d97977354a' class='xr-var-data-in' type='checkbox'><label for='data-e74d5c5b-857e-45d4-acab-d4d97977354a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
" [False, False, False, ..., False, False, False],\n",
" [False, False, False, ..., False, False, False],\n",
" [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-3d2592d1-d081-4861-8be5-f1c297e2712b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3d2592d1-d081-4861-8be5-f1c297e2712b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f12ce584-fc18-4206-8e91-225d20e51839' class='xr-var-data-in' type='checkbox'><label for='data-f12ce584-fc18-4206-8e91-225d20e51839' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
" [nan, nan, nan, ..., nan, nan, nan],\n",
" [nan, nan, nan, ..., nan, nan, nan],\n",
" [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>5 -13 3 -2 -5 -3 ... -3 6 3 1 -5 2</div><input id='attrs-f41b5560-0d42-45ed-88f2-e1fa5a96358b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f41b5560-0d42-45ed-88f2-e1fa5a96358b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-69a53251-1fd9-4d75-a7e6-5df445421862' class='xr-var-data-in' type='checkbox'><label for='data-69a53251-1fd9-4d75-a7e6-5df445421862' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 5, -13, 3, ..., -5, 9, -2],\n",
" [ 7, -6, -7, ..., 6, -4, -2],\n",
" [ 2, -2, 3, ..., 6, 1, 3],\n",
" [ 3, 0, -3, ..., 1, -5, 2]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-752.6 -752.5 ... -752.2 -752.2</div><input id='attrs-da0b2870-3e15-4eab-8dab-f2fd61712961' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-da0b2870-3e15-4eab-8dab-f2fd61712961' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-affd10ea-32d0-4d35-9f1a-ca73d0dc4045' class='xr-var-data-in' type='checkbox'><label for='data-affd10ea-32d0-4d35-9f1a-ca73d0dc4045' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-752.57524447, -752.50997857, -752.26853118, ..., -755.28586501,\n",
" -755.29906947, -753.77582024],\n",
" [-753.49865455, -751.73560526, -753.01151451, ..., -753.95811456,\n",
" -752.11878761, -755.43515252],\n",
" [-753.09012901, -752.49309759, -751.35723565, ..., -753.78676766,\n",
" -751.09124097, -752.74832808],\n",
" [-752.34227867, -752.34227867, -752.86922369, ..., -751.65771443,\n",
" -752.24336677, -752.23349118]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-47ff6c6c-be57-46ea-891f-483780efe093' class='xr-section-summary-in' type='checkbox' ><label for='section-47ff6c6c-be57-46ea-891f-483780efe093' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-70904207-92ac-45a7-bdc0-0ae05a26b6b6' class='xr-index-data-in' type='checkbox'/><label for='index-70904207-92ac-45a7-bdc0-0ae05a26b6b6' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-50a6b91d-7dd0-45de-a82c-0a26a32e10af' class='xr-index-data-in' type='checkbox'/><label for='index-50a6b91d-7dd0-45de-a82c-0a26a32e10af' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n",
" ...\n",
" 990, 991, 992, 993, 994, 995, 996, 997, 998, 999],\n",
" dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=1000))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-02f99514-2ff9-41ed-b4b4-8ac42c5c8410' class='xr-section-summary-in' type='checkbox' checked><label for='section-02f99514-2ff9-41ed-b4b4-8ac42c5c8410' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-11-17T08:11:21.696419</dd><dt><span>arviz_version :</span></dt><dd>0.16.1</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.8.1</dd><dt><span>sampling_time :</span></dt><dd>2.6377978324890137</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0.dev0</dd></dl></div></li></ul></div></div><br></div>\n",
" </ul>\n",
" </div>\n",
" </li>\n",
" \n",
" <li class = \"xr-section-item\">\n",
" <input id=\"idata_data77340593-cbc4-44d1-ba6d-4259227a473c\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
" <label for=\"idata_data77340593-cbc4-44d1-ba6d-4259227a473c\" class = \"xr-section-summary\">data</label>\n",
" <div class=\"xr-section-inline-details\"></div>\n",
" <div class=\"xr-section-details\">\n",
" <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
" <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
"Dimensions: (count_obs: 12)\n",
"Coordinates:\n",
" * count_obs (count_obs) int64 0 1 2 3 4 5 6 7 8 9 10 11\n",
"Data variables:\n",
" child (count_obs) float32 0.0 0.0 0.0 0.0 1.0 ... 1.0 2.0 2.0 2.0 2.0\n",
" livebait (count_obs) int64 0 0 1 1 0 0 1 1 0 0 1 1\n",
" persons (count_obs) float32 1.0 4.0 1.0 4.0 1.0 ... 4.0 1.0 4.0 1.0 4.0\n",
" camper (count_obs) float64 1.0 1.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0 1.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-0b2251e5-91ff-4ee8-bbe6-0aec7651e664' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-0b2251e5-91ff-4ee8-bbe6-0aec7651e664' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>count_obs</span>: 12</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-ca2a26c7-e34d-4c43-b08e-e5868ceb92bc' class='xr-section-summary-in' type='checkbox' checked><label for='section-ca2a26c7-e34d-4c43-b08e-e5868ceb92bc' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>count_obs</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 7 8 9 10 11</div><input id='attrs-7b29cc16-4349-4373-bc73-e568fdf9c4bd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7b29cc16-4349-4373-bc73-e568fdf9c4bd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6dab0c25-2fbc-480e-a801-4cd74e785597' class='xr-var-data-in' type='checkbox'><label for='data-6dab0c25-2fbc-480e-a801-4cd74e785597' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-09fc1dde-e86e-4df2-a29c-b7dd13ada589' class='xr-section-summary-in' type='checkbox' checked><label for='section-09fc1dde-e86e-4df2-a29c-b7dd13ada589' class='xr-section-summary' >Data variables: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>child</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>0.0 0.0 0.0 0.0 ... 2.0 2.0 2.0 2.0</div><input id='attrs-36391c7f-9fc9-4a84-aebf-55b096ae6e1b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-36391c7f-9fc9-4a84-aebf-55b096ae6e1b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b0b69809-1534-4d17-b9ff-8d697e3ff9c0' class='xr-var-data-in' type='checkbox'><label for='data-b0b69809-1534-4d17-b9ff-8d697e3ff9c0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0., 0., 0., 0., 1., 1., 1., 1., 2., 2., 2., 2.], dtype=float32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>livebait</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 1 1 0 0 1 1 0 0 1 1</div><input id='attrs-dd49daaf-d77d-410d-8282-26c4d9599a91' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dd49daaf-d77d-410d-8282-26c4d9599a91' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7b91c53d-8364-48a4-9fe5-81f78a8777bf' class='xr-var-data-in' type='checkbox'><label for='data-7b91c53d-8364-48a4-9fe5-81f78a8777bf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>persons</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>1.0 4.0 1.0 4.0 ... 1.0 4.0 1.0 4.0</div><input id='attrs-0c471908-0adc-408b-b679-d32f137aaaca' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0c471908-0adc-408b-b679-d32f137aaaca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e2bc393d-8782-40b7-80b5-51dcb98c2404' class='xr-var-data-in' type='checkbox'><label for='data-e2bc393d-8782-40b7-80b5-51dcb98c2404' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1., 4., 1., 4., 1., 4., 1., 4., 1., 4., 1., 4.], dtype=float32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>camper</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0</div><input id='attrs-1aa1b388-e742-4e7b-aa92-d18246d60594' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1aa1b388-e742-4e7b-aa92-d18246d60594' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e249af86-56c8-43ea-9d8c-7c1c9caccb62' class='xr-var-data-in' type='checkbox'><label for='data-e249af86-56c8-43ea-9d8c-7c1c9caccb62' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7a12f411-167e-4b31-a0da-49dcc0a1c087' class='xr-section-summary-in' type='checkbox' ><label for='section-7a12f411-167e-4b31-a0da-49dcc0a1c087' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>count_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-80f20417-7c66-4304-a1e9-b6a4b994b975' class='xr-index-data-in' type='checkbox'/><label for='index-80f20417-7c66-4304-a1e9-b6a4b994b975' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(RangeIndex(start=0, stop=12, step=1, name=&#x27;count_obs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f6e42a68-73a6-45a0-a6f1-5a1cd2f61912' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f6e42a68-73a6-45a0-a6f1-5a1cd2f61912' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div><br></div>\n",
" </ul>\n",
" </div>\n",
" </li>\n",
" \n",
" </ul>\n",
" </div>\n",
" <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-sections.group-sections {\n",
" grid-template-columns: auto;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt, dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2 {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
".xr-wrap{width:700px!important;} </style>"
],
"text/plain": [
"Inference data with groups:\n",
"\t> posterior\n",
"\t> sample_stats\n",
"\t> data"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"idata"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Compute comparisons"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"def select_draws(idata, condition_idx):\n",
" draws = idata.posterior.isel(count_obs=condition_idx)[\"count_mean\"]\n",
" \n",
" # This assumes that the 'count_obs' coordinate aligns between the data and \n",
" # posterior group and that the length of the condition_indices matches the \n",
" # size of the 'count_obs' dimension in posterior\n",
" # \n",
" # We can't use `.reset_coords(names=\"count_obs\")` unfortunately\n",
" draws = draws.assign_coords({\"count_obs\": np.arange(len(condition_idx))}) \n",
" \n",
" return draws "
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"idx_1 = np.where(idata.data.persons == 1)[0]\n",
"idx_4 = np.where(idata.data.persons == 4)[0]\n",
"\n",
"draws_1 = select_draws(idata, idx_1)\n",
"draws_4 = select_draws(idata, idx_4)\n",
"\n",
"diff = (draws_4 - draws_1).mean((\"chain\", \"draw\")) "
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;count_mean&#x27; (count_obs: 6)&gt;\n",
"array([ 4.83168335, 26.41445181, 1.2018792 , 6.57251574, 0.30176015,\n",
" 1.65065557])\n",
"Coordinates:\n",
" * count_obs (count_obs) int64 0 1 2 3 4 5</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'count_mean'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>count_obs</span>: 6</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-97259bdf-e1b7-46ea-aa3e-411bf169b3fb' class='xr-array-in' type='checkbox' checked><label for='section-97259bdf-e1b7-46ea-aa3e-411bf169b3fb' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>4.832 26.41 1.202 6.573 0.3018 1.651</span></div><div class='xr-array-data'><pre>array([ 4.83168335, 26.41445181, 1.2018792 , 6.57251574, 0.30176015,\n",
" 1.65065557])</pre></div></div></li><li class='xr-section-item'><input id='section-664f107d-bec4-44d6-91c6-804e097f3ddd' class='xr-section-summary-in' type='checkbox' checked><label for='section-664f107d-bec4-44d6-91c6-804e097f3ddd' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>count_obs</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5</div><input id='attrs-5f190f89-6c0b-48aa-bd41-8d886784bbca' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5f190f89-6c0b-48aa-bd41-8d886784bbca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e2f4e331-9621-44e1-9737-0ec45ba7fb5e' class='xr-var-data-in' type='checkbox'><label for='data-e2f4e331-9621-44e1-9737-0ec45ba7fb5e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3, 4, 5])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-fb73bfa9-3b82-47cd-bcb7-660a13a5dcc0' class='xr-section-summary-in' type='checkbox' ><label for='section-fb73bfa9-3b82-47cd-bcb7-660a13a5dcc0' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>count_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-db92a3d4-acd7-4a45-ad9e-2ecfbb578dae' class='xr-index-data-in' type='checkbox'/><label for='index-db92a3d4-acd7-4a45-ad9e-2ecfbb578dae' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3, 4, 5], dtype=&#x27;int64&#x27;, name=&#x27;count_obs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c06f1226-71b9-44c7-b91a-6b8d220427e2' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c06f1226-71b9-44c7-b91a-6b8d220427e2' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'count_mean' (count_obs: 6)>\n",
"array([ 4.83168335, 26.41445181, 1.2018792 , 6.57251574, 0.30176015,\n",
" 1.65065557])\n",
"Coordinates:\n",
" * count_obs (count_obs) int64 0 1 2 3 4 5"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# voila! It is the same as the mean estimate in the summary dataframe below\n",
"diff"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>term</th>\n",
" <th>estimate_type</th>\n",
" <th>value</th>\n",
" <th>child</th>\n",
" <th>livebait</th>\n",
" <th>camper</th>\n",
" <th>estimate</th>\n",
" <th>lower_3.0%</th>\n",
" <th>upper_97.0%</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>persons</td>\n",
" <td>diff</td>\n",
" <td>(1.0, 4.0)</td>\n",
" <td>0.0</td>\n",
" <td>0</td>\n",
" <td>1.0</td>\n",
" <td>4.831683</td>\n",
" <td>2.909370</td>\n",
" <td>7.073955</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>persons</td>\n",
" <td>diff</td>\n",
" <td>(1.0, 4.0)</td>\n",
" <td>0.0</td>\n",
" <td>1</td>\n",
" <td>1.0</td>\n",
" <td>26.414452</td>\n",
" <td>23.568353</td>\n",
" <td>29.072532</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>persons</td>\n",
" <td>diff</td>\n",
" <td>(1.0, 4.0)</td>\n",
" <td>1.0</td>\n",
" <td>0</td>\n",
" <td>1.0</td>\n",
" <td>1.201879</td>\n",
" <td>0.672277</td>\n",
" <td>1.753951</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>persons</td>\n",
" <td>diff</td>\n",
" <td>(1.0, 4.0)</td>\n",
" <td>1.0</td>\n",
" <td>1</td>\n",
" <td>1.0</td>\n",
" <td>6.572516</td>\n",
" <td>5.394754</td>\n",
" <td>7.683195</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>persons</td>\n",
" <td>diff</td>\n",
" <td>(1.0, 4.0)</td>\n",
" <td>2.0</td>\n",
" <td>0</td>\n",
" <td>1.0</td>\n",
" <td>0.301760</td>\n",
" <td>0.149565</td>\n",
" <td>0.468102</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>persons</td>\n",
" <td>diff</td>\n",
" <td>(1.0, 4.0)</td>\n",
" <td>2.0</td>\n",
" <td>1</td>\n",
" <td>1.0</td>\n",
" <td>1.650656</td>\n",
" <td>1.105334</td>\n",
" <td>2.223805</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" term estimate_type value child livebait camper estimate \\\n",
"0 persons diff (1.0, 4.0) 0.0 0 1.0 4.831683 \n",
"1 persons diff (1.0, 4.0) 0.0 1 1.0 26.414452 \n",
"2 persons diff (1.0, 4.0) 1.0 0 1.0 1.201879 \n",
"3 persons diff (1.0, 4.0) 1.0 1 1.0 6.572516 \n",
"4 persons diff (1.0, 4.0) 2.0 0 1.0 0.301760 \n",
"5 persons diff (1.0, 4.0) 2.0 1 1.0 1.650656 \n",
"\n",
" lower_3.0% upper_97.0% \n",
"0 2.909370 7.073955 \n",
"1 23.568353 29.072532 \n",
"2 0.672277 1.753951 \n",
"3 5.394754 7.683195 \n",
"4 0.149565 0.468102 \n",
"5 1.105334 2.223805 "
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"summary_df = bmb.interpret.comparisons(\n",
" model=fish_model,\n",
" idata=fish_idata,\n",
" contrast={\"persons\": [1, 4]},\n",
" conditional={\"child\": [0, 1, 2], \"livebait\": [0, 1]},\n",
" return_idata=False\n",
")\n",
"summary_df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Cross comparisons\n",
"\n",
"Comparing between contrasts and levels (if `conditional` values are categorical).\n",
"\n",
"The `np.where` function below returns a boolean array "
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"## Copmarison One --> row 0 in summary_df above ##\n",
"idx_11 = np.where(\n",
" (idata.data.persons == 1) & (idata.data.child == 0) & (idata.data.livebait == 0)\n",
")[0]\n",
"idx_14 = np.where(\n",
" (idata.data.persons == 4) & (idata.data.child == 0) & (idata.data.livebait == 0)\n",
")[0]\n",
"\n",
"draws_11 = select_draws(idata, idx_11)\n",
"draws_14 = select_draws(idata, idx_14)\n",
"\n",
"diff_1 = (draws_14 - draws_11)\n",
"\n",
"## Copmarison Two --> row 1 in summary_df above ##\n",
"idx_21 = np.where(\n",
" (idata.data.persons == 1) & (idata.data.child == 0) & (idata.data.livebait == 1)\n",
")[0]\n",
"idx_24 = np.where(\n",
" (idata.data.persons == 4) & (idata.data.child == 0) & (idata.data.livebait == 1)\n",
")[0]\n",
"\n",
"draws_21 = select_draws(idata, idx_21)\n",
"draws_24 = select_draws(idata, idx_24)\n",
"\n",
"diff_2 = (draws_24 - draws_21)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"After computing the \"first level\" comparison (`diff_1` and `diff_2`) we can compute the difference between these two differences to obtain a _cross-comparison_. The cross-comparison is useful for when we want to know what happens when two (or more) predictors change at the same time."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<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>\n",
"<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>\n",
"<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>\n",
"<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>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body[data-theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2,\n",
".xr-no-icon {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;count_mean&#x27; (count_obs: 1)&gt;\n",
"array([21.58276847])\n",
"Coordinates:\n",
" * count_obs (count_obs) int64 0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'count_mean'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>count_obs</span>: 1</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-0e8ec319-450f-4b09-bb18-93d4cf5e6c4f' class='xr-array-in' type='checkbox' checked><label for='section-0e8ec319-450f-4b09-bb18-93d4cf5e6c4f' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>21.58</span></div><div class='xr-array-data'><pre>array([21.58276847])</pre></div></div></li><li class='xr-section-item'><input id='section-11a4fadc-7e43-4e0a-b497-55ecb43a6e5b' class='xr-section-summary-in' type='checkbox' checked><label for='section-11a4fadc-7e43-4e0a-b497-55ecb43a6e5b' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>count_obs</span></div><div class='xr-var-dims'>(count_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-32f11d04-5b00-4de7-b6da-705a31098ecb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-32f11d04-5b00-4de7-b6da-705a31098ecb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a6ac0882-3110-4130-9860-dcc9c529db16' class='xr-var-data-in' type='checkbox'><label for='data-a6ac0882-3110-4130-9860-dcc9c529db16' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7a85b9e2-1cc1-45c2-aeb5-7b6b76c08c0c' class='xr-section-summary-in' type='checkbox' ><label for='section-7a85b9e2-1cc1-45c2-aeb5-7b6b76c08c0c' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>count_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-0c2b10f0-cc87-482f-b7b1-7e7ddc2a306c' class='xr-index-data-in' type='checkbox'/><label for='index-0c2b10f0-cc87-482f-b7b1-7e7ddc2a306c' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0], dtype=&#x27;int64&#x27;, name=&#x27;count_obs&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-31ed1c13-8336-41c8-b139-b94c513b2858' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-31ed1c13-8336-41c8-b139-b94c513b2858' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'count_mean' (count_obs: 1)>\n",
"array([21.58276847])\n",
"Coordinates:\n",
" * count_obs (count_obs) int64 0"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# The value of 21.6 makes sense because if we subtract the estimate of\n",
"# row 1 from row 0 in summary_df above, we get 21.582769\n",
"cross_comparison = (diff_2 - diff_1).mean((\"chain\", \"draw\"))\n",
"cross_comparison"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "bambinos",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment