0
$\begingroup$

This is my dataset:

linesofsight= {{{31, 21, 79}, {10, 14, 22}}, {{33, 14, 79}, {34, 13, 
 76}}, {{33, 14, 79}, {38, 28, 54}}, {{33, 14, 79}, {32, 26, 
 38}}, {{34, 18, 78}, {26, 10, 73}}, {{34, 18, 78}, {39, 26, 
 52}}, {{34, 18, 78}, {24, 19, 37}}, {{29, 11, 78}, {30, 23, 
 69}}, {{29, 11, 78}, {21, 25, 50}}, {{29, 11, 78}, {19, 13, 
 36}}, {{25, 16, 77}, {32, 7, 67}}, {{25, 16, 77}, {39, 26, 
 48}}, {{34, 13, 76}, {22, 20, 62}}, {{34, 13, 76}, {23, 6, 
 45}}, {{26, 20, 75}, {32, 12, 43}}, {{28, 8, 75}, {25, 26, 
 58}}, {{24, 15, 74}, {31, 21, 79}}, {{24, 15, 74}, {23, 27, 
 56}}, {{33, 22, 73}, {33, 23, 76}}, {{33, 22, 73}, {38, 28, 
 54}}, {{33, 22, 73}, {32, 26, 38}}, {{26, 10, 73}, {33, 22, 
 73}}, {{26, 10, 73}, {39, 26, 52}}, {{26, 10, 73}, {24, 19, 
 37}}, {{35, 16, 72}, {30, 23, 69}}, {{35, 16, 72}, {21, 25, 
 50}}, {{35, 16, 72}, {19, 13, 36}}, {{34, 22, 71}, {32, 7, 
 67}}, {{34, 22, 71}, {39, 26, 48}}, {{32, 9, 71}, {37, 24, 
 64}}, {{32, 9, 71}, {35, 29, 46}}, {{32, 9, 71}, {9, 17, 
 29}}, {{24, 16, 70}, {22, 20, 62}}, {{24, 16, 70}, {23, 6, 
 45}}, {{30, 23, 69}, {22, 21, 60}}, {{30, 23, 69}, {32, 12, 
 43}}, {{23, 11, 69}, {25, 26, 58}}, {{26, 20, 68}, {31, 21, 
 79}}, {{26, 20, 68}, {23, 27, 56}}, {{26, 20, 68}, {10, 14, 
 22}}, {{28, 7, 68}, {33, 23, 76}}, {{28, 7, 68}, {38, 28, 
 54}}, {{28, 7, 68}, {32, 26, 38}}, {{36, 17, 67}, {33, 22, 
 73}}, {{36, 17, 67}, {39, 26, 52}}, {{36, 17, 67}, {24, 19, 
 37}}, {{32, 7, 67}, {24, 16, 70}}, {{32, 7, 67}, {21, 25, 
 50}}, {{32, 7, 67}, {19, 13, 36}}, {{22, 18, 66}, {36, 17, 
 67}}, {{22, 18, 66}, {39, 26, 48}}, {{27, 7, 66}, {37, 24, 
 64}}, {{27, 7, 66}, {35, 29, 46}}, {{22, 20, 65}, {22, 20, 
 62}}, {{22, 20, 65}, {23, 6, 45}}, {{24, 8, 65}, {22, 21, 
 60}}, {{24, 8, 65}, {32, 12, 43}}, {{37, 24, 64}, {25, 26, 
 58}}, {{21, 12, 64}, {31, 21, 79}}, {{21, 12, 64}, {23, 27, 
 56}}, {{32, 26, 63}, {38, 28, 54}}, {{32, 26, 63}, {32, 26, 
 38}}, {{19, 15, 63}, {33, 22, 73}}, {{19, 15, 63}, {39, 26, 
 52}}, {{19, 15, 63}, {24, 19, 37}}, {{29, 5, 63}, {24, 16, 
 70}}, {{29, 5, 63}, {21, 25, 50}}, {{29, 5, 63}, {19, 13, 
 36}}, {{22, 20, 62}, {36, 17, 67}}, {{22, 20, 62}, {39, 26, 
 48}}, {{33, 7, 62}, {24, 8, 65}}, {{33, 7, 62}, {35, 29, 
 46}}, {{33, 7, 62}, {9, 17, 29}}, {{26, 25, 61}, {29, 5, 
 63}}, {{26, 25, 61}, {23, 6, 45}}, {{18, 13, 61}, {22, 21, 
 60}}, {{18, 13, 61}, {32, 12, 43}}, {{31, 29, 60}, {25, 26, 
 58}}, {{22, 21, 60}, {23, 27, 56}}, {{22, 21, 60}, {10, 14, 
 22}}, {{21, 8, 60}, {33, 23, 76}}, {{21, 8, 60}, {38, 28, 
 54}}, {{21, 8, 60}, {32, 26, 38}}, {{30, 28, 59}, {33, 22, 
 73}}, {{30, 28, 59}, {39, 26, 52}}, {{30, 28, 59}, {24, 19, 
 37}}, {{19, 18, 59}, {24, 16, 70}}, {{19, 18, 59}, {21, 25, 
 50}}, {{19, 18, 59}, {19, 13, 36}}, {{24, 5, 59}, {36, 17, 
 67}}, {{24, 5, 59}, {39, 26, 48}}, {{25, 26, 58}, {24, 8, 
 65}}, {{25, 26, 58}, {35, 29, 46}}, {{17, 12, 58}, {29, 5, 
 63}}, {{17, 12, 58}, {23, 6, 45}}, {{28, 30, 57}, {31, 29, 
 60}}, {{28, 30, 57}, {32, 12, 43}}, {{28, 30, 57}, {7, 6, 
 25}}, {{38, 21, 57}, {24, 5, 59}}, {{33, 7, 57}, {31, 21, 
 79}}, {{33, 7, 57}, {23, 27, 56}}, {{23, 27, 56}, {38, 28, 
 54}}, {{23, 27, 56}, {32, 26, 38}}, {{36, 14, 56}, {33, 22, 
 73}}, {{36, 14, 56}, {39, 26, 52}}, {{36, 14, 56}, {24, 19, 
 37}}, {{29, 31, 55}, {24, 16, 70}}, {{29, 31, 55}, {21, 25, 
 50}}, {{29, 31, 55}, {19, 13, 36}}, {{18, 21, 55}, {36, 17, 
 67}}, {{18, 21, 55}, {39, 26, 48}}, {{20, 7, 55}, {24, 8, 
 65}}, {{20, 7, 55}, {35, 29, 46}}, {{38, 28, 54}, {29, 5, 
 63}}, {{38, 28, 54}, {23, 6, 45}}, {{36, 14, 54}, {31, 29, 
 60}}, {{36, 14, 54}, {32, 12, 43}}, {{28, 31, 53}, {24, 5, 
 59}}, {{18, 20, 53}, {33, 7, 57}}, {{33, 6, 53}, {33, 23, 
 76}}, {{33, 6, 53}, {20, 7, 55}}, {{33, 6, 53}, {32, 26, 
 38}}, {{39, 26, 52}, {33, 22, 73}}, {{39, 26, 52}, {33, 6, 
 53}}, {{39, 26, 52}, {24, 19, 37}}, {{16, 11, 52}, {24, 16, 
 70}}, {{16, 11, 52}, {21, 25, 50}}, {{16, 11, 52}, {19, 13, 
 36}}, {{26, 30, 51}, {36, 17, 67}}, {{26, 30, 51}, {39, 26, 
 48}}, {{26, 30, 51}, {14, 3, 33}}, {{17, 18, 51}, {24, 8, 
 65}}, {{17, 18, 51}, {35, 29, 46}}, {{22, 4, 51}, {29, 5, 
 63}}, {{22, 4, 51}, {23, 6, 45}}, {{21, 25, 50}, {31, 29, 
 60}}, {{21, 25, 50}, {32, 12, 43}}, {{36, 10, 50}, {24, 5, 
 59}}, {{28, 30, 49}, {33, 7, 57}}, {{16, 18, 49}, {33, 23, 
 76}}, {{16, 18, 49}, {20, 7, 55}}, {{16, 18, 49}, {32, 26, 
 38}}, {{21, 5, 49}, {33, 22, 73}}, {{21, 5, 49}, {33, 6, 
 53}}, {{21, 5, 49}, {24, 19, 37}}, {{39, 26, 48}, {24, 16, 
 70}}, {{39, 26, 48}, {22, 4, 51}}, {{39, 26, 48}, {19, 13, 
 36}}, {{34, 11, 48}, {21, 5, 49}}, {{30, 31, 47}, {24, 8, 
 65}}, {{30, 31, 47}, {35, 29, 46}}, {{17, 20, 47}, {29, 5, 
 63}}, {{17, 20, 47}, {23, 6, 45}}, {{32, 8, 47}, {31, 29, 
 60}}, {{32, 8, 47}, {32, 12, 43}}, {{35, 29, 46}, {24, 5, 
 59}}, {{37, 17, 46}, {31, 21, 79}}, {{37, 17, 46}, {33, 7, 
 57}}, {{26, 7, 46}, {33, 23, 76}}, {{26, 7, 46}, {20, 7, 
 55}}, {{26, 7, 46}, {32, 26, 38}}, {{37, 27, 45}, {33, 22, 
 73}}, {{37, 27, 45}, {33, 6, 53}}, {{37, 27, 45}, {24, 19, 
 37}}, {{16, 14, 45}, {24, 16, 70}}, {{16, 14, 45}, {22, 4, 
 51}}, {{16, 14, 45}, {19, 13, 36}}, {{23, 6, 45}, {36, 17, 
 67}}, {{38, 23, 44}, {24, 8, 65}}, {{38, 23, 44}, {32, 8, 
 47}}, {{34, 12, 44}, {29, 5, 63}}, {{34, 12, 44}, {16, 14, 
 45}}, {{30, 30, 43}, {31, 29, 60}}, {{30, 30, 43}, {32, 12, 
 43}}, {{17, 20, 43}, {24, 5, 59}}, {{32, 12, 43}, {31, 21, 
 79}}, {{32, 12, 43}, {33, 7, 57}}, {{24, 28, 42}, {20, 7, 
 55}}, {{24, 28, 42}, {32, 26, 38}}, {{17, 18, 42}, {33, 22, 
 73}}, {{17, 18, 42}, {33, 6, 53}}, {{17, 18, 42}, {24, 19, 
 37}}, {{22, 9, 42}, {24, 16, 70}}, {{37, 24, 41}, {36, 17, 
 67}}, {{37, 24, 41}, {21, 5, 49}}, {{12, 13, 41}, {9, 17, 
 29}}, {{24, 10, 41}, {29, 5, 63}}, {{24, 10, 41}, {16, 14, 
 45}}, {{24, 27, 40}, {31, 29, 60}}, {{24, 27, 40}, {17, 20, 
 43}}, {{34, 19, 40}, {24, 5, 59}}, {{34, 19, 40}, {37, 24, 
 41}}, {{27, 13, 40}, {31, 21, 79}}, {{27, 13, 40}, {33, 7, 
 57}}, {{8, 9, 40}, {32, 26, 38}}, {{26, 27, 39}, {33, 22, 
 73}}, {{26, 27, 39}, {33, 6, 53}}, {{26, 27, 39}, {24, 19, 
 37}}, {{35, 20, 39}, {24, 16, 70}}, {{35, 20, 39}, {22, 4, 
 51}}, {{10, 14, 39}, {14, 3, 33}}, {{16, 9, 39}, {9, 17, 
 29}}, {{32, 26, 38}, {29, 5, 63}}, {{32, 26, 38}, {16, 14, 
 45}}, {{14, 19, 38}, {7, 6, 25}}, {{9, 14, 38}, {37, 24, 
 41}}, {{15, 7, 38}, {10, 14, 22}}, {{23, 23, 37}, {33, 23, 
 76}}, {{23, 23, 37}, {20, 7, 55}}, {{23, 23, 37}, {16, 9, 
 39}}, {{24, 19, 37}, {33, 22, 73}}, {{24, 19, 37}, {33, 6, 
 53}}, {{24, 19, 37}, {23, 23, 37}}, {{10, 16, 37}, {19, 13, 
 36}}, {{25, 13, 37}, {36, 17, 67}}, {{25, 13, 37}, {21, 5, 
 49}}, {{11, 2, 37}, {9, 17, 29}}, {{28, 19, 36}, {29, 5, 
 63}}, {{28, 19, 36}, {16, 14, 45}}, {{19, 13, 36}, {31, 29, 
 60}}, {{19, 13, 36}, {17, 20, 43}}, {{19, 13, 36}, {7, 6, 
 25}}, {{15, 19, 35}, {24, 5, 59}}, {{14, 4, 35}, {10, 14, 
 22}}, {{6, 10, 34}, {16, 9, 39}}, {{10, 17, 33}, {33, 6, 
 53}}, {{18, 10, 32}, {10, 17, 33}}, {{9, 17, 31}, {32, 8, 
 47}}, {{9, 17, 31}, {9, 17, 29}}, {{6, 10, 30}, {7, 6, 25}}, {{7,
  3, 29}, {10, 14, 22}}, {{6, 12, 28}, {16, 9, 39}}, {{11, 18, 
 27}, {33, 6, 53}}, {{7, 29, 26}, {9, 18, 12}}, {{17, 9, 26}, {6, 
 10, 30}}, {{11, 32, 25}, {16, 22, 6}}, {{13, 27, 25}, {3, 29, 
 3}}, {{14, 18, 25}, {24, 5, 59}}, {{7, 6, 25}, {10, 14, 
 22}}, {{6, 31, 24}, {14, 34, 20}}, {{16, 24, 24}, {11, 36, 
 17}}, {{9, 3, 24}, {10, 17, 33}}, {{4, 28, 23}, {15, 19, 
 9}}, {{11, 20, 23}, {29, 5, 63}}, {{11, 20, 23}, {16, 22, 
 6}}, {{15, 10, 23}, {14, 18, 25}}, {{10, 14, 22}, {33, 23, 
 76}}, {{10, 14, 22}, {16, 9, 39}}, {{12, 7, 22}, {33, 22, 
 73}}, {{16, 32, 21}, {11, 37, 14}}, {{9, 20, 21}, {9, 18, 
 12}}, {{9, 10, 21}, {6, 10, 30}}, {{14, 34, 20}, {16, 22, 
 6}}, {{7, 21, 20}, {3, 29, 3}}, {{10, 19, 19}, {5, 23, 
 22}}, {{11, 36, 17}, {2, 28, 18}}, {{17, 22, 17}, {11, 37, 
 14}}, {{4, 32, 16}, {9, 18, 12}}, {{10, 18, 16}, {15, 19, 
 9}}, {{18, 29, 15}, {16, 22, 6}}, {{11, 37, 14}, {3, 29, 
 3}}, {{14, 35, 13}, {5, 23, 22}}, {{4, 32, 12}, {2, 28, 
 18}}, {{9, 18, 12}, {18, 29, 15}}, {{1, 28, 11}, {4, 32, 
 12}}, {{6, 35, 10}, {15, 19, 9}}, {{17, 22, 10}, {16, 22, 
 6}}, {{16, 32, 9}, {3, 29, 3}}, {{2, 28, 8}, {5, 23, 22}}, {{2, 
 24, 7}, {2, 28, 18}}, {{6, 33, 6}, {18, 29, 15}}, {{16, 22, 
 6}, {4, 32, 12}}, {{13, 32, 5}, {16, 32, 9}}, {{15, 22, 5}, {6, 
 33, 6}}, {{13, 31, 4}, {3, 29, 3}}, {{3, 29, 3}, {5, 23, 
 22}}, {{5, 27, 2}, {2, 28, 18}}, {{15, 23, 2}, {18, 29, 
 15}}, {{10, 22, 1}, {4, 32, 12}}};

