Skip to content

Commit 18156de

Browse files
committed
add warning about encoding of the categorical outcome
Signed-off-by: Nathaniel <[email protected]>
1 parent 4a8148f commit 18156de

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

examples/generalized_linear_models/GLM-discrete-choice_models.ipynb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,13 @@
636636
"pm.model_to_graphviz(model_1)"
637637
]
638638
},
639+
{
640+
"cell_type": "markdown",
641+
"metadata": {},
642+
"source": [
643+
"Note that you need to be careful with the encoding of the outcome variable. The categorical ordering should reflect the ordering of the utilities as they are stacked into the softmax transform and then fed into the likelihood term. "
644+
]
645+
},
639646
{
640647
"cell_type": "code",
641648
"execution_count": 6,

examples/generalized_linear_models/GLM-discrete-choice_models.myst.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ with pm.Model(coords=coords) as model_1:
168168
pm.model_to_graphviz(model_1)
169169
```
170170

171+
Note that you need to be careful with the encoding of the outcome variable. The categorical ordering should reflect the ordering of the utilities as they are stacked into the softmax transform and then fed into the likelihood term.
172+
171173
```{code-cell} ipython3
172174
idata_m1
173175
```

0 commit comments

Comments
 (0)