You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[EDIT] Actually it handles NA sorry please close... [EDIT]
Hi, currently when number of participants varies in each game, I have to pad the missing players with some artificial player "loser" with a very low initial rating to mimick the fact this fake player doesn't play and does not change the ratings of other players.
It could be possible to allow NA ( or use a special player name like "loser") and then remove the NA / loser in the 1v1 generated matchups
e.g. ( a quick way I think but it's probably easy to optimize further)
elo.run.multiteam2 <- function (formula, data, na.action, subset, k = NULL, initial.elos = NULL,
...)
{
Call <- match.call()
Call[[1L]] <- quote(elo::elo.model.frame)
Call$required.vars <- c("elos", "k", "group", "regress")
Call$ncol.k <- 2
Call$ncol.elos <- 1
mf <- eval(Call, parent.frame())
if (nrow(mf) == 0)
stop("No (non-missing) observations")
Terms <- stats::terms(mf)
if (any(mf$adjust.A != 0))
warning("Any adjustments using 'adjust()' are being ignored.")
mf2 <- elo:::multiteam_model_frame(mf)
mf2 <- mf2[mf2$elo.B != "__loser__" & mf2$elo.A != "__loser__",]
er <- elo.run(wins.A ~ elo.A + elo.B + k(k) + group(group) +
regress(regress, to = attr(mf$regress, "to"), by = attr(mf$regress,
"by")), data = mf2,
initial.elos = initial.elos,...)
er$Call <- Call
er$terms <- Terms
er$na.action <- stats::na.action(mf)
er$n.matches <- nrow(mf)
class(er) <- c("elo.run.multiteam", class(er))
er
}
The text was updated successfully, but these errors were encountered:
BenoitLondon
changed the title
[FEATURE] handle different number fo teams in elo.run.multiteam
[FEATURE] handle different number of teams in elo.run.multiteam
Feb 19, 2024
[EDIT] Actually it handles NA sorry please close... [EDIT]
Hi, currently when number of participants varies in each game, I have to pad the missing players with some artificial player "loser" with a very low initial rating to mimick the fact this fake player doesn't play and does not change the ratings of other players.
It could be possible to allow NA ( or use a special player name like "loser") and then remove the NA / loser in the 1v1 generated matchups
e.g. ( a quick way I think but it's probably easy to optimize further)
The text was updated successfully, but these errors were encountered: