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 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 point
for c in classes:
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 point
knn.fit(x)
m = knn.radius_neighbors(radius=d2k, return_distance=False)
m = [i.shape[0] for i in m]
Thanks a lot.
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
radiustoknn.radius_neighborsfunction 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.