GeM (Markov) Example

We set equal votes which means that if we convert them to weights are 0.25 for each game statistic. TW is the total wins, TG is the total goals, TST is the total shots on target and TS is the total shots. For the total wins (TW) statistic we have applied the method where a winning team gains a vote by each team that has beaten (VotingWithLosses). In the case of a tie, both teams cast a half vote. For the other statistics, in every game, each team votes according to the number of points lost by the other team (WinnersAndLosersVotePoint).

[1]:
from ratingslib.datasets.filenames import dataset_path, FILENAME_EPL_2018_2019_20_GAMES
from ratingslib.ratings.markov import Markov
filename = dataset_path(FILENAME_EPL_2018_2019_20_GAMES)
votes = {
    'TW': {
        'VOTE': 10,
        'ITEM_I': 'FTHG',
        'ITEM_J': 'FTAG',
        'METHOD': 'VotingWithLosses'},
    'TG': {
        'VOTE': 10,
        'ITEM_I': 'FTHG',
        'ITEM_J': 'FTAG',
        'METHOD': 'WinnersAndLosersVotePoint'},
    'TST': {
        'VOTE': 10,
        'ITEM_I': 'HST',
        'ITEM_J': 'AST',
        'METHOD': 'WinnersAndLosersVotePoint'},
    'TS': {
        'VOTE': 10,
        'ITEM_I': 'HS',
        'ITEM_J': 'AS',
        'METHOD': 'WinnersAndLosersVotePoint'},
}
Markov(b=0.85, stats_markov_dict=votes).rate_from_file(filename)
[1]:
Item rating ranking
0 Arsenal 0.050470 11
1 Bournemouth 0.039076 15
2 Brighton 0.051460 10
3 Burnley 0.071596 2
4 Cardiff 0.024085 20
5 Chelsea 0.045033 13
6 Crystal Palace 0.037678 16
7 Everton 0.066307 3
8 Fulham 0.036356 17
9 Huddersfield 0.032164 19
10 Leicester 0.055491 7
11 Liverpool 0.056879 6
12 Man City 0.048325 12
13 Man United 0.061052 4
14 Newcastle 0.035814 18
15 Southampton 0.051716 9
16 Tottenham 0.053079 8
17 Watford 0.082788 1
18 West Ham 0.041824 14
19 Wolves 0.058807 5