FixedMarginals#

from tmlt.synthetics import FixedMarginals
class tmlt.synthetics.FixedMarginals(marginals, weight=1)#

Bases: MeasurementStrategy

A fixed workload of weighted count and sum marginals.

property weight: int#

Weight for determining privacy budget allocated for this strategy.

compute(session, source_id, budget, keysets, clamping_bounds)#

Returns the results from computing all of the specified marginals.

Parameters:
  • session (Session) – An Analytics Session to use for computing the marginals.

  • source_id (str) – Source ID of the private table in the session to query.

  • budget (ApproxDPBudget) – Total privacy budget to use across all marginals. This budget is distributed among the marginals in proportion to their weights.

  • keysets (KeySetsRepository) – Repository of KeySets to use for the marginals.

  • clamping_bounds (ClampingBounds) – Clamping bounds to use for answering Sum queries.

Return type:

List[MarginalAnswer]