Update notebook Regression Models with Ordered Categorical Outcomes#578
Update notebook Regression Models with Ordered Categorical Outcomes#578mihagazvoda wants to merge 2 commits intopymc-devs:mainfrom
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
drbenvincent
left a comment
There was a problem hiding this comment.
Hi @mihagazvoda. Changes to the notebook look good. I've just left a comment about a few (unintentional?) changes to unrelated files.
There was a problem hiding this comment.
There are minor changes in this file which seem unrelated to the ordinal regression notebook that have snuck in accidentally?
There was a problem hiding this comment.
This was because of pre-commit. It happened the same of others, for example: #575
I think we should keep them otherwise everyone will have to manually remove them.
There was a problem hiding this comment.
There are minor changes in this file which seem unrelated to the ordinal regression notebook that have snuck in accidentally?
There was a problem hiding this comment.
There are minor changes in this file which seem unrelated to the ordinal regression notebook that have snuck in accidentally?
There was a problem hiding this comment.
There are minor changes in this file which seem unrelated to the ordinal regression notebook that have snuck in accidentally?
| ```{code-cell} ipython3 | ||
| import warnings | ||
|
|
||
| warnings.simplefilter(action="ignore", category=FutureWarning) |
There was a problem hiding this comment.
We should aim to fix the warnings instead of ignoring them. Can you share what warnings you got? We might be able to help
There was a problem hiding this comment.
I got:
[/Users/mihagazvoda/miniconda3/envs/pymc-dev/lib/python3.11/site-packages/arviz/stats/stats.py:307](https://file+.vscode-resource.vscode-cdn.net/Users/mihagazvoda/miniconda3/envs/pymc-dev/lib/python3.11/site-packages/arviz/stats/stats.py:307): FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'False' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
df_comp.loc[val] = (
[/Users/mihagazvoda/miniconda3/envs/pymc-dev/lib/python3.11/site-packages/arviz/stats/stats.py:307](https://file+.vscode-resource.vscode-cdn.net/Users/mihagazvoda/miniconda3/envs/pymc-dev/lib/python3.11/site-packages/arviz/stats/stats.py:307): FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'log' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
df_comp.loc[val] = (
[/Users/mihagazvoda/miniconda3/envs/pymc-dev/lib/python3.11/site-packages/arviz/plots/backends/matplotlib/compareplot.py:87](https://file+.vscode-resource.vscode-cdn.net/Users/mihagazvoda/miniconda3/envs/pymc-dev/lib/python3.11/site-packages/arviz/plots/backends/matplotlib/compareplot.py:87): FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
scale = comp_df["scale"][0]
…replace univariate_ordered with ordered, filter future warnings
ab31e74 to
c28a115
Compare
|
I have rebased on main, and I think the warnings have all been fixed already by the respective libraries. However the notebook still needs to be executed start to end |
Issue 577
As a part of PyData Amsterdam PyMC sprint, I updated the notebook. I improved:
univariate_orderedwithorderedpandas.Note that pre-commit checks also affected a few other files.
Helpful links