Skip to content

Support vector machines for ranking and comparing

Notifications You must be signed in to change notification settings

Zeh-Joe/rankSVMcompare

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rankSVMcompare: an R package which implements Support Vector Machines for ranking and comparing. https://arxiv.org/abs/1401.8008

https://travis-ci.org/tdhock/rankSVMcompare.png?branch=master

Installation

install.packages("quadmod", repos="http://r-forge.r-project.org")
devtools::install_github("tdhock/rankSVMcompare")

Usage examples

The main function for fitting the Support Vector Machine ranking/comparison model is softCompareQP.

library(rankSVMcompare)
example(softCompareQP)

The softCompareQP function returns a list which represents the trained model. If fit is the trained model object, then

  • fit$rank is a ranking function r(x) that takes an object x and returns a real-valued rank score – bigger is better.
  • fit$predict is a comparison function c(x1, x2) that takes two objects x1 and x2, and returns
    • 1 if x2 is significantly better,
    • -1 if x1 is significantly better,
    • 0 if there is no significant difference between x1 and x2.
  • in our model, an absolute rank difference greater than 1 is considered a significant difference.
  • the model is trained on labeled pairs (x1,x2,y) where x1 and x2 are p-dimensional feature vectors, and y is a label (-1, 0, 1).

About

Support vector machines for ranking and comparing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 98.3%
  • Shell 1.7%