You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not understand how the code corresponds to the description in the comments below
# The radius will hold the size of the circumscribed hypersphere measured
# with the specified metric: in querying, this is used as a measure of the
# size of each node when deciding which nodes to split.
As far as I can tell, the value of j is set to nfeatures-1 and the code is repeated once for each datapoint instead once for each dimension. Moreover the boundaries are being added while they are still changing.
I would expect the radii of these nodes to be different, not all zero. I think they are zero in the example because they only look at the last dimension.
Actual Results
I believe this might lead to degraded performance when quering, trough the use of radii in this function:
Description
I am trying to understand the implementation of the KDTree structure here, and I came across this line
scikit-learn/sklearn/neighbors/kd_tree.pyx
Line 75 in 066b501
I do not understand how the code corresponds to the description in the comments below
As far as I can tell, the value of
j
is set tonfeatures-1
and the code is repeated once for each datapoint instead once for each dimension. Moreover the boundaries are being added while they are still changing.Steps/Code to Reproduce
Consider
Note that all radii are zero.
Expected Results
I would expect the radii of these nodes to be different, not all zero. I think they are zero in the example because they only look at the last dimension.
Actual Results
I believe this might lead to degraded performance when quering, trough the use of radii in this function:
scikit-learn/sklearn/neighbors/binary_tree.pxi
Line 1849 in 066b501
but I have not tested it, and still do not understand the algorithm well enough.
Versions
I am looking at the current master version on github. The example above works with version 0.19.1.
The text was updated successfully, but these errors were encountered: