alibi.explainers.similarity.metrics module
- alibi.explainers.similarity.metrics.asym_dot(X, Y, eps=1e-07)[source]
Computes the influence of training instances Y to test instances X. This is an asymmetric kernel. (\(X^T Y/\|Y\|^2\)). See the paper for more details. Each of X and Y should have a leading batch dimension of size at least 1.
- alibi.explainers.similarity.metrics.cos(X, Y, eps=1e-07)[source]
Computes the cosine between the vector(s) in X and vector Y. (\(X^T Y/\|X\|\|Y\|\)). Each of X and Y should have a leading batch dimension of size at least 1.