-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update notebook Regression Models with Ordered Categorical Outcomes #578
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mihagazvoda. Changes to the notebook look good. I've just left a comment about a few (unintentional?) changes to unrelated files.
examples/case_studies/nyc_bym.ipynb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are minor changes in this file which seem unrelated to the ordinal regression notebook that have snuck in accidentally?
examples/howto/model_builder.ipynb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are minor changes in this file which seem unrelated to the ordinal regression notebook that have snuck in accidentally?
examples/howto/model_builder.myst.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are minor changes in this file which seem unrelated to the ordinal regression notebook that have snuck in accidentally?
@@ -20,6 +20,10 @@ kernelspec: | |||
::: | |||
|
|||
```{code-cell} ipython3 | |||
import warnings | |||
|
|||
warnings.simplefilter(action="ignore", category=FutureWarning) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_ordered
withordered
pandas
.Note that pre-commit checks also affected a few other files.
Helpful links