Ranking and reliable classification