Join GitHub today
ENH: use Bayesian priors in Nearest Neighbors classifier (Issue 399) #970
referenced this pull request
Aug 24, 2017
Am I correct in thinking that under this approach, n_neighbors=1 will produce a posterior with all its mass in one class? (I've not tried running the code because it would involve looking at 6-year-old compilation instructions lol.)
The math here seems in accordance with bishop, but it goes against my intuition of bayesian prior, wherein we should rely on the prior more if the number of neighbors available to inform us is few (e.g. when using
radius_neighbors in a region that is sparse in the training set). Am I mistaken?