Giter VIP home page Giter VIP logo

cricket-match-win-predictor's Introduction

A Python GUI Application predicting the winner of ODI Cricket matches at 80% accuracy taking into account every player’s affinity to ground, recent form and performances against opposition.

Objective -

The very interest towards the cricket matches and the anticipation towards knowing the result beforehand to avoid edge-seating situations triggered us to come up with a Win Predictor model for ODI matches.

Tools used -

  • BeautifulSoup – Used for souping webpage (ESPNCricinfo in our case)
  • TKinter – Used for front-end GUI

Website Resource to scrap data: ESPN-Cricinfo - Statsguru

Prediction Factors -

  • Recent Form – The Statistics of the latest 10 matches of players is used to depict his current form
  • Ground Form – The Statistics of the players on that particular ground(venue of the match), indicates how effectively will he be able adapt himself to the specific ground.
  • Opposition score – The Statistics of batsmen pitted against the bowling unit of the opposition gives an insight of the ability of players to score runs or take wickets against the opposition

Batsman Score(Recent Form & Ground Score)

SR = (Runs/Balls Faced)*100
runs = (Runs*100)/(Total team score/10)
wkts = (1-((Number of Dismissals)/(Number of matches)))*100
score50 = (Number of 50s/Number of matches)*50
score100 = (Number of 100s/Number of matches)*100
score150 = (Number of 150s/Number of matches)*150
score200 = (Number of 200s/Number of matches)*200

SCORE = SR + runs + wkts + score50 + score100+ score150 + score200

Bowler Score(Recent Form & Ground Score)

Hauls = ((37.5*Number of 3Ws) + (62.5*Number of 5Ws)) / Number of matches 
wkts = (Wickets taken / Number of matches)*100
maidens = Maidens / int(Balls/6)*100*5
overs = int(Balls/6) + float((int(Balls)%6))/10
economy = (1-((Runs given)/(10*overs)))*100

SCORE = hauls + wkts + maidens + economy

Opposition Score

SR = (Runs/BallsFaced)*100
if(Wickets != 0):
 	runs_per_wkt = Runs/Wickets
 else:
	runs_per_wkt = Runs
additional = Number of 4s + 1.5*(Number of 6s)
wkts = Wickets*(-5)

SCORE = SR + runs_per_wkt + additional + wkts

The Application is designed to work on Linux Based Distributions and requires python 2 installed

Packages Required -

All the packages mentioned below are meant to be installed apart from the basic pythonic import files

1. TKinter
2. urllib
3. pandas
4. bs4

To run the Application -

Upon proper installation of above specified packages, run the python(2.x) file in terminal as:

python PredictTheOutComeUI.py

Working

Upon successful start of applications, to predict a match's outcome

  1. Give the date of the match, playing teams and the Venue Code (indicated by ESPNCricinfo) and Click 'Next'

Unable to load image

  1. Enter the 11 players you are expecting to play along with thier roles in the team. (Both the batting and bowling statistics is used for the All-Rounder)

Unable to load image

  1. Click 'Scrap' to get details from the website (This may take some time and requires active internet connection)

Unable to load image

Future Work

  • Designing Learning Algorithms(Classifier and Regressor models) on top of scrapped data to come-up with robust, effective and better results
  • Usage of python's 'multiprocessing' capabilities along with 'asyncio' yields to quicken the process of scrapping.
  • Replacing the venue code in GUI with country and ground names.
  • Better GUI Design

cricket-match-win-predictor's People

Contributors

abhishek-mygit avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.