leaderbot.models.Davidson.marginal_outcomes#

Davidson.marginal_outcomes(max_rank=None, bg_color='none', fg_color='black', save=False, latex=False)#

Plot marginal probabilities and frequencies of win, loss, and tie.

Parameters:
max_rankint, default=None

The maximum number of agents to be displayed. If None, all agents in the input dataset will be ranked and shown.

bg_colorstr or tuple, default=’none’

Color of the background canvas. The default value of 'none' means transparent.

fg_colorstr or tuple, default=’black’

Color of the axes and text.

savebool, default=False

If True, the plot will be saved. This argument is effective only if plot is True.

latexbool, default=False

If True, the plot is rendered with LaTeX engine, assuming the latex executable is available on the PATH. Enabling this option will slow the plot generation.

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()

>>> # Leaderboard report and plot
>>> model.marginal_outcomes(max_rank=100)
../_images/rank.png