alibi_detect.utils.tensorflow.distance module¶
-
alibi_detect.utils.tensorflow.distance.
mmd2_from_kernel_matrix
(kernel_mat, m, permute=False, zero_diag=True)[source]¶ Compute maximum mean discrepancy (MMD^2) between 2 samples x and y from the full kernel matrix between the samples.
- Parameters
- Return type
Tensor
- Returns
MMD^2 between the samples from the kernel matrix.
-
alibi_detect.utils.tensorflow.distance.
relative_euclidean_distance
(x, y, eps=1e-12, axis=-1)[source]¶ Relative Euclidean distance.
- Parameters
- Return type
Tensor
- Returns
Tensor with relative Euclidean distance across specified axis.