Skip to content

Fix sample/weight misalignment in tp_parse_smc() & tp_parse_mcmc() - #30

Open
foersterst wants to merge 5 commits into
treeppl:mainfrom
foersterst:vignettes
Open

Fix sample/weight misalignment in tp_parse_smc() & tp_parse_mcmc()#30
foersterst wants to merge 5 commits into
treeppl:mainfrom
foersterst:vignettes

Conversation

@foersterst

Copy link
Copy Markdown
Contributor

When processing the list produced by tp_run(), unlist() silently broke alignment between samples and weights when mixed types (e.g., number and -inf; note that -inf (lowercase) is read by R as character rather than -Inf) or multi-value samples were present.


TreePPL Release Notes

Added

Changed

  • treepplr 0.4: Updated roxygen documentation for tp_parse_smc() and tp_parse_mcmc(). Changed their output objects to tidy data frames.

Deprecated

Removed

Fixed

  • treepplr 0.4: tp_parse_smc() and tp_parse_mcmc() now parse per-particle/iteration with explicit indices and (for SMC) join weights by index using left_join(..., by = "particle") instead of relying on positional recycling, which is the default behavior of data.frame() when handling vectors of different lengths.

Security

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