ciemss / pyciemss

Causal and probabilistic reasoning with continuous time dynamical systems
Other
17 stars 6 forks source link

Add solution mappings to ensemble functionality #471

Closed SamWitty closed 7 months ago

SamWitty commented 7 months ago

This PR addresses #449 , and adds additional tests to ensure coverage of solution_mappings.

In the process, this PR changes how the CompiledDynamics modules interact with the ChiRho LogTrajectory handler. Previously, the LogTrajectory handler only appeared in the interface methods, leaving the CompiledDynamics forward method responsible only for returning the final state of the simulation. While this is the default behavior of ChiRho, it limited our ability to compose CompiledDynamics modules into ensembles, and resulted in a substantial amount of duplicated code in the interfaces. Now, CompiledDynamics is responsible for the logic of whether to return a single state or a full trajectory, and all downstream computations (e.g. add observables, noise, etc.) compose naturally via tensor broadcasting.

review-notebook-app[bot] commented 7 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB