Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Session: 2014-2018
Submitted By
_____________________
Project Office Supervisor
___________________ _____________________
Project Primary Advisor Project Examiner
_____________________
we eternally grateful our supervisor, Mr. Arslan Tariq for his valuable input, patient
guidance, encouragement, whole hearted cooperation and advice. we are indebted to him
for many stimulating discussions about this work and inspiring our interest in the field of
Sports Analytics. You are an epitome of the ideal sir and have always lived up to the
saying that being nice is never being bad.
We take this opportunity to thank all member of faculty for guiding us and who have
helped us directly or indirectly helped our project.
we also wanted to remind ourselves that none of this work would have been a reality
without the sacrifices of our families. we must express our gratitude to our parents for
their continued support and encouragement.
We do thanks to University Of Lahore for providing the best possible facilities.
Finally, to all our friends who had been there whenever we needed them and made our
stay memorable, you will be never forgotten.
We do thanks to University of Lahore for providing the best possible facilities.
Thank you
Player selection is one of the most important tasks for any sport and cricket is no
exception. The performance of the players depends on various factors such as the
opposition team, the venue, his current form etc. The team management, the coach and
the captain select eleven players for each match from a squad of 15 to 20 players. They
analyze different characteristics and the statistics of the players to select the best playing
11 for each match. Each batsman contributes by scoring maximum runs possible and each
bowler contributes by taking maximum wickets and conceding minimum runs. This
project attempts to predict the performance of players. We have used Naive Bayes to
generate the prediction model for the best team selection.
Cricket is a game played between two teams which consist of eleven players each.
Nowadays cricket game is becoming more and more popular in Pakistan and other South
Asian Countries. Before a match people are very enthusiastic about team squads and”
Which players are playing today?” How well will MR. X perform today?” are the
million-dollar questions before a big match. So, we are introducing an android
application “Auto Team Selector” using statistical data analysis for recommending a
national team squad. Recent match scorecards for international matches played by a
specific team in recent years are used to recommend the ideal squad. Impact point or
rating points of all players in different conditions are calculated and the best ones from
different categories are chosen to form optimal line-ups.
The bowling ends are swapped at the end of each over. An over consists of six balls
bowled by a bowler. A different bowler comes in to bowl the next over. The number of
Cricket is played in three different formats: one-day matches, T20 matches and test
matches. One-day matches, also known as ODIs (One Day International) and T20
(twenty-twenty) matches are also known as limited over cricket.
In these formats there are two innings, so each team gets one chance to bat and one
chance to bowl. In ODIs, a maximum of 50 overs can be bowled in one innings and in
T20s, as the name suggests, a maximum of 20 overs can be bowled in one innings. So, an
innings ends if 50/20 overs have been bowled or the batting team has lost 10 wickets.
At the end of the first innings the teams change roles. The bowling team now bats and
tries to chase the target set by the other team within 50/20 overs or before losing their 10
wickets.
Similarly, the batting team now bowls and tries to prevent the other team from chasing
the target down within 50/20 overs or by taking 10 wickets. Test matches on the other
hand are played over a maximum of five days and each team can play up to two innings
in a match. Limited overs cricket is more challenging for both batsmen and bowlers.
Batsmen need to score runs as fast as possible and the bowlers need to restrict them by
conceding the least runs and taking wickets.
The focus of this project is the ODI, T20 and Test.
The traditional way of team selection in the game of cricket requires lot of expertise and
consumes a lot of time.
As a sport cricket is played globally across 106-member states of the International
Cricket Council (ICC), with an estimated 1.5 billion fans worldwide (ICC, 2012-2013).
Selecting the best players for a particular match in any sport involves predicting the
player’s performance. Player’s performance varies with the team they play against and
the ground on which they play the match. Player selection is particularly more important
in the game of cricket as the 11 players selected at the beginning of the match are fixed
unless in case of injury.
Player’s performance can be predicted by analyzing their past statistics and
characteristics. Cricket player’s abilities and performance can be measured in terms of
different stats. Batsmen’s statistics include batting average, batting strike rate, number of
centuries etc. Whereas bowlers’ statistics are measured by bowling average, bowling
strike rate, economy rate etc.
Moreover, recent performances of the batsman/bowler, the performance of the
batsman/bowler against a particular team and the performance of the batsman/bowler at a
given venue are also taken into account for predicting his performance in the upcoming
match. The team management, the coach and the captain utilize these facts and their own
experience to select the team for a given match.
Cricket is played mainly in the following ten countries, who are full time members
Of the International cricket council and are also referred to as the test nations; Australia,
Bangladesh, England, India, New Zealand, Pakistan, South Africa, Sri Lanka, West
Indies and Zimbabwe. Cricket is followed by a billion plus audience.
Objectives:
Sr.#
Reduce the manual work
Develop an intelligent Application
Predict the best team for cricket to play with opponent
Application display the best team within seconds according to the give
criteria
The proposed project to be considered successful requires proper planning and all the
requirements to be fulfilled accordingly. The goal to build the proposed system is to
provide best Pakistani team out of 30 or 25 members. And the success criteria of the
proposed system to achieve this goal and objectives. Exceeding the objectives will bring
about success to the project.
The proposed project meets the objectives which are login for the users, the user
generate the team for the 3 different formats (T20, ODI, TEST). The user can get every
information about the member of team within no time.
Responses to queries shall take no longer than 4 to 5 second to load onto the
screen after the user submits the query.
Our application will generate appropriate exceptions if there is a failure during
execution.
The application will display the best team within seconds according to the given
criteria. In other words, robustness is good.
1.7 Methodology
Our system “Auto team selector” consists of android application. Android Studio as
Android is famous for its wonderful features like graphics, Material Design, Media
support for audio, video, and still image formats.
The coding in Android Studio will be done by using Java programming language and all
its concepts of classes and inheritance. The data is fetched from the
www.espncricinfo.com in the form of scraper (Json) file and then import the Json files to
the project.
An extensive online search produced very few articles related to player’s performance
prediction in the game of cricket. A very small number of researchers have tried to
predict the performance of cricket players.
Kaluarachchi and Varde developed a software tool ‘CricAI,’ which predicts the
probability of victory in an ODI cricket match. Bayesian classifiers were used on input
factors such as batting first, winning the toss, day/night effect, and home game
advantage.
Zualkernan designed a system that uses machine learning techniques and Dynamic
Time Warping providing a feedback to the coaches and the players which helps them in
improving their technique and also their performance in the game of cricket.
Singh had developed a model to predict the first innings score and outcome of second
innings not only on the basis of current run rate but also considering factors such as
venue of the match, batting team, and number of wickets.
Pathak and Hardik had applied modern classification techniques such as Random
Forest, Support Vector Machines, and Naive Bayesian to determine the outcome of a
cricket match.
Saikia and Bhattacharjee classified all-rounders in four categories using Naïve Bayes
classification: Performer, Batting All-rounder, Bowling-All-rounder and Under-performer.
They used the data of 35 all-rounders who played in first three seasons of IPL to generate the
classification model and used the model to predict the expected classes of six new all-
rounders.
There are many projects which are present in the Android and OS, These all projects
describes the win or loss of the team or gives the updates about the cricket team etc.
Requirement analysis
3.1 Requirement Analysis
In this chapter, the analysis is made of requirements. This chapter covers functional
requirements and non-functional requirements as well. Requirement analysis is an
important phase in which need of the proposed system is discussed. It is the basic core of
developing any project. The need of the proposed system is discussed in this phase.
Requirement analysis provides the foundation of the desired system. It ranges from a
high-level abstract statement of a service or of a system constraint to a detailed
mathematical functional specification.
Requirements Analysis is a challenging phase as customers and their comforts are
brought into the process of determining requirements. The quality of our project is highly
dependent on the usefulness of the requirements analysis. Since the requirements form
the basis for all future work on the project, it is of the utmost important that the project
team creates a complete and precise depiction of all requirements that the project must be
performed. Accurately recognized requirements result from effective communication and
collaboration among all members of the Project Team, and provide the best chance of a
product that fully satisfies the needs of the users.
We can analyze the requirement in to two further phases of our proposed system.
Functional Requirements
Requirements that define those features of the product that will specifically
satisfy a Consumer need, or with which the Consumer will directly interact. It’s
about the user point of view.
Non-Functional Requirements
Requirements that define the features on the back end. From which user does not have to
interact. The requirements which fulfill the functional requirements. It’s about the
system.
3.1.1.1 Register
This feature is considered as a significant feature of any Application where any new user
get registered. Here certain fields are needed to be filled up, that includes Name, Email,
Address, Password, Confirm Password and Phone Number. The data provided here will
be entered in the Database and will authenticate the user when he will try to login again.
3.1.1.3 Feedback
This feature is the pivotal feature of the project. Where we can gather the user’s opinion
that actually helps us in understanding the quality of our Application. Moreover by using
feedbacks or reviews we can also modify our Application and we can introduce the
modules that may be in accordance with the needs and demands of our users.
The Application will store the Feedback in
FR6: Database
3.1.1.4 Rating
This feature is the pivotal feature of the project. Where we can gather the user’s opinion
that actually helps us in understanding the quality of our Application. Moreover by using
the statistics of Rating we can also modify our Application and we can introduce the
modules that may be in accordance with the needs and demands of our users
The Application will store the Rating in
FR7: Database
Operability
The whole installation should be in a safe and reliable functioning condition,
according to pre-defined operational requirements
Where:
• P (C|X) is the posterior probability of class C given predictor X.
• P(C) is the prior probability of class.
• P (X|C) is the posterior probability of X given the class C.
• P(X) is the prior probability of predictor.
The classifier calculates P (C|X) for every class Ci for a given tuple X. It will then predict
that X belongs to the class having the highest posterior probability, conditioned on X.
That is X belongs to class Ci if and only if
3.4.3New Attributes
To predict a player’s performance, his past performances need to be analyzed in terms of
how much experience he has, how consistent he has been in his performance, how well
he has been performing in recent matches, how well can he tackle the bowlers/batsmen of
different teams, how well does he play at different venues, etc.
Traditional measures of players’ performance cannot reflect these factors directly.
Design
4.1Use Cases
Following are the use cases:
Register
Login
Feedback
Rating
Match Type Selection
Venue Selection
Opponent Selection
Pitch Condition Selection
Player Selection
Player History
4.1.1 Register
4.1.2 Login
Use case Login
Actors User
Description
This feature provides the User to Login the Application easily because he has already
given his credentials and by the time of Login he will just give his email and password
which will be authenticated from database and then the Application will be proceeded.
Pre Condition
The user will give his credentials.
Post Condition
Application will proceed to welcome screen.
The user will enter His The system will cross check his email
Email id from Database
The user will enter His The system will authenticate his
Password Password from Database
The User will press The System will display Welcome Screen
Login Button
Extensions
In case User has not given correct Email or Password he will not be
able to Login and System
4.1.3 Feedback
Use case Feedback
Actors User
Description
Post Condition
The Software will store feedback in Database
4.1.4 Rating
Use case Rating
Actors User
Description
This feature is the pivotal feature of the project. Where we can gather the user’s opinion
that actually helps us in understanding the quality of our Application. Moreover by using
the statistics of Rating we can also modify our Application and we can introduce the
modules that may be in accordance with the needs and demands of our users
Pre-Condition
The User will rate the Application
Post Condition
The Software will store that Rating in Database
The user can view the data and statistics of the player.
Modules
5 Application Modules
The picture shows that all the library files that are use to make project /Support project
files. This fig show that Android Manifest, Java, Splash Screen Layout ,Resource files
and Gradle files to build project.
5.3Virtual Devices
5.4Splash Screen
When the user open the project a screen is shown which is as follow:
This is the welcome page of the application if the user click on the generate team button
the next activity is open up.
When the user click on the next button the team is generate according to the format.
This activity shows the information about the player e.g: Name, age, carrier status etc
5.12 Feedback
There is an admin module in which all the admin work like managing all the things in the
application.
https://proprtyhub.com:2083/cpsess660591466/frontend/paper_lantern/index.html
This is the link by which an admin can reach the admin panel and can do this as
prescribed.
Testing
6.1Testing
Works as expected
Software testing, depending on the testing method employed, can be implemented at any
time in the development process. However, most of the test effort occurs after the
requirements have been defined and the coding process has been completed. As such, the
methodology of the test is governed by the software development methodology adopted.
Status: Pass
Login
Test Engineer: Tayyba Maryam
Test Case ID: TC2
Date: 04-08-18
Purpose: Log to get access features by providing correct information.
Pre-Req: Working internet and The user must be a register user.
Test Data: Tester will enter data on Login form
Steps:
1. User open application and go to login link.
2. The user enter his information and press login button
Status: Pass
Welcome page
Test Engineer: Muhammad Tayyab
Test Case ID: TC3
Date: 09-08-18
Purpose: Click the generate button so that the tester get the required Info how to
create the team
Pre-Req: Working internet
Test Data: Tester will click generate team button.
Steps:
1. After login a new page open(welcome)
2. The user click on the generate button so that he moves to the
next activity.
Status: Pass
Make Selection
Test Engineer: Zainab Arshad
Test Case ID: TC4
Date: 15-08-18
Purpose: Select the required information to generate the team
Pre-Req: Working internet
Test Data: Tester will select all the info to get the require results
Steps: 1. User select the type of match (ODI, TEST,T20)
2. User select the venue
3. User select the opponent venue
4. User select the temperature
5. According to this pitch condition is shown(fast, slow)
6. User click on the next button
Status: Pass
Status: Pass
7.1 Conclusion
Selection of the right players for each match plays a significant role in a team’s victory.
An accurate prediction of how many runs a batsman is likely to score and how many
wickets a bowler is likely to take in a match will help the team management select best
players for each match. In this project, we modeled batting and bowling datasets based on
players’ stats and characteristics. Some other features that affect players’ performance
such as weather or the nature of the wicket could not be included in this study due to
unavailability of data.
Bibliography / References
8.1 References
[1] "How to Play Cricket: 14 Steps (with Pictures) - wikiHow," [Online]. Available:
https://www.wikihow.com/Play-Cricket.
https://developer.android.com/
https://www.google.com/
http://stackoverflow.com/
http://www.codeproject.com/
https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html
https://github.com/square/retrofit
https://www.androidtutorialpoint.com/basics/activity-lifecycle-and-debugging-of-an-
android-app/
https://www.androidtutorialpoint.com/networking/json-parsing-tutorial-android/
https://www.androidtutorialpoint.com/networking/android-retrofit-2-0-tutorial-retrofit-
android-