identity#
Identity transformation.
Classes#
Identity transformation. |
- class Identity(metric, domain)#
Bases:
tmlt.core.transformations.base.Transformation
Identity transformation.
- Parameters:
metric (tmlt.core.metrics.Metric)
domain (tmlt.core.domains.base.Domain)
- property input_domain: tmlt.core.domains.base.Domain#
Return input domain for the measurement.
- Return type:
- property input_metric: tmlt.core.metrics.Metric#
Distance metric on input domain.
- Return type:
- property output_domain: tmlt.core.domains.base.Domain#
Return input domain for the measurement.
- Return type:
- property output_metric: tmlt.core.metrics.Metric#
Distance metric on input domain.
- Return type:
- __init__(metric, domain)#
Constructor.
- stability_function(d_in)#
Returns the smallest d_out satisfied by the transformation.
The returned d_out is d_in.
- Parameters:
d_in (Any) – Distance between inputs under input_metric.
- Return type:
Any
- __call__(data)#
Return data.
- Parameters:
data (Any)
- Return type:
Any
- stability_relation(d_in, d_out)#
Returns True only if close inputs produce close outputs.
See the privacy and stability tutorial (add link?) for more information.
- Parameters:
d_in (Any) – Distance between inputs under input_metric.
d_out (Any) – Distance between outputs under output_metric.
- Return type:
- __or__(other: Transformation) Transformation #
- __or__(other: tmlt.core.measurements.base.Measurement) tmlt.core.measurements.base.Measurement
Return this transformation chained with another component.