Calculate weighted pairwise distance matrix in Python
问题 I am trying to find the fastest way to perform the following pairwise distance calculation in Python. I want to use the distances to rank a list_of_objects by their similarity. Each item in the list_of_objects is characterised by four measurements a, b, c, d, which are made on very different scales e.g.: object_1 = [0.2, 4.5, 198, 0.003] object_2 = [0.3, 2.0, 999, 0.001] object_3 = [0.1, 9.2, 321, 0.023] list_of_objects = [object_1, object_2, object_3] The aim is to get a pairwise distance