Nonparametric Bayesian label prediction on a graph