Skip to content

[RFC 0005] Reconstruct BARTSamples / BCFSamples from JSON #406

Description

@andrewherren
  • Envelope write (R/Python): gather scalars/params from the held BART/BCFSamples, serialize forests via the existing C++ ForestContainer serialization, serialize random effects similarly, assemble the unified envelope, and embed the language's native covariate_preprocessor + portability header (the native preprocessor stays serialized by the language that owns it).
  • Envelope read (R/Python): parse the unified envelope; load forests via the existing procedures; rebuild the preprocessor (if cross-platform be sure to handle all-numeric instructions correctly).
  • BART/BCFSamples construction: populate/construct an in-memory samples object from R/Python-provided forest containers + parameter arrays (copying parameter array, moving pointers).
  • Sampler takes BARTSampler(BARTSamples&, …) / BCFSampler(BCFSamples&, …) -- continued sampling operates on the in-memory object; from-disk = read -> populate -> resume.
  • Round-trip parity: write -> read -> identical in-memory state (both languages).
  • Cross-platform: an R-written numeric model populates a BARTSamples in Python (and vice versa) and predicts / continues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions