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) –
- __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
- property input_domain#
Return input domain for the measurement.
- Return type
- property input_metric#
Distance metric on input domain.
- Return type
- property output_domain#
Return input domain for the measurement.
- Return type
- property output_metric#
Distance metric on input domain.
- Return type
- 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.