Bayesian Active Learning for Classification and Preference Learning