Machine Learning, TensorFlow, Numpy.
denominator we need the euclidean norm of the single vectors. Posing A= a1² + a2²: (1-A)(1-A) , (1-A)(1-B) , (1-A)(1-C) (1-B)(1-A) , (1-B)(1-B) , (1-C)(1-C) (1-C)(1-A) , (1-C)(1-B) , (1-C)(1-C) and at the end, the result will be our desired matrix. Posing f(a, b)= 1+2* ( (a-b)² / (1-A)(1-B)): 0 ,