"
],
"text/plain": [
" mean sd hdi_3% hdi_97%\n",
"delta[0] 1.000 0.021 1.0 1.0\n",
"delta[1] 0.931 0.254 0.0 1.0\n",
"delta[2] 0.430 0.495 0.0 1.0\n",
"delta[3] 0.941 0.235 1.0 1.0"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"az.summary(trace, var_names=\"delta\", kind=\"stats\")"
]
},
{
"cell_type": "markdown",
"id": "bf73349c-5ed5-41de-a740-3f147ad374cc",
"metadata": {},
"source": [
"Delta values, representing how often each feature was selected for the model, match the BUGS results. But what about looking at how often each model was selected? I really don't want to code that quadruple for-loop (the model variable in the BUGS example) or try to vectorize it.\n",
"\n",
"Let's look in the trace. We can view the delta variable across all chains and samples."
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "348211f0-da7b-4b8d-be3c-db0c0885794f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"