Ball Ranking Machines for Content-Based Multimedia Retrieval