Active Sampling for Class Probability Estimation and Ranking