Skip to content

BAR round_update method is wrong? #26

@BeniaminC

Description

@BeniaminC

Currently, I am trying to convert all the rating systems to support teams.

I have been trying to understand the BAR round_update from the paper pertaining according to Algorithm 1 in https://jmlr.csail.mit.edu/papers/volume12/weng11a/weng11a.pdf. The variable info is instantiated on line 51. Line 63 is accumulating, but then on line 67 it is set again, replacing the accumulated value.

        standings.into_par_iter().for_each(|(player, my_lo, _)| {
            let my_rating = &player.approx_posterior;
            let old_sig_sq = my_rating.sig.powi(2);
            let mut info = 0.;
            let mut update = 0.;
            for (rating, lo) in &all_ratings {
                let outcome = match my_lo.cmp(lo) {
                    std::cmp::Ordering::Less => 1.,
                    std::cmp::Ordering::Equal => 0.5,
                    std::cmp::Ordering::Greater => 0.,
                };
                let c_sq = old_sig_sq + rating.sig.powi(2) + 2. * sig_perf_sq;
                let c = c_sq.sqrt();
                let probability = self.win_probability(c, my_rating, rating);

                info += probability * (1. - probability) / c_sq;
                update += (outcome - probability) / c;
            }
            // Treat the round as one highly informative match
            info = 0.25 / (old_sig_sq + 2. * sig_perf_sq); // value replaced?
            update /= all_ratings.len() as f64;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions