Skip to content

Rit-ctrl/Pressure-Quantification-for-Cricket

Repository files navigation

Quantifying Pressure in Cricket for building Expected Runs model

Update: The recipe data project can be found here - https://github.com/Rit-ctrl/Recipe-Data-Analysis.

Sorry for the inconvenience

Flowchart of proposed model

Agenda

  • Utilise LSTM model to build pressure index

  • Combine this with current state variables to predict runs scored

  • Use other methods from literature

  • Build models without previous state information to ascertain if pressure is useful for predicting runs scored

  • IPL play-by-play data obtained from Cricsheet.org

  • Train on IPL seasons 2008-2021, test on 2022-2023

  • Compare Mean squared error for the models to evaluate

    image

Code structure

  • utils.py : Contains helper functions for reading the input files

    • process_df : reads csv files and processes them
    • get_data : gets training and test data
    • xR_Model : Pytorch model definition for proposed model
  • 00_Read.ipynb : Notebook for exploring the data. Useful if you want to take a look at the data

  • 01_PI_baseline.ipynb : Notebook for calculating MSE for baseline pressure index PI3

  • 02_Results.ipynb : Notebook for calculating MSE for proposed model, as well as Linear Regression and xGBoost Model

  • DLR.csv contains the Duckworth-Lewis Resource table used for calculating the PI3

About

Quantification of Pressure in Cricket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published