Description Usage Arguments Value References Examples
This function implements the multidimensional ELO (mELO) rating system for performing pairwise comparisons. The mELO rating system has the desirable properties of being able to handle cyclic interactions and is better behaved in the presence of redundant copies of players/agents or tasks.
1 2 3 4 5 6 7 8 9 10 11 12 |
match_data |
A data frame containing four columns: (1) a numeric vector denoting the time period in which the game took place (2) a numeric or character identifier for player one (3) a numeric or character identifier for player two and (4) the result of the game expressed as a number, typically equal to one for a player one win, zero for a player two win and one half for a draw. |
init_data |
Initialise a rating model with |
init_c_mat |
Initialise a rating model with |
init_rating |
The initial rating for players not appearing in
|
k |
Integer defining the complexity of non-transitive interactions to model. |
eta_1 |
Learning rate for the ratings vector. |
eta_2 |
Learning rate for elements of the C matrix. |
p1_advantage |
Player 1 advtange parameter. Either a single value or a
vector equal to the number of rows in |
save_history |
If |
sort |
If |
A list object of class "mELO_rating
" with the following
components:
A data frame of the results at the end of the final time period. The variables are self explanatory except for Lag, which represents the number of time periods since the player last played a game. This is equal to zero for players who played in the latest time period, and is also zero for players who have not yet played any games.
An array containing the ratings history for all players.
An estimate of the C matrix.
An array containing the history of the C matrix.
A single value or a vector values for the advantage Player 1 had.
Integer defining the complexity of non-transitive interactions to model.
Learning rate for the ratings vector.
Learning rate for elements of the C matrix.
The type of model. In this case, "mELO".
The player 1 success probabilities predicted prior to adjusting to the outcome of the match.
The outcome for player 1 for each match.
The mean logloss error for all predictions.
Balduzzi, David, et al. "Re-evaluating Evaluation." arXiv preprint arXiv:1806.02643 (2018).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Rock paper scissors
head(rps_df)
# Note that ELO doesn't perform well
rps_ELO <- ELO(rps_df)
rps_ELO
ELO_preds <- predict(
rps_ELO,
head(rps_df)
)
cbind(
head(rps_df),
ELO_preds
)
# Predictions are all ~0.5
# Fit a mELO model that can handle these types of interactions.
rps_mELO <- mELO(rps_df, k=1)
rps_mELO
# Inspect advantage matrix
get_adv_mat(rps_mELO)
# Get predictions
mELO_preds <- predict(
rps_mELO,
head(rps_df)
)
cbind(
head(rps_df),
mELO_preds
)
# Much better predictions!
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.