Skip to content

Development - #299

Merged
MansMeg merged 104 commits into
masterfrom
development
Sep 5, 2026
Merged

Development#299
MansMeg merged 104 commits into
masterfrom
development

Conversation

@MansMeg

@MansMeg MansMeg commented Aug 12, 2025

Copy link
Copy Markdown
Collaborator

New version of posteriordb

MansMeg and others added 27 commits February 3, 2026 14:20
Implement Poisson GLM model in PyMC
Implement earnings-height model in pymc
Eight schools noncentered model in PyMC
Add PyMC translations for 68 Stan models that follow idiomatic PyMC
patterns: no Potentials, no custom helper functions, and all numpy
data wrangling occurs before the pm.Model context.

Models span: GLMs (wells, radon, kidscore, logearn variants),
GPs (gp_regr, gp_pois_regr), mixture models, educational models
(eight_schools, rats, diamonds), and ecological models (seeds, dogs).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address review comments on PR #319:
- Remove unnecessary comments (let the code speak)
- Add prior_only parameter consistently to all 68 models
- Define Deterministics before likelihood, reference in observed
- Fix variable names to match semantics (e.g. logit_p not p)
- Remove dangling code from removed normalization corrections
- Net -464 lines (295 added for prior_only, 759 removed)

Applied via: transpailer refine --skill pymc_idiomaticity --in-place

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- accel_splines: remove rename-only Deterministics, move data before model
- log10earn_height: remove dangling N_obs variable
- low_dim_gauss_mix_collapse: use pm.NormalMixture instead of pm.Mixture
- normal_mixture: use pm.NormalMixture instead of pm.Mixture

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PyMC implementation of M0 model
Removed 'lockdown' and 'gamma' dimensions from the JSON.
Fix spec of covid posterior
Re-dumped affected info.json files with ensure_ascii=False so the umlaut
in 'Oliver Järnefelt' is preserved as a literal UTF-8 character rather
than the \u00e4 escape sequence.

Addresses review feedback from @JTorgander on PR #319.
The previous structure imported pymc, pytensor, and numpy inside
make_model(), but the function's return type annotation '-> pm.Model'
is evaluated at definition time, before those imports run, causing
NameError on module load.

Moving all imports to the module top resolves type annotations correctly
and is also more idiomatic Python.

Reported by @JTorgander in review of #319.
Add 68 idiomatic PyMC model implementations
@MansMeg MansMeg self-assigned this Sep 5, 2026
@MansMeg
MansMeg merged commit 5545a1d into master Sep 5, 2026
2 checks passed
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.

9 participants