tapas.attacks.distances
Distance metrics for closest-distance attacks.
Distances are callable objects that return an array of real number for pairs of datasets (either records, or datasets of same lengths). We here implement a range of simple distances, and easy methods to combine them.
Classes
Distance metric between datasets. |
|
|
Hamming distance ("L_0"): counts the number of attributes that are identical between two records. |
|
L_p distance between two datasets (typically, tabular datasets). |
|
(internal) class for __prod__. |
|
(internal) class for __sum__. |