Should the first neighbor be skipped during when transforming new data? #838
Unanswered
jlmelville
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In
smooth_knn
, after calculatingrho
, the sum of affinities loop starts at 1:umap/umap/umap_.py
Line 220 in 300cbba
This makes sense to me in the standard
fit
case, where neighbor 0 of point i is going to be i itself. But what about in the case whentransform
is called on new data? This neighbor is likely to have a non-zero distance and so will be included in the calculation ofrho
. Technically, should thetarget
value benp.log2(k + 1) * bandwidth
in the case of transforming new data?I realize that this is unlikely to be very important, but I was rewriting the equivalent part of
uwot
and wanted to make sure I hadn't introduced an error.Beta Was this translation helpful? Give feedback.
All reactions