FixedMarginals#
from tmlt.synthetics import FixedMarginals
- class tmlt.synthetics.FixedMarginals(marginals, weight=1)#
Bases:
MeasurementStrategy
A fixed workload of weighted count and sum marginals.
- compute(session, source_id, budget, keysets, clamping_bounds)#
Returns the results from computing all of the specified marginals.
- Parameters:
session (
Session
) – An AnalyticsSession
to use for computing the marginals.source_id (
str
) – Source ID of the private table in thesession
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: