Closed jglidden closed 10 years ago
Sure, we already have the in-place group.merge() operation https://github.com/forcedotcom/distributions/blob/master/doc/overview.rst and adding a copying .plus_group operation should be as simple as adding the wrapper to the GroupMixin classes in python & cpp.
Probably the cleanest way to support this is to implement .copy() methods for each datatype (cheaper than dump;load) and implement in GroupMixin
def plus_group(self, shared, other):
sum = self.copy()
sum.merge(shared, other)
return sum
Does it make sense to add a plus_group method to group to combine suff stats? This is a common pattern in inference for HDP models and, I believe, split-merge kernels.