Open rety03 opened 1 year ago
That was a bug in the elo.seq
function (introduced during a major overhaul, which led to the existence of elo.seq_old()
), which prepared information to be used in the summary()
function. This should be fixed now. Thanks for reporting this. Note that the actual ratings were calculated correctly.
To install the package with the bug fixed, please use
devtools::install_github("gobbios/EloRating")
library(EloRating)
data(adv)
r1 <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date, startvalue = 500)
summary(r1) # startvalue: 500
mean(extract_elo(r1)) # 500
r2 <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date, startvalue = 333)
summary(r2) # startvalue: 333
mean(extract_elo(r2)) # 333
# default is 1000
r3 <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date)
summary(r3) # startvalue: 1000
mean(extract_elo(r3)) # 1000
The major overhaul mentioned above also is the reason why optimising k isn't working in the old version elo.seq_old()
- it didn't exist yet.
I do not see any difference between .elo.seq_old and elo.seq, however I cannot change the start value when I use elo.seq. The code I wrote and the output is below.
CODE:
res1 <- EloRating:::.elo.seq_old( winner = season_1011_dates_elo$winner, loser = season_1011_dates_elo$loser, Date = season_1011_dates_elo$Date, draw = season_1011_dates_elo$Draw, startvalue = 500, k = 2, runcheck = TRUE, progressbar = FALSE ) summary(res1)
res_elo <- elo.seq( winner = season_1011_dates_elo$winner, loser = season_1011_dates_elo$loser, Date = season_1011_dates_elo$Date, draw = season_1011_dates_elo$Draw, startvalue = 500, k = 2, runcheck = TRUE, progressbar = FALSE ) summary(res_elo)
SUMMARY OUTPUT:
Also, I also noticed that optimizek does not work with .elo.seq_old.