I find an example from NearestNeighbors.jl package, But I can’t find the explaination to “idxs
”. What does it mean? What’s more, how to get nearest neighbors and get the predicted value? The example is as follow:
using NearestNeighbors
data = rand(3, 10^4)
k = 3
point = rand(3)
kdtree = KDTree(data)
idxs, dists = knn(kdtree, point, k, true)
idxs
# 3-element Array{Int64,1}:
# 4683
# 6119
# 3278
dists
# 3-element Array{Float64,1}:
# 0.039032201026256215
# 0.04134193711411951
# 0.042974090446474184
Thank you for your answer!