FindCluster in version 9 is giving me same groupings each time whereas in Mathematica 11.1 I get different groups with every run.

with 9.0

Table[FindClusters[Developer`ToPackedArray@linesofsight, 3, 
Method -> {"Agglomerate", "Linkage" -> "Ward"}, 
DistanceFunction -> ChessboardDistance] // Length /@ # &, {10}]

(* {{113, 110, 56}, {113, 110, 56}, {113, 110, 56}, {113, 110, 56}, 
{113,110, 56}, {113, 110, 56}, {113, 110, 56}, {113, 110, 56}, {113, 
110, 56}, {113, 110, 56}} *)

with Mathematica 11.1

Table[Map[Length]@FindClusters[Developer`ToPackedArray@linesofsight, 3, 
Method -> {"Agglomerate", "Linkage" -> "Ward"}, 
DistanceFunction -> ChessboardDistance], {10}]

(* {{149, 72, 58}, {118, 105, 56}, {109, 113, 57}, {122, 95, 62}, 
{121,103, 55}, {117, 106, 56}, {109, 115, 55}, {98, 123, 58}, {100, 121, 
58}, {115, 107, 57}} *)

Any idea why this is so? Is it a bug??

$\endgroup$
  • 1
    $\begingroup$ Related: (143481), (130856). $\endgroup$ – Alexey Popkov May 8 '17 at 12:21
  • 1
    $\begingroup$ The FindClusters implementation has changed in 11.0. There are new methods and the default method is different (but I do not know the details). $\endgroup$ – Szabolcs May 8 '17 at 15:07
  • $\begingroup$ @AlexeyPopkov and Szabolcs thanks for the info. i will take a look at the related threads posted ! $\endgroup$ – Ali Hashmi May 8 '17 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.