HyperAI

Affinity Matrix

In mathematics, the distance matrix can be regarded as a matrix containing point distances, which is also called an affinity matrix, similarity matrix or similarity matrix, and is academically called a weighted undirected graph.

Given N points in Euclidean space, the distance matrix is an N×N symmetric matrix with non-negative real numbers as elements. The number of pairs of these points is N×(N-1)/2, which is the number of independent elements in the distance matrix. The distance matrix is similar to the adjacency matrix in concept, except that the latter only contains whether the elements are connected to each other, and does not contain the cost or distance of the connection between the elements.

Properties of the distance matrix

  1. The matrix is N * N (N is the total number of objects)
  2. The values on the matrix diagonal are 0
  3. The matrix is a symmetric matrix