sklearn.neighbors.KernelDensity，there is a parameter "
algorithm = ball_tree". What is its specific role in KDE? Why does KDE need
I think that using ball tree to search for neighbors will only make the algorithm slower, that's because we have to find K neighbors first (the time complexity of balltree is k*log(n) ), and then we use k neighbors for KDE . This will obviously slow down the algorithm. So why don't we give up looking for neighbors and use all the data for KDE