I have two groups of points, and the lenth of them may be different.I want to know which group of points connects more strongly, are there any existing algorithms for this?
Here are two groups of points, group1 has 13 points, group2 has 10 :
group1={{8, -2}, {10, -2}, {6, -2}, {9, -1}, {5, -2}, {5, -3}, {9, -2}, {7, \
-1}, {7, -3}, {7, -3}, {2, -1}, {9, -4}, {2, -2}};
group2={{9, -3}, {3, -4}, {10, -3}, {10, -4}, {12, -2}, {8, -4}, {7, -1}, \
{9, -1}, {8, -2}, {13, -3}};
First I prefered to caculate the average point of each group, than get summation of all the distances between each point and the average one. But look at the picture, the most left one labeled "far away" of the yellow group is a particular case, it should contribute less to the result. Now I'm stuck here.
This may be a mathematical problem, but I'm going to solve it in mma, so I post it here.Thanks guys.
Edit:
All the points are on integer coordinates.
Total@Flatten@ Table[EuclideanDistance[group1[[i]], group1[[j]]], {i, Length[group1] - 1}, {j, i + 1, Length[group1]}]
. Then the group with the smallest value is the most connected. $\endgroup$