-
-
Notifications
You must be signed in to change notification settings - Fork 269
Update ModelBuilder to show regression lines #538
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
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
examples/howto/model_builder.myst.md
Outdated
marker="x", | ||
label="predict", | ||
), | ||
ax.plot( |
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.
The changes are modifying an x vs y plot to two line plots where the x axis is always an arange and the y axis is mapped to the values in the 1st plot and to the y values in the 2nd plot. Mapping these two different quantities to the same axis is definitely wrong and should be changed. I think what @fonnesbeck wanted in the issue was having both scatter x vs y of the predictions along with the x vs y of the regressions lines from the model that generated those predictions. It would have a similar look to the last image in https://www.pymc.io/projects/examples/en/latest/generalized_linear_models/GLM-robust.html but with the x_pred / pred_means["y"] as the scatter instead of truth valued and no true regression line
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.
Ok, I get the picture now, I will work on it
We also recently changed the API of ModelBuilder (slightly), are you interested in bringing this example up-to-date? Here is the PR: pymc-devs/pymc-extras#131 |
When I tried to plot the graph of the truth values and the predicted values in one figure, I got this graph and upon investing further, I noticed the truth value data is more of a wavelength dataset than a regression dataset. That was probably the reason a line can't be used as a connector because there is no pattern in the data for the graph to be formed on. |
@Monsurat-Onabajo The upload didn't work, you might have to wait a bit longer. |
I have uploaded it again |
@Monsurat-Onabajo @BerylKanali if you don't mind waiting we can take a look this Thursday, maybe it is easier to solve in the sync session |
@OriolAbril Sure. We can look at it then. |
@fonnesbeck I made additional changes with the guidance of @OriolAbril |
Goodjob beryl |
@cluhmann Here is the PR from yesterday's session. I worked on it with @Monsurat-Onabajo
Towards #530
cc: @fonnesbeck @reshamas