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
Thank you very much for reading this. This is not quite an issue but a question. I found you are passing a list as radius to knn.radius_neighbors function while I cannot find any documentation about it.
Doc of this function only said that it accepts a float as radius. Can you please help me to understand this code?
# find the distance of the kth in-class pointforcinclasses:
mask=np.where(y==c)[0]
knn.fit(x[mask, :])
d2k[mask] =knn.kneighbors()[0][:, -1]
# find the number of points within the distance of the kth in-class pointknn.fit(x)
m=knn.radius_neighbors(radius=d2k, return_distance=False)
m= [i.shape[0] foriinm]
Thanks a lot.
The text was updated successfully, but these errors were encountered:
Hi Daniel:
Thank you very much for reading this. This is not quite an issue but a question. I found you are passing a list as
radius
toknn.radius_neighbors
function while I cannot find any documentation about it.Doc of this function only said that it accepts a float as
radius
. Can you please help me to understand this code?Thanks a lot.
The text was updated successfully, but these errors were encountered: