opendp.comb module#
- opendp.comb.make_basic_composition(measurement0, measurement1)[source]#
Construct the DP composition (measurement0, measurement1). Returns a Measurement.
- Parameters:
measurement0 (Measurement) – The left member of the resulting 2-tuple.
measurement1 (Measurement) – The right member of the resulting 2-tuple.
- Returns:
Measurement representing the composed transformations.
- Return type:
- Raises:
AssertionError – if an argument’s type differs from the expected type
UnknownTypeError – if a type-argument fails to parse
OpenDPException – packaged error from the core OpenDP library
- opendp.comb.make_chain_mt(measurement, transformation)[source]#
Construct the functional composition (measurement ○ transformation). Returns a Measurement.
- Parameters:
measurement (Measurement) – outer privatizer
transformation (Transformation) – inner query
- Returns:
Measurement representing the chained computation.
- Return type:
- Raises:
AssertionError – if an argument’s type differs from the expected type
UnknownTypeError – if a type-argument fails to parse
OpenDPException – packaged error from the core OpenDP library
- opendp.comb.make_chain_tt(transformation1, transformation0)[source]#
Construct the functional composition (transformation1 ○ transformation0). Returns a Tranformation.
- Parameters:
transformation1 (Transformation) – outer transformation
transformation0 (Transformation) – inner transformation
- Returns:
Transformation representing the chained computation.
- Return type:
- Raises:
AssertionError – if an argument’s type differs from the expected type
UnknownTypeError – if a type-argument fails to parse
OpenDPException – packaged error from the core OpenDP library