Support vector machines for ranking and comparing