R/prob_winner.R

Defines functions prob_winner

Documented in prob_winner

prob_winner <- function(post){
  k = ncol(post)
  w = table(factor(max.col(post), levels = 1:k))
  return(w/sum(w))
}

Try the bandit package in your browser

Any scripts or data that you put into this service are public.

bandit documentation built on June 29, 2022, 5:05 p.m.