Classification as a contextual bandit problem