Skip to content
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

plot_lm doesn't work with y_model and multidimensional y #1992

Open
colehaus opened this issue Mar 4, 2022 · 4 comments
Open

plot_lm doesn't work with y_model and multidimensional y #1992

colehaus opened this issue Mar 4, 2022 · 4 comments
Labels

Comments

@colehaus
Copy link

colehaus commented Mar 4, 2022

Describe the bug
When the y_model argument to plot_lm is used with multidimensional y, an exception is thrown instead of the appropriate plots being generated.

To Reproduce

See this notebook: https://gist.github.com/colehaus/b2aa195687f53ef7c86eec2ebb3798c2

Expected behavior
I expected a collection of plots to be generated just like happens with plot_dim ordinarily, but there should also be the model info in the plot as happens when a single-dimensional plot is created.

Additional context
Arviz version is 0.11.4.

@ayashabbar
Copy link

Hello @colehaus
I would like to contribute to this issue. Are there any updated output you came across?
Thanks in advance,
A. Shabbar

@colehaus
Copy link
Author

Hi, thanks for looking at it. I haven't looked into the issue at all since opening it. So the notebook is still the most up-to-date reflection of the situation.

@itsdivya1309
Copy link

Hii, has the issue been resolved? If not, I would like to work on this issue.

@uzairgheewala
Copy link

Hi @colehaus hope all is well.

I've submitted PR #2408 that fixes the dimension handling issues with plot_lm when using y_model with multidimensional data.
The PR addresses both failure cases mentioned in your notebook and introduces a test to prevent any regressions.

For lines mode: Fixed sample indexing and dimension handling to properly maintain the relationship between samples and x-points
For HDI mode: Corrected the data reshape operations to ensure samples are properly aligned.

Please let me know if there are any further issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants