Title: | Ranking with Incomplete Information |
---|---|
Description: | Various statistical and mathematical ranking and rating methods with incomplete information are included. This package is initially designed for the scoring system in a high school project showcase to rank student research projects, where each judge can only evaluate a set of projects in a limited time period. See Langville, A. N. and Meyer, C. D. (2012), Who is Number 1: The Science of Rating and Ranking, Princeton University Press <doi:10.1515/9781400841677>, and Gou, J. and Wu, S. (2020), A Judging System for Project Showcase: Rating and Ranking with Incomplete Information, Technical Report. |
Authors: | Jiangtao Gou [aut, cre], Fengqing Zhang [aut], Shuyi Wu [aut] |
Maintainer: | Jiangtao Gou <[email protected]> |
License: | GPL-3 |
Version: | 1.0.3 |
Built: | 2024-12-23 06:36:31 UTC |
Source: | CRAN |
Calculate ratings and provide rankings using Colley’s method
colley(jpMat, method = "colley", ties.method = "average")
colley(jpMat, method = "colley", ties.method = "average")
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying Colley's method, including "colley", "colleym", "colleynt" and "colleymnt" |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
colley
: Colley's method
colleym
: Colleyized Massey method
colleynt
: Colley's method, no ties
colleymnt
: Colleyized Massey method, no ties
A list of two vectors: a rating vector and a ranking vector
Jiangtao Gou
Colley, W. N. (2001). Colley's bias free college football ranking method: the Colley matrix explained.
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- colley(jpMat, method='colley') print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- colley(jpMat, method='colley') print(result)
Convert a judge-presenter matrix to a data frame with three variables/columns
convertJudgePresenterMatrix(jpMat)
convertJudgePresenterMatrix(jpMat)
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
score
: nonzero and non-NA scores
row
: array indices
col
: arry indices
A data frame as a long table, where each row is an observation, including the score, the row number and the column number in the jpMat
matrix
Jiangtao Gou
Fengqing Zhang
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- convertJudgePresenterMatrix(jpMat) print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- convertJudgePresenterMatrix(jpMat) print(result)
Calculate ratings and provide rankings using Elo's system
elo( jpMat, method = "elow", Kfactor = 32, xiparameter = 400, initScore = 2000, round = 100, ties.method = "average" )
elo( jpMat, method = "elow", Kfactor = 32, xiparameter = 400, initScore = 2000, round = 100, ties.method = "average" )
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying Elo's method, including "elo", "elow", "elos" |
Kfactor |
a parameter to properly balance the deviation between actual and expected scroes against prior ratings |
xiparameter |
a parameter affects the spread of the reatings in the logistic function |
initScore |
a parameter describe the average rating |
round |
a parameter indicates the number of iterations |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
elo
: Elo's system, using win-tie-loss, equivalent to elow
elow
: Elo's system, using win-tie-loss
elos
: Elo's system, using game scores (each pair has one pair of scores)
Jiangtao Gou
Elo, A. E. (1978). The Rating of Chessplayers, Past and Present. Arco Publishing Company, New York.
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- elo(jpMat, method='elow', Kfactor=32, xiparameter=400, initScore=2000, round=10, ties.method='average') print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- elo(jpMat, method='elow', Kfactor=32, xiparameter=400, initScore=2000, round=10, ties.method='average') print(result)
Calculate ratings and provide rankings using Keener's method, without using Laplace's Rule of Succession, and using Laplace's Rule of Succession
keener( jpMat, method = "keener", irreducibility = 0.01, ties.method = "average" )
keener( jpMat, method = "keener", irreducibility = 0.01, ties.method = "average" )
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying Keener's method without applying a nonlinear skweing function, including "keener", "keenerwolrs" |
irreducibility |
a non-negative parameter, which is the ratio of the value of each element in the pertubation matrix to the average value in the normalized proportaion matrix. |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
keener
: Keener's method with Laplace's Rule of Succession
keenerwolrs
: Keener's method without Laplace's Rule of Succession
hitsjp
: HITS, using judge-presenter matrix, equivalent to offdefsc
offdefnt
: Offense-Defense rating method, using judge-presenter matrix
Jiangtao Gou
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Keener, J. P. (1993). The Perron-Frobenius theorem and the ranking of football teams. SIAM Review 35, 80-93.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
library(popdemo) jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- keener(jpMat, method = 'keener', irreducibility = 0) print(result)
library(popdemo) jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- keener(jpMat, method = 'keener', irreducibility = 0) print(result)
Calculate ratings and provide rankings using Keener's method applying a nonlinear skweing function, without using Laplace's Rule of Succession, and using Laplace's Rule of Succession
keenersk( jpMat, method = "keenersk", irreducibility = 0.01, ties.method = "average" )
keenersk( jpMat, method = "keenersk", irreducibility = 0.01, ties.method = "average" )
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying Keener's method applying a nonlinear skweing function, including "keenersk", "keenerskwolrs" |
irreducibility |
a non-negative parameter, which is the ratio of the value of each element in the pertubation matrix to the average value in the normalized proportaion matrix. |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
keenersk
: Keener's method with Laplace's Rule of Succession, applying a nonlinear skweing function
keenerskwolrs
: Keener's method without Laplace's Rule of Succession, applying a nonlinear skweing function
Jiangtao Gou
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Keener, J. P. (1993). The Perron-Frobenius theorem and the ranking of football teams. SIAM Review 35, 80-93.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
library(popdemo) jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- keenersk(jpMat, method = 'keenersk', irreducibility = 0) print(result)
library(popdemo) jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- keenersk(jpMat, method = 'keenersk', irreducibility = 0) print(result)
Calculate ratings and provide rankings using Google's PageRank algorithm
markov( jpMat, method = "markovvl", dampingFactor = 0.85, ties.method = "average" )
markov( jpMat, method = "markovvl", dampingFactor = 0.85, ties.method = "average" )
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying Markov's method, including "markov", "markovvl", "markovlvpd", "markovwlvp". |
dampingFactor |
the PageRank theory holds that an imaginary surfer who is randomly clicking on links will eventually stop clicking. The probability, at any step, that the person will continue is a damping factor. Web 0.85, NFL 0.60, NCAA basketball 0.50 |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
markov
: Markov's method, voting with losses, equivalent to markovvl
markovvl
: Markov's method, voting with losses
markovlvpd
: Markov's method, losers vote with point differentials
markovwlvp
: Markov's method, winners and losers vote with points
Jiangtao Gou
Brin, S. and Page, L. (1998). The anatomy of a large-scale hypertextual web search engine. Computer Networks and ISDN Systems 30, 107-117. Proceedings of the Seventh International World Wide Web Conference.
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- markov(jpMat, method='markovvl', dampingFactor=0.85, ties.method='average') print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- markov(jpMat, method='markovvl', dampingFactor=0.85, ties.method='average') print(result)
Calculate ratings and provide rankings using Massey's method, Masseyized Colley method, Massey's method–no ties, Masseyized Colley method–no ties
massey(jpMat, method = "massey", ties.method = "average")
massey(jpMat, method = "massey", ties.method = "average")
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying Massey's method, including "massey", "masseyc", "masseynt" and "masseycnt" |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
massey
: Massey's method
masseyc
: Masseyized Colley method
masseynt
: Massey's method, no ties
masseycnt
: Masseyized Colley method, no ties
Jiangtao Gou
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
Massey, K. (1997). Statistical models applied to the rating of sports teams. Bachelor's Thesis, Blueeld College.
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- massey(jpMat, method='massey') print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- massey(jpMat, method='massey') print(result)
Transform Data to Desired Mean and Standard Deviation
matchMeanSD(data, mean = 0, sd = 1)
matchMeanSD(data, mean = 0, sd = 1)
data |
a vector includeing data to be transformed |
mean |
a value of desired mean |
sd |
a value of desirred SD |
a vector of transformed vector
Jiangtao Gou
Fengqing Zhang
orig_data <- c(1,3,5,10) trans_data <- matchMeanSD(data=orig_data, mean=100, sd=15) print(trans_data)
orig_data <- c(1,3,5,10) trans_data <- matchMeanSD(data=orig_data, mean=100, sd=15) print(trans_data)
Calculate ratings and provide rankings using Mixed Effects Modeling
mixedeff(jpMat, REML = FALSE, ties.method = "average")
mixedeff(jpMat, REML = FALSE, ties.method = "average")
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
REML |
a logical value for lme4::lmer |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
Jiangtao Gou
Fengqing Zhang
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
jpMat <- c(1,3,5,2,6,4,3,8,7) attr(jpMat, "dim") <- c(3,3) mixedeff(jpMat)
jpMat <- c(1,3,5,2,6,4,3,8,7) attr(jpMat, "dim") <- c(3,3) mixedeff(jpMat)
Calculate ratings and provide rankings using Simple Linear regression
naive(jpMat, stats = FALSE, ties.method = "average")
naive(jpMat, stats = FALSE, ties.method = "average")
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
stats |
a logical value to indicate whether a linear model should be fitted and the test statistics should be reported |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
Jiangtao Gou
Shuyi Wu
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- naive(jpMat) print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6, byrow=TRUE) result <- naive(jpMat) print(result)
Calculate ratings and provide rankings using Kleinberg's HITS algorithm, using a rectangular matrix for score matrix (judege-presenter)
offdefnt( jpMat, method = "hitsjp", totalsupporteps = 0, numiter = 100, ties.method = "average" )
offdefnt( jpMat, method = "hitsjp", totalsupporteps = 0, numiter = 100, ties.method = "average" )
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying the HITS algorithm, including "hitsjp". |
totalsupporteps |
a small number to guarantee the total support property |
numiter |
a number of iterations |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
movie i is good and deserves a high rating mi if it gets high ratings from good (discriminating ) users. Similarly, user j is good and serves a high rating hj when his or her ratings match the true ratings of the movies.
hitsjp
: HITS, using judge-presenter matrix, equivalent to offdefsc
offdefnt
: Offense-Defense rating method, using judge-presenter matrix
Jiangtao Gou
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Kleinberg, J. M. (1999). Authoritative sources in a hyperlinked environment. Journal of the ACM 46, 604-632.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4),nrow=6,byrow=TRUE) method <- 'hitsjp' totalsupporteps <- 0.01 numiter <- 10 ties.method <-'average' result <- offdefnt(jpMat, method, totalsupporteps, numiter, ties.method) print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4),nrow=6,byrow=TRUE) method <- 'hitsjp' totalsupporteps <- 0.01 numiter <- 10 ties.method <-'average' result <- offdefnt(jpMat, method, totalsupporteps, numiter, ties.method) print(result)
Calculate ratings and provide rankings using Kleinberg's HITS algorithm, using a square matrix for score matrix (presenter-presenter)
offdefsc( jpMat, method = "hitspp", totalsupporteps = 0, totalsupporttype = 1, numiter = 100, ties.method = "average" )
offdefsc( jpMat, method = "hitspp", totalsupporteps = 0, totalsupporttype = 1, numiter = 100, ties.method = "average" )
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
method |
a character string specifying the HITS algorithm, including "hitspp". |
totalsupporteps |
a small number to guarantee the total support property |
totalsupporttype |
an indicater: 1 stands for matrix ee^T and 2 stands for matrix ee^T - I |
numiter |
a number of iterations |
ties.method |
a character string specifying how ties are treated, including "average", "first", "last", "random", "max", "min", from base::rank |
Large offense score means strong offense, and large defense score means weak defense
hitspp
: HITS, using presenter-presenter matrix, equivalent to offdefsc
offdefsc
: Offense-Defense rating method, using presenter-presenter matrix
Jiangtao Gou
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Kleinberg, J. M. (1999). Authoritative sources in a hyperlinked environment. Journal of the ACM 46, 604-632.
Langville, A. N. and Meyer, C. D. (2012). Who's Number 1?: The Science of Rating and Ranking. Princeton University Press.
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4),nrow=6,byrow=TRUE) method <- 'hitspp' totalsupporteps <- 0.01 totalsupporttype <- 1 numiter <- 10 ties.method <-'average' result <- offdefsc(jpMat, method, totalsupporteps, totalsupporttype, numiter, ties.method) print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4),nrow=6,byrow=TRUE) method <- 'hitspp' totalsupporteps <- 0.01 totalsupporttype <- 1 numiter <- 10 ties.method <-'average' result <- offdefsc(jpMat, method, totalsupporteps, totalsupporttype, numiter, ties.method) print(result)
Convert a judge-presenter matrix to a set of square matrices
readJudgePresenterMatrix(jpMat)
readJudgePresenterMatrix(jpMat)
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
A list, including numGame
numGame
: Number of times teams i and j faced eath other
numWin
: Number of wins teams i plays against j
numTie
: Number of ties teams i plays against j
numLoss
: Number of losses teams i plays against j
numPt
: Number of points teams i accumulates against j
Jiangtao Gou
Shuyi Wu
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6,byrow=TRUE) result <- readJudgePresenterMatrix(jpMat) print(result)
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4), nrow=6,byrow=TRUE) result <- readJudgePresenterMatrix(jpMat) print(result)