DiscreteVariablesTaskForce / DiscreteSamplingFramework

Python classes describing discrete variable sampling/proposals
Eclipse Public License 2.0
1 stars 0 forks source link

Add pad and restore for each DiscreteVariable type #28

Open alecksphillips opened 1 year ago

alecksphillips commented 1 year ago

For redistribution of particles, in order to handle variable size particles, it's necessary to encode particles and pad with e.g. zeros, and then decode back to particles.

We should add a generic pad, restore functions for the base DiscreteVariable type that encodes (e.g. with Python pickling) the object and pad to some maximum size and decodes back to an object respectively. Specific (probably more efficient) implementations of these for individual DiscreteVariable types, such as decision trees and additive structure, can be added.

alecksphillips commented 1 year ago

Generic pad/restore and specialised version for decision trees in #31.

Need to create specialised version for additive structure.