armlet.eval.metrics module#

class armlet.eval.metrics.BinaryAOD(**kwargs)#

Bases: Metric

compute() Tensor#

Override this method to compute the final metric value.

This method will automatically synchronize state variables when running in distributed backend.

update(preds: Tensor, target: Tensor, sensitive_data: Tensor)#

Override this method to update the state variables of your metric class.

class armlet.eval.metrics.BinaryDI(**kwargs)#

Bases: Metric

compute() Tensor#

Override this method to compute the final metric value.

This method will automatically synchronize state variables when running in distributed backend.

update(preds: Tensor, target: Tensor, sensitive_data: Tensor)#

Override this method to update the state variables of your metric class.

class armlet.eval.metrics.BinaryDcI(**kwargs)#

Bases: Metric

compute() Tensor#

Override this method to compute the final metric value.

This method will automatically synchronize state variables when running in distributed backend.

update(preds: Tensor, target: Tensor, sensitive_data: Tensor)#

Override this method to update the state variables of your metric class.

class armlet.eval.metrics.BinaryEOD(**kwargs)#

Bases: Metric

compute() Tensor#

Override this method to compute the final metric value.

This method will automatically synchronize state variables when running in distributed backend.

update(preds: Tensor, target: Tensor, sensitive_data: Tensor)#

Override this method to update the state variables of your metric class.

class armlet.eval.metrics.BinaryFairnessMetrics(sensitive_attribute: str, **kwargs)#

Bases: Metric

compute() Dict[str, Tensor]#

Override this method to compute the final metric value.

This method will automatically synchronize state variables when running in distributed backend.

update(preds: Tensor, target: Tensor, sensitive_data: Tensor)#

Override this method to update the state variables of your metric class.

class armlet.eval.metrics.BinarySPD(**kwargs)#

Bases: Metric

compute() Tensor#

Override this method to compute the final metric value.

This method will automatically synchronize state variables when running in distributed backend.

update(preds: Tensor, target: Tensor, sensitive_data: Tensor)#

Override this method to update the state variables of your metric class.

armlet.eval.metrics.div_default_zero(positive_preds: Tensor, total_preds: Tensor) Tensor#