{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Colley Example" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Itemratingranking
0Arsenal0.33333316
1Bournemouth0.6860123
2Brighton0.5625006
3Burnley0.40178610
4Cardiff0.39434511
5Chelsea0.6666675
6Crystal Palace0.5014888
7Everton0.5625006
8Fulham0.29315517
9Huddersfield0.33333316
10Leicester0.4732149
11Liverpool0.7127982
12Man City0.6666675
13Man United0.5089297
14Newcastle0.39136912
15Southampton0.36607114
16Tottenham0.6711314
17Watford0.7410711
18West Ham0.34970215
19Wolves0.38392913
\n", "
" ], "text/plain": [ " Item rating ranking\n", "0 Arsenal 0.333333 16\n", "1 Bournemouth 0.686012 3\n", "2 Brighton 0.562500 6\n", "3 Burnley 0.401786 10\n", "4 Cardiff 0.394345 11\n", "5 Chelsea 0.666667 5\n", "6 Crystal Palace 0.501488 8\n", "7 Everton 0.562500 6\n", "8 Fulham 0.293155 17\n", "9 Huddersfield 0.333333 16\n", "10 Leicester 0.473214 9\n", "11 Liverpool 0.712798 2\n", "12 Man City 0.666667 5\n", "13 Man United 0.508929 7\n", "14 Newcastle 0.391369 12\n", "15 Southampton 0.366071 14\n", "16 Tottenham 0.671131 4\n", "17 Watford 0.741071 1\n", "18 West Ham 0.349702 15\n", "19 Wolves 0.383929 13" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from ratingslib.datasets.filenames import dataset_path, FILENAME_EPL_2018_2019_20_GAMES\n", "from ratingslib.ratings.colley import Colley\n", "filename = dataset_path(FILENAME_EPL_2018_2019_20_GAMES)\n", "Colley().rate_from_file(filename)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.8.13 ('py38')", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.13" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "23ceb7112fbf9d0e38ecbf60d6e6d5e2dcebcc82200eeb1e5a5d5f9ffb9e27ca" } } }, "nbformat": 4, "nbformat_minor": 2 }