|
3 | 3 | ## Content
|
4 | 4 |
|
5 | 5 | * [Directory Tree](#directory-tree)
|
6 |
| - |
7 | 6 | * [Overview](#overview)
|
8 |
| - |
9 |
| -* [What is xG](#what-is-xg) |
10 |
| - |
| 7 | +* [What is xG?](#what-is-xg) |
11 | 8 | * [How xG is used?](#how-xg-is-used)
|
12 |
| - |
13 | 9 | * [xG Model](#xg-model)
|
14 |
| - * [Simple Dataset](#simple-dataset) |
15 |
| - * [Steps to Run the script](#steps-to-run-the-script) |
16 |
| - * [Evaluating The Results](#evaluating-the-results) |
| 10 | + * [Basic Model](#basic-model) |
| 11 | + * [Intermediate Model](#intermediate-model) |
| 12 | + * [Advance Model](#advance-model) |
| 13 | +* [Steps to run the script](#steps-to-run-the-script) |
| 14 | +* [How to plot?](#how-to-plot) |
| 15 | +* [Reviewing the basic model](#reviewing-the-basic-model) |
| 16 | +* [Reviewing the intermediate model](#reviewing-the-intermediate-model) |
| 17 | +* [Reviewing the advance model](#reviewing-the-advance-model) |
17 | 18 |
|
18 | 19 | ## Directory Tree
|
19 | 20 |
|
|
70 | 71 |
|
71 | 72 | * Here, in this project I have tried to build an xG Model from scratch using machine learning algorithms.
|
72 | 73 |
|
73 |
| -## What is Expected-Goals (xG)? |
| 74 | +## What is xG? |
74 | 75 |
|
75 | 76 | * In layman's term, xG (or expected goals) is the **probability** that a shot will result in a goal based on the characteristics of that shot.
|
76 | 77 |
|
|
191 | 192 |
|
192 | 193 | * The machine learning algorithms implemented for making the models are: **Logistic Regression**, **Random Forest** and **xG Boost**(eXtreme Gradient Boosting).
|
193 | 194 |
|
194 |
| -## Steps to Run the script |
| 195 | +## Steps to run the script |
195 | 196 |
|
196 | 197 | * To execute all the scripts in one go I have created **run.sh** file, on executing it will create the required datasets, train and test the model and save the required model and corresponding categorical features.
|
197 | 198 |
|
@@ -275,6 +276,41 @@ sh run.sh "basic" "xg_boost" "none" "False" "False"
|
275 | 276 | * And finally we will plot the aggregated xG values. Execute the cells in *aggregated xG values* by providing the right path.
|
276 | 277 |
|
277 | 278 | * One can run similarly plot for other models as well (i.e. for *intermediate* and *advance* model) but make sure to run or have the models for *intermediate* or *advance* before plotting for the same.
|
| 279 | + |
| 280 | +## Reviewing the basic model |
| 281 | + |
| 282 | +* To review the basic model for all three machine learning algorithms used I made a table for top 25 players with the most number of goals for both train and test dataset. |
| 283 | + |
| 284 | +* Let's see how the table looks like for the train dataset([link](https://github.com/Slothfulwave612/xG-Model/blob/master/plots/basic_model/train_simple.png)): |
| 285 | + |
| 286 | +  |
| 287 | + |
| 288 | +* Table for test dataset([link](https://github.com/Slothfulwave612/xG-Model/blob/master/plots/basic_model/test_simple.png)) : |
| 289 | + |
| 290 | +  |
| 291 | + |
| 292 | +* To see all the plots visit [this](https://github.com/Slothfulwave612/xG-Model/tree/master/plots/basic_model). |
278 | 293 |
|
| 294 | +## Reviewing the intermediate model |
279 | 295 |
|
280 |
| -## Revie |
| 296 | +* Table for train dataset([link](https://github.com/Slothfulwave612/xG-Model/blob/master/plots/intermediate_model/train_simple.png)): |
| 297 | + |
| 298 | +  |
| 299 | + |
| 300 | +* Table for test dataset([link](https://github.com/Slothfulwave612/xG-Model/blob/master/plots/intermediate_model/test_simple.png)) : |
| 301 | + |
| 302 | +  |
| 303 | + |
| 304 | +* To see all the plots visit [this](https://github.com/Slothfulwave612/xG-Model/tree/master/plots/intermediate_model). |
| 305 | + |
| 306 | +## Reviewing the advance model |
| 307 | + |
| 308 | +* Table for train dataset([link](https://github.com/Slothfulwave612/xG-Model/blob/master/plots/advance_model/train_simple.png)): |
| 309 | + |
| 310 | +  |
| 311 | + |
| 312 | +* Table for test dataset([link](https://github.com/Slothfulwave612/xG-Model/blob/master/plots/advance_model/test_simple.png)) : |
| 313 | + |
| 314 | +  |
| 315 | + |
| 316 | +* To see all the plots visit [this](https://github.com/Slothfulwave612/xG-Model/tree/master/plots/advance_model1). |
0 commit comments