Title: | Ranking with Incomplete Information |
Version: | 1.0.3 |
Date: | 2020-05-26 |
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. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | lme4, popdemo, stats |
RoxygenNote: | 7.1.0.9000 |
NeedsCompilation: | no |
Packaged: | 2020-06-04 14:51:23 UTC; jgou |
Author: | Jiangtao Gou [aut, cre], Fengqing Zhang [aut], Shuyi Wu [aut] |
Maintainer: | Jiangtao Gou <gouRpackage@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2020-06-04 16:10:02 UTC |
Colley’s Method for Rating and Ranking
Description
Calculate ratings and provide rankings using Colley’s method
Usage
colley(jpMat, method = "colley", ties.method = "average")
Arguments
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 |
Details
-
colley
: Colley's method -
colleym
: Colleyized Massey method -
colleynt
: Colley's method, no ties -
colleymnt
: Colleyized Massey method, no ties
Value
A list of two vectors: a rating vector and a ranking vector
Author(s)
Jiangtao Gou
References
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.
Examples
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)
Judge-Presenter Matrix Converter
Description
Convert a judge-presenter matrix to a data frame with three variables/columns
Usage
convertJudgePresenterMatrix(jpMat)
Arguments
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
Details
-
score
: nonzero and non-NA scores -
row
: array indices -
col
: arry indices
Value
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
Author(s)
Jiangtao Gou
Fengqing Zhang
Examples
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)
Elo’s Method for Rating and Ranking
Description
Calculate ratings and provide rankings using Elo's system
Usage
elo(
jpMat,
method = "elow",
Kfactor = 32,
xiparameter = 400,
initScore = 2000,
round = 100,
ties.method = "average"
)
Arguments
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 |
Details
-
elo
: Elo's system, using win-tie-loss, equivalent toelow
-
elow
: Elo's system, using win-tie-loss -
elos
: Elo's system, using game scores (each pair has one pair of scores)
Author(s)
Jiangtao Gou
References
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.
Examples
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)
Keener's method for Rating and Ranking
Description
Calculate ratings and provide rankings using Keener's method, without using Laplace's Rule of Succession, and using Laplace's Rule of Succession
Usage
keener(
jpMat,
method = "keener",
irreducibility = 0.01,
ties.method = "average"
)
Arguments
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 |
Details
-
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 tooffdefsc
-
offdefnt
: Offense-Defense rating method, using judge-presenter matrix
Author(s)
Jiangtao Gou
References
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.
Examples
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)
Keener's method applying a nonlinear skweing function for Rating and Ranking
Description
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
Usage
keenersk(
jpMat,
method = "keenersk",
irreducibility = 0.01,
ties.method = "average"
)
Arguments
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 |
Details
-
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
Author(s)
Jiangtao Gou
References
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.
Examples
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)
Google's PageRank algorithm for Rating and Ranking
Description
Calculate ratings and provide rankings using Google's PageRank algorithm
Usage
markov(
jpMat,
method = "markovvl",
dampingFactor = 0.85,
ties.method = "average"
)
Arguments
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 |
Details
-
markov
: Markov's method, voting with losses, equivalent tomarkovvl
-
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
Author(s)
Jiangtao Gou
References
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.
Examples
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)
Massey's method for Rating and Ranking
Description
Calculate ratings and provide rankings using Massey's method, Masseyized Colley method, Massey's method–no ties, Masseyized Colley method–no ties
Usage
massey(jpMat, method = "massey", ties.method = "average")
Arguments
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 |
Details
-
massey
: Massey's method -
masseyc
: Masseyized Colley method -
masseynt
: Massey's method, no ties -
masseycnt
: Masseyized Colley method, no ties
Author(s)
Jiangtao Gou
References
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.
Examples
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
Description
Transform Data to Desired Mean and Standard Deviation
Usage
matchMeanSD(data, mean = 0, sd = 1)
Arguments
data |
a vector includeing data to be transformed |
mean |
a value of desired mean |
sd |
a value of desirred SD |
Value
a vector of transformed vector
Author(s)
Jiangtao Gou
Fengqing Zhang
Examples
orig_data <- c(1,3,5,10)
trans_data <- matchMeanSD(data=orig_data, mean=100, sd=15)
print(trans_data)
Mixed Effects Models for Rating and Ranking
Description
Calculate ratings and provide rankings using Mixed Effects Modeling
Usage
mixedeff(jpMat, REML = FALSE, ties.method = "average")
Arguments
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 |
Author(s)
Jiangtao Gou
Fengqing Zhang
References
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Examples
jpMat <- c(1,3,5,2,6,4,3,8,7)
attr(jpMat, "dim") <- c(3,3)
mixedeff(jpMat)
Simple Linear Models for Rating and Ranking
Description
Calculate ratings and provide rankings using Simple Linear regression
Usage
naive(jpMat, stats = FALSE, ties.method = "average")
Arguments
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 |
Author(s)
Jiangtao Gou
Shuyi Wu
References
Gou, J. and Wu, S. (2020). A Judging System for Project Showcase: Rating and Ranking with Incomplete Information. Technical Report.
Examples
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)
Kleinberg's HITS algorithm for Rating and Ranking with Rectangular Matrix
Description
Calculate ratings and provide rankings using Kleinberg's HITS algorithm, using a rectangular matrix for score matrix (judege-presenter)
Usage
offdefnt(
jpMat,
method = "hitsjp",
totalsupporteps = 0,
numiter = 100,
ties.method = "average"
)
Arguments
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 |
Details
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 tooffdefsc
-
offdefnt
: Offense-Defense rating method, using judge-presenter matrix
Author(s)
Jiangtao Gou
References
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.
Examples
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)
Kleinberg's HITS algorithm for Rating and Ranking with Square Matrix
Description
Calculate ratings and provide rankings using Kleinberg's HITS algorithm, using a square matrix for score matrix (presenter-presenter)
Usage
offdefsc(
jpMat,
method = "hitspp",
totalsupporteps = 0,
totalsupporttype = 1,
numiter = 100,
ties.method = "average"
)
Arguments
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 |
Details
Large offense score means strong offense, and large defense score means weak defense
-
hitspp
: HITS, using presenter-presenter matrix, equivalent tooffdefsc
-
offdefsc
: Offense-Defense rating method, using presenter-presenter matrix
Author(s)
Jiangtao Gou
References
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.
Examples
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)
Transform a Judge-Presenter Matrix Converter
Description
Convert a judge-presenter matrix to a set of square matrices
Usage
readJudgePresenterMatrix(jpMat)
Arguments
jpMat |
a Judge-Presenter matrix, or a User-Movie matrix |
Value
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
Author(s)
Jiangtao Gou
Shuyi Wu
Examples
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)