https://123dok.net/document/yngn0541-nearest-neighbor-classification-in-infinite-dimension.html