Development - #299
Merged
Merged
Conversation
I used the standard configuration of Ruff for this.
Fixing GLMM_Poisson model prior
fixing typos
Implement Poisson GLM model in PyMC
FIXES model info typo
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New version of posteriordb