File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,20 @@ class KNN(W):
8383 Notes
8484 -----
8585
86- Ties between neighbors of equal distance are arbitrarily broken.
86+ Ties between neighbors of equal distance are arbitrarily broken.
87+
88+ Further, if many points occupy the same spatial location (i.e. observations are
89+ coincident), then you may need to increase k for those observations to
90+ acquire neighbors at different spatial locations. For example, if five
91+ points are coincident, then their four nearest neighbors will all
92+ occupy the same spatial location; only the fifth nearest neighbor will
93+ result in those coincident points becoming connected to the graph as a
94+ whole.
95+
96+ Solutions to this problem include jittering the points (by adding
97+ a small random value to each observation's location) or by adding
98+ higher-k neighbors only to the coincident points, using the
99+ weights.w_sets.w_union() function.
87100
88101 See Also
89102 --------
You can’t perform that action at this time.
0 commit comments