leaderbot.models.RaoKupper.infer#
- RaoKupper.infer(x=None)#
Infer the probabilities of win, loss, and tie outcomes.
- Parameters:
- xnp.ndarray, list, zip, or leaderbot.data.DataType
A 2D array (or equivalent list to zip) of integers with the shape
(n_pairs, 2)
where each row consists of indices[i, j]
representing a match between a pair of agents with the indicei
andj
. Alternatively, a dictionary of the typeleaderbot.data.DataType
can be provided. If None, theX
variable from the input data is used.
- Returns:
- probnp.array
An array of the shape
(n_pairs, 3)
where the columns represent the win, loss, and tie probabilities for the model i against model j in order that appears in the input x.
- Raises:
- RuntimeError
If the model is not trained before calling this method.
Examples
>>> from leaderbot.data import load >>> from leaderbot.models import Davidson >>> # Create a model >>> data = load() >>> model = Davidson(data) >>> # Train the model >>> model.train() >>> # Make inference >>> prob = model.infer()