Skip to content

A streamlit app to display the results of the lionel team picking model

License

Notifications You must be signed in to change notification settings

jth500/lionel-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lionel_app

A Streamlit App to display the results of the lionel FPL team picking tool.

The model

Lionel estimates points using a match and player level model.

For the home team:

$$ \text{N}{\text{goals scored, home}} \sim \text{Poisson}(\lambda{\text{home}}) $$

$$ \text{N}{\text{goals conceded, home}} \sim \text{Poisson}(\lambda{\text{away}}) $$

where:

$$ \text{log}(\lambda_{\text{home}}) = \beta_0 + \beta_{\text{home advantage}} + \beta_{\text{attack, home team}} + \beta_{\text{defence, away team}} $$

and $\lambda_{\text{away}}$ has a similar formulation.

Then, at the player level:

$$ \text{Points}{\text{player, match}} \sim \mathcal{N}(\frac{\text{minutes}}{90}\mu{\text{player, match}}, \sigma^2 ) $$

where:

$$ \mu_{\text{player, match}} = \text{p}{\text{goals, position}}\text{n}{\text{goals}} + \text{p}{\text{goals, position}}\text{n}{\text{assists}} + \text{p}{\text{clean sheet, position}}\gamma\text{clean sheet} + \alpha_\text{player} $$

Where:

$$ \text{n}{\text{goals}}, \text{n}{\text{assists}}, \text{n}\text{neither} \sim \text{Multinomial}(\text{N}\text{goals scored, home}, \text{p}{\text{score}}, \text{p}{\text{assist}}, \text{p}_{\text{neither}}) $$

$$ \gamma_\text{clean sheet} = 1 \text{ if } \text{N}_{\text{goals conceded}}=1 $$

$$ \alpha_{\text{player}} \sim \mathcal{N}(\mu_\text{player}, \sigma_{\alpha}^2) $$

and $\text{p}_{\text{event, position}}$ denotes the number of points that each position earns for a goal, assist, or clean sheet.

An analogous model is used for players on the away team.

About

A streamlit app to display the results of the lionel team picking model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages