Added posteriors computation from KNN