Skip to content

update GLM-truncated-censored-regression for PyMC 6#878

Open
fonnesbeck wants to merge 1 commit into
pymc-devs:mainfrom
fonnesbeck:update/glm-truncated-censored-arviz1
Open

update GLM-truncated-censored-regression for PyMC 6#878
fonnesbeck wants to merge 1 commit into
pymc-devs:mainfrom
fonnesbeck:update/glm-truncated-censored-arviz1

Conversation

@fonnesbeck
Copy link
Copy Markdown
Member

@fonnesbeck fonnesbeck commented May 10, 2026

Summary

  • Replace four az.plot_posterior(..., ref_val=...) calls with az.plot_dist(...) + az.add_lines(pc, {"slope": slope}) since ref_val= was removed and add_lines now takes a PlotCollection.
  • Used pc.add_title(...) instead of pc.figure.suptitle(...) (the latter is not exposed on PlotCollection);
  • dropped the shared fig, ax = plt.subplots(...) grid since the modular API doesn't accept Axes.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@fonnesbeck fonnesbeck changed the title update GLM-truncated-censored-regression for arviz 1 update GLM-truncated-censored-regression for PyMC 6 May 10, 2026
@review-notebook-app
Copy link
Copy Markdown

review-notebook-app Bot commented May 11, 2026

View / edit / reply to this conversation on ReviewNB

aloctavodia commented on 2026-05-11T07:17:29Z
----------------------------------------------------------------

Something like this could also work here:

pc = az.plot_dist({"linear": trunc_linear_fit,

"censored":cens_linear_fit},

var_names=["slope"],

visuals={"point_estimate_text": False,

"title": {"text": "Linear regression"},

}

)

az.add_lines(pc, slope)

pc.add_legend("model")


@review-notebook-app
Copy link
Copy Markdown

review-notebook-app Bot commented May 11, 2026

View / edit / reply to this conversation on ReviewNB

aloctavodia commented on 2026-05-11T07:17:30Z
----------------------------------------------------------------

similar to my previous comment


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant