Varying the number of neighbors in nearest-neighbors regression
"A good algorithm for varying the number of neighbors" is probably quite data-dependent. But there is, for example, the fixed radius approach.