tapas.attacks.distances.HammingDistance
- class tapas.attacks.distances.HammingDistance(columns: Optional[list[str]] = None)
Bases:
tapas.attacks.distances.DistanceMetricHamming distance (“L_0”): counts the number of attributes that are identical between two records. While this is mainly for categorical attributes, it also works with continuous values.
- __init__(columns: Optional[list[str]] = None)
- Parameters
columns (list of column names, optional (None)) – List of the columns on which to compute the distance. If this is not provided, all columns are used. Only for tabular datasets.
Methods
__init__([columns])- param columns
List of the columns on which to compute the distance. If this is
Attributes
label