This documentation is for an old version of OpenDP.

The current release of OpenDP is v0.11.1.

opendp.metrics module#

opendp.metrics.absolute_distance(T)[source]#

Construct an instance of the AbsoluteDistance metric.

absolute_distance in Rust documentation.

Parameters:

T (Type Argument) –

Raises:
  • TypeError – 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.metrics.change_one_distance()[source]#

Construct an instance of the ChangeOneDistance metric.

change_one_distance in Rust documentation.

Raises:
  • TypeError – 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.metrics.discrete_distance()[source]#

Construct an instance of the DiscreteDistance metric.

discrete_distance in Rust documentation.

Raises:
  • TypeError – 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.metrics.hamming_distance()[source]#

Construct an instance of the HammingDistance metric.

hamming_distance in Rust documentation.

Raises:
  • TypeError – 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.metrics.insert_delete_distance()[source]#

Construct an instance of the InsertDeleteDistance metric.

insert_delete_distance in Rust documentation.

Raises:
  • TypeError – 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.metrics.l1_distance(T)[source]#

Construct an instance of the L1Distance metric.

l1_distance in Rust documentation.

Parameters:

T (Type Argument) –

Raises:
  • TypeError – 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.metrics.l2_distance(T)[source]#

Construct an instance of the L2Distance metric.

l2_distance in Rust documentation.

Parameters:

T (Type Argument) –

Raises:
  • TypeError – 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.metrics.metric_debug(this)[source]#

Debug a metric.

metric_debug in Rust documentation.

Parameters:

this – The metric to debug (stringify).

Return type:

str

Raises:
  • TypeError – 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.metrics.metric_distance_type(this)[source]#

Get the distance type of a metric.

metric_distance_type in Rust documentation.

Parameters:

this – The metric to retrieve the distance type from.

Return type:

str

Raises:
  • TypeError – 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.metrics.metric_type(this)[source]#

Get the type of a metric.

metric_type in Rust documentation.

Parameters:

this – The metric to retrieve the type from.

Return type:

str

Raises:
  • TypeError – 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.metrics.symmetric_distance()[source]#

Construct an instance of the SymmetricDistance metric.

symmetric_distance in Rust documentation.

Raises:
  • TypeError – 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