https://gist.github.com/agramfort/2071994
Implementation of Rank SVM