WeightedMarginal#

from tmlt.synthetics import WeightedMarginal
class tmlt.synthetics.WeightedMarginal(groupby_columns, weight=1.0)#

Bases: ABC

Interface for specifying a weighted DP groupby aggregate.

The weight is used to determine the fraction of the total privacy budget to be used for measuring this marginal. The weight is budget relative to other marginals.

abstract answer(source_id, keyset, session, budget, clamping_bounds)#

Returns the answer to this marginal evaluated using session.

Return type:

List[MarginalAnswer]

abstract property output_column: str#

The name of the output column produced by the marginal.