Sei sulla pagina 1di 64

The University of Lahore, Chenab Campus

Auto Team Selector

The University of Lahore, Chenab Campus Page 1


Auto team Selector

Session: 2014-2018

Project Advisor: Sir Arslan Tariq

Submitted By

Tayyaba Maryam 70051418


Zainab Arshad 70051578

Muhammad Tayyab 70051540

The University of Lahore, Chenab Campus

The University of Lahore, Chenab Campus Page 2


STATEMENT OF SUBMISSION

_____________________
Project Office Supervisor

___________________ _____________________
Project Primary Advisor Project Examiner

The University of Lahore, Chenab Campus Page 3


Proofreading Certificate
It is to certify that I have read the document meticulously and circumspectly. I am
convinced that the resultant project does not contain any spelling, punctuation or
grammatical mistakes as such. All in all, I find this document well organized and I am in
no doubt that its objectives have been successfully met.

_____________________

The University of Lahore, Chenab Campus Page 4


Acknowledgement

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

The University of Lahore, Chenab Campus Page 5


Abstract

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.

The University of Lahore, Chenab Campus Page 6


Table of Content
CAPTERR 1…………………………………………….......7
Introduction and Background…………...…….………….8
1.1 Background……………………………………………9
1.1.1 The Game of Cricket………………....……9
1.1.2 Formats of the Game………………….11
1.2 Statement of the problem….………………….11
1.3 purpose of the project/research……………….12
1.4 Project Overview Statement………………….13
1.5 Project Goals & Objectives……………......…16
1.6 Tools & Technologies……………….……….17
CAPTERR 2……………………………………………......19
Review of the literature…………………….......................19
2.1 Related Technologies…………...….…..….….20
2.2 Related Projects…....……………///........…….20
2.2.1 Their Limitations and Bottlenecks……......21
2.3 Related Studies………...……………………...21
CAPTERR 3……………………………………...……....... 23
Requirement Analysis….………………………...……..…23
3.1 Functional Requirements…………...…………25
3.2 Nonfunctional Requirements…...……………..28
CAPTERR 4……………………………..…………….........33
Design……………………………….…………...…...….....33
4.1 Use Cases……………………………...………34
4.2 Use case Diagram…………………...…………42
4.3 Class Diagram……………………..…….…….43
4.4 Activity Diagram…………………..….……….44
4.5 Architecture Diagram……………//.…………..45
5 Modules……………………………..….…………46
5.1 Application Modules…………..…….………...47
6 Testing………………………………...…………..52
6.1 Testing Case…………………………………..54
7 Conclusion and Further Work……...…………...57
7.1 Conclusion……………...………………………....58
7.2 Future Work………………………………….......58
8 Bibliography / References………...……………...59

The University of Lahore, Chenab Campus Page 7


CHAPTER 1
Introduction and Background

The University of Lahore, Chenab Campus Page 8


CHAPTER-1

Introduction and Background


1.1 Background

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.

1.1.1 The Game of Cricket


Cricket is a sport played by two teams with each side having eleven players. One team
bats and the other team bowls (fields) at a time and one such session is called an innings.
In the center of the field, there is a 22-yard long pitch where most of the action takes
place. Both ends of the pitch will have a wicket which has three wooden stumps and two
cross pieces called the bails.
Each team consists of batsmen, bowlers and a wicket-keeper. All the players from the
bowling team are on the field; one of them is behind the wickets, one of them bowls
(throws the ball) from one end of the pitch and the other players are fielding, arranged in
a particular fashion decided by the captain of the team.
Two players from the batting team are on the field, alternating batting at a time. One of
them bats from one end while the other one waits at the other end where the bowler is
bowling from. The batsmen can be dismissed in many different ways with each ball
bowled and this is called a wicket. As at a given time, there need to be exactly two
batsmen on the field, the batting team has 10 wickets at the beginning of their innings.

The University of Lahore, Chenab Campus Page 9


The batting team has to defend their wickets and score maximum runs possible and the
bowling team has to get wickets as soon as possible and restrict the batting team from
scoring runs. The team scoring the most runs wins at the end of the match.
The batsman on the opposite end of the bowler is called the striker. The striker takes
guard on the popping crease which is four feet away in front of the wickets. The striker
has to prevent the wickets from being hit by the ball by striking the ball hard with his bat.
He tries to hit the ball well enough to score maximum runs on each delivery.
Runs can be scored in two different ways. One way is to hit the ball hard enough for it to
cross the boundary. If the batsman hits the ball into the air and the ball crosses the
boundary before dropping on the ground, the batting team gets six runs, which is the
maximum number of runs that can be scored on a legal delivery; otherwise the batting
team gets four runs if the ball drops before crossing the boundary. Another way to score
runs is by the two batsmen swapping ends running the length of the pitch in opposite
directions while the fielders retrieve the ball.
The fielding team’s role is to prevent the batsmen from scoring runs and dismiss them as
soon as possible. A batsman can be dismissed in several ways. When the bowler hits the
wickets directly with the ball and removes the bells from the stumps, the batsman is said
to be bowled. When the batsman prevents the ball from hitting the stumps with his body,
he is said to be dismissed as leg before wicket (lbw).
If the striker leaves the popping crease and misses the ball and the wicket keeper removes
the bells by hitting wickets with the ball, the batsman is dismissed as stumped. If the
batsman hits the ball into the air and the ball is caught by a fielder without dropping on
the ground, the type of dismissal is called caught.
If a fielder retrieves the ball and removes bells from the stumps by hitting them with the
ball, before the batsman reaches the crease while swapping ends to get a run, the batsman
running towards the end where the bells have been removed, is said to be dismissed by
run out. Any type of wicket except run out is said to be taken by the bowler who bowled
the ball.

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

The University of Lahore, Chenab Campus Page 10


balls may increase with illegal deliveries as wide balls or no balls which act as penalties
against the bowling team in the form of an extra run and an extra ball for the batting team
in that over. There are several ways in which a delivery can be declared a no ball or a
wide ball. The umpires declare a delivery as a no ball or a wide ball according to those
rules.

1.1.2Formats of the Game

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.

1.2 Statement of the problem

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).

The University of Lahore, Chenab Campus Page 11


The traditional way of team selection for any sport is based on the expert panel
judgments and most importantly includes negotiate decision making by these experts.
Unfortunately, there is no android application that selects the best team for Pakistan.
‘CricAI,’ software which predicts the probability of victory in an ODI cricket match.
Cricket Prediction APK predicts the best team on behalf of matches played between
teams but targeted only Indian players. Here, we make use of the advancement in the
technology to help the expert panel to assess the players based on their past
performances.
‘Auto team selector’ is application which facilitates user for selection of best team
automatically by just selecting team and venue. It reduces the stress of the organization.

1.3 Purpose of Project

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.

The University of Lahore, Chenab Campus Page 12


In comparison to other team sports such as football and baseball, the amount of
Work that has been done on cricket in the field of analytics is less. The economic and
Social perspectives such as fan following, media coverage, etc. provides strong incentive
to analyze the game.
Data used in the project is unstructured in nature. It was collected from
www.Cricinfo.com through web scrapping. The main goal of the analysis is to be
building accurate and robust classification models to predict the best team.
In this project, we will discuss how to rate the players using the Naïve Bayes Models and
then use them to make the best team out of them.

1.4 Project Overview Statement


Traditional method of selecting a team includes a panel of experts called selection
committee, who rate the player based on their performance and then voting is conducted
so as to know whether or not to include a player in the squad. After arriving at a final
squad of players, negotiate decisions are made so as to recommend which player plays
for the team in the respective competition.
This particular project deals with the problems facing by user in manual selection of
team. The drawback of the existing applications is that they are not generating team
automatically and there is no use of artificial intelligence. Existing applications are so
simple that are of no use for user. We can improve the efficiency of the system.
Project Goal:
The main goal of our proposal to Develop an application for selection of best team
automatically by just selecting team and venue.

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 University of Lahore, Chenab Campus Page 13


Project Success 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.

The University of Lahore, Chenab Campus Page 14


Assumptions, Risks and Obstacles:
 Application users must have Internet Access.
 The users may fail to access internet connection on smartphone and on computer.
 Product may be larger than estimated (in lines of code, function points, or
percentage of previous project's size).
 The proposed Application libraries may not available.
 The team members may not have the right combination of skills.
 Product Size, size of database created or used by the product and number of users
of the product may not be identified clearly.
 Number of projected requirements may change for the product before delivery
and after delivery.
 The amount and quality of product documentation that must be produced and
delivered may not be on time.
 The proposed system software project management tool and software process
management tool may not available.
 The analysis and design tools deliver methods may not appropriate for the
proposed system to be built.
 There may not be a documented statement of work, software requirements
specification, and software development plan.

Organization Address (if any): UOL GRT.

Target End users: PCB, Cricket Academies & Clubs

Development Technology: Object Oriented Structured


Platform: Web based Distributed
Desktop based Setup Configurations

The University of Lahore, Chenab Campus Page 15


1.5 Main Models
The main modules of the system are as follows:
1. Security
2. User Management
3. Web Crawling
4. Feature Selection
5. Clustering
6. Classification
7. Analysis

1.6 Project Goals & Objectives


There are following goals and objectives of the proposed application.
 The Application has a simple GUI, so that the user of the application will not have
any problem in using the application.
 The facility will be available to every user for 24 hours.

 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.

The University of Lahore, Chenab Campus Page 16


1.8 Hardware and Software Specification

Windows 10 (32, 64-bit operating system)


Android 4.4 and above

1.9 Tools & Technologies

Application would be developed in Java language using the Android Software


Development Kit (SDK). SDK includes several development tools which include
debugger, software libraries, an emulator (Android). We are using virtual device for this
app with specifications of 1 GB processor, minimum of 512 RAM and our target is API
25 Android version 7.1(Nougat) and minimum API 19 Android version 4.4(Jelly Bean).
 Google Play Services (Updated Version)
 Supported Integrated Development Environment (IDE) is Android Studio
powered by IntelliJ Platform (2.3.1 version)
 Language: Android Programming, Java, PHP, Html
 Tools: Android Studio, Jet Brain PyCharm

1.10 Why android?


1.10.1 Functionality wise:
 Firstly, Android is open-source platform.
 Secondly, Android enables reuse of components.
 Thirdly, Android can be native access to Google map infrastructure.
 Fourthly, its network can work in the way of Bluetooth, 3G or Wi-Fi. Finally, it
provides Widgets classes and Layout classes for designing UI.
1.10.2 Usage wise:
 Most mobile phones support J2ME, and therefore, the existing applications have
been built using this technology. But Android now is the largest installed base of
any Mobile Platform.

The University of Lahore, Chenab Campus Page 17


 Android has breached the digital world easily and it has become the fastest
growing mobile OS with no time. The final statistics point that more than 2 billion
monthly active android devices.

The University of Lahore, Chenab Campus Page 18


CHAPTER 2
Review of the literature

The University of Lahore, Chenab Campus Page 19


CHAPTER-2

Review of the literature


2.1 Related Technologies

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.

2.2 Related projects

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.

The University of Lahore, Chenab Campus Page 20


But there is no project that selects the best team out of 20 or 30 players.
Mostly these applications are related about the Indian’s players. There is no specific
application for the Pakistan’s player. There are also some betting applications on the play
store and apple store.
There is brief overview of these projects:
2.2.1 Cricket Predict and Win
It has complete cricket coverage including teams, player’s profiles, schedules,
customized news for each event/series, predict and be in top leaders of the game.
a. Limitations and Bottlenecks
i. This application doesn’t make best team for better performance.

2.2.2 Cric Informer-Tips for dream11, CPL news


Get real time cricket news, probable11, playing11, live score and fantasy cricket tips. It
covers all cricket matches from domestic cricket like Ranji matches, T20 blast, all ODD
cup, big bash, CPL, SPL, IPL, BPL to all International match.
a. Limitations and Bottlenecks
i. This application itself doesn’t predict the dream 11 players.
ii. The users predict the dream 11 players. According to this, user gets points.

2.2.3 Cricket Prediction APK


This App is Just for Entertainment purpose only. This Predict Match Winning Team on
behalf of last played matches between Teams, Ground, Pitch Report Suggestion of
Experts and Experience. Take it as a fun and entertainment. This app does not support
any kind of gambling or betting as its illegal in India.
a. Limitations and Bottlenecks
 This application targets only Indian’s players.

2.3 Related Studies


Kahn implemented multilayer perception model to forecast the outcome of the National
Football League winners.

The University of Lahore, Chenab Campus Page 21


Prabhu and Shaila had developed a Cricket Strategy Game which focuses on the
captaining, managing, strategizing, and aspects of cricket.
Muthuswamy and Lam predicted the performance of Indian bowlers against seven
international teams against which the Indian cricket team plays most frequently. They
used back propagation network and radial basis function network to predict how many
runs a bowler is likely to concede and how many wickets a bowler is likely to take in a
given ODI match.
Wikramasinghe predicted the performance of batsmen in a test series using a
hierarchical linear model.
Iyer and Sharda used neural networks to predict the performance of players where they
classify batsmen and bowlers separately in three categories – performer, moderate and
failure. Then based on the number of times a player has received different ratings, they
recommend if the player should be included in the team to play World Cup 2007.
Lemmer defined a new measure called Combined Bowling Rate to measure the
performance of bowlers. The Combined Bowling Rate is a combination of three
traditional bowling measures: bowling average, strike rate and economy.
Bhattacharjee and Pahinkar used this Combined Bowling Rate to analyze the
performance of bowlers in the Indian Premier League (IPL). They also determined other
factors that affect the performance of bowlers and applied multiple regression models to
identify the factors that are empirically responsible for the performance of bowlers.

The University of Lahore, Chenab Campus Page 22


CHAPTER 3
Requirement Analysis

The University of Lahore, Chenab Campus Page 23


CHAPTER-3

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.

The University of Lahore, Chenab Campus Page 24


3.1.1Functional Requirements
List of functional requirement
 Register
 Login
 Feedback
 Rating
 Match Type Selection
 Venue Selection
 Opponent Selection
 Pitch Condition Selection
 Player Selection
 Player History

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.

FR1: The Software should run on Android Platform.

The Software Shall Show the Login Screen of the


FR2: Machine.

The System Shall Display appropriate Error


FR3: Message in Case of Lost Connection

The University of Lahore, Chenab Campus Page 25


3.1.1.2 Login
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.

The Email given in the text view must


FR4: authenticate from the Database
Accordingly.
The Password given in the text view must
FR5: authenticate from the Database
Accordingly.

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

3.1.1.5 Match Type Selection


A pre-dominant feature of this Application is to select the Category of cricket Match. By
tapping Match Type the user will be provided with three options i.e. ODI, Test Match and
T-20. The user will click the desired type and proceed

The University of Lahore, Chenab Campus Page 26


The Application will sort out data according to
FR8: the selected entity.

3.1.1.6 Venue Selection


A pre-dominant feature of this Application is to select the Venue of cricket Match. By
tapping Venue, the user will be provided with options of list of countries. The user will
click the desired country and proceed
The Application will sort out data according to
FR9: the selected entity.

3.1.1.7 Opponent Selection


A pre-dominant feature of this Application is to select the Opponent for cricket Match.
By tapping Select Opponent, the user will be provided with options of list of countries.
The user will click the desired country and proceed
The Application will sort out data according to
FR10: the selected entity.

3.1.1.8 Pitch Condition Selection


A pre-dominant feature of this Application is to select the Opponent for cricket Match.
By tapping Select Opponent, the user will be provided with options of list of countries.
The user will click the desired country and proceed
The Application will sort out data according to
FR11: the selected entity.

3.1.1.9 Player Selection


Here, at this point of Application when we got a list of users that we eventually fetched
out after providing multiple Filters of Match type, Venue, Opponent and Pitch condition.

The University of Lahore, Chenab Campus Page 27


If user want to view the detailed information of any player he just simply have to tap the
player and his history will be displayed including multiple information about him.
The Application will display the data and
FR12: information of respective player.

3.1.1.10 Player History


Here, at this point of Application when we got a list of users that we eventually fetched
out after providing multiple Filters of Match type, Venue, Opponent and Pitch condition.
If user want to view the detailed information of any player he just simply have to tap the
player and his history will be displayed including multiple information about him. Player
history contains detailed data and statistics about the player.
The Application will display the data and
FR13:
information of respective player which user can
view

3.1.2 Non Functional Requirements:


 Efficiency
The Application should be efficient to provide the requested result and
prohibit the user form disappointment.
 Reliability
The Application should be reliable to provide feature and functionality for
what it is being developed.
 Maintainability
The system should be kept flexible to accept the contemporary changes
 Portability
The Application should work correctly and efficiently on different systems.
 Correctness
The Application must perform correct action related to its functions
 Usability issues
The product must provide the easy access and must be easy to deal with

The University of Lahore, Chenab Campus Page 28


 Understandability issues
The product should be easy to understand
 Operational issues
The system will have server for the database and connection to the main
database.
 Correctness
The Application must perform correct action related to its functions

 Operability
The whole installation should be in a safe and reliable functioning condition,
according to pre-defined operational requirements

3.2 Data Collection


Data was web scrapped from www.cricinfo.com. This source contained match
information such as date, teams (countries), ground, result, day and night match or not,
team batting first, etc.
However, it must be noted that a common problem faced while scrapping large amount of
data from web, is with Timeouts. The same problem was faced with and overcome by
making the system sleep for few seconds after collecting data for each year.

3.3 Learning Algorithm


For generating the prediction application, we used supervised machine learning
algorithm. In Supervised learning algorithm, each training tuple is labeled with the class
to which it belongs. We used naive bayes for our experiments. This algorithm is
explained in brief.

3.3.1 Naive Bayes


Bayesian classifiers are statistical classifiers that predict the probability with which a
given tuple belongs to a particular. Naive Bayes classifier assumes that each attribute has
its own individual effect on the class label, independent of the values of other attributes.

The University of Lahore, Chenab Campus Page 29


This is called class-conditional independence. Bayesian classifiers are based on Bayes’
theorem.
Bayes Theorem:
Let X be a data tuple and C be a class label. Let X belongs to class C, then

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 Player Statistics


Players’ performance is measured in terms of several measures.

3.4.1 Batting Measures


Innings:
The number of innings in which the batsman has batted till the day of the match. This
attribute measures the experience of the batsman. The more innings the batsman has played,
the more experienced the player is.
Batting Average:
Batting average commonly referred to as average is the average number of runs scored per
innings. This attribute indicates the run scoring capability of the player.

𝐴𝑣𝑒𝑟𝑎𝑔𝑒= 𝑅𝑢𝑛𝑠 𝑆𝑐𝑜𝑟𝑒𝑑/𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐼𝑛𝑛𝑖𝑛𝑔𝑠 𝑃𝑙𝑎𝑦𝑒𝑑


Strike Rate (SR):

The University of Lahore, Chenab Campus Page 30


Strike rate is the average number of runs scored per 100 balls faced. In limited overs
cricket, it is important to score runs at a fast pace. More runs scored at a slow pace is
rather harmful to the team as they have a limited number of overs. This attribute indicates
how quickly the batsman can score runs.
𝑆𝑡𝑟𝑖𝑘𝑒 𝑅𝑎𝑡𝑒= 𝑅𝑢𝑛𝑠 𝑆𝑐𝑜𝑟𝑒𝑑/𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐵𝑎𝑙𝑙𝑠 𝐹𝑎𝑐𝑒𝑑 × 100
Centuries:
Number of innings in which the batsman scored more than 100 runs. This attribute
indicates the capability of the player to play longer innings and score more runs.
Zeros:
Number of innings in which the batsman was dismissed without scoring a single run.
Fifties:
Number of innings in which the batsman scored more than 50 runs (but less than 100).
This attribute indicates the capability of the player to play longer innings and score more
runs.
Highest Score (HS):
The highest runs scored by a batsman in any (single) innings throughout his career. This
attribute is used in the formula for calculating the venue attribute. This attribute shows
the run scoring capability of the batsman at the venue. If a player has s very high score at
a venue in past, he is more likely to score more runs at that venue.

3.4.2 Bowling Measures


Innings:
The number of innings in which the bowler bowled at least one ball. It represents the
bowling experience of a player. The more innings the player has played, the more
experienced the player is.
Overs:
The number of overs bowled by a bowler. This attribute also indicates the experience of
the bowler. The more overs the bowler has bowled, the more experienced the bowler is.
Bowling Average:
Bowling average is the number of runs conceded by a bowler per wicket taken. This
attribute indicates the capabilities of the bowler to restrict the batsmen from scoring runs

The University of Lahore, Chenab Campus Page 31


and taking wickets at the same time. Lower values of bowling average indicate more
capabilities.
Bowling Average= Number of Runs Conceded/Number of Wickets Taken

Bowling Strike Rate:


Bowling strike rate is the number of balls bowled per wicket taken. This attribute
indicates the wicket taking capability of the bowler. Lower values mean that the bowler is
capable of taking wickets quickly.
Strike Rate= Number of Balls Bowled/Number of Wickets Taken
Four/Five Wicket Haul:
Number of innings in which the bowler has taken more than four wickets. This attribute
indicates the capability.
As we saw, different measures highlight different aspects of a player’s abilities and
hence some measures have more importance than others, e.g. batting average is an
important factor for all the formats of the game as it reflects the run scoring abilities of
a batsman in general. Similarly, strike rate would be an important factor for limited
over matches as it is important to score more runs in limited overs.

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.

The University of Lahore, Chenab Campus Page 32


CHAPTER 4
Design

The University of Lahore, Chenab Campus Page 33


CHAPTER-4

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

Use case Register


Actors User
Description
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,

The University of Lahore, Chenab Campus Page 34


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.
Pre-Condition
User must enter his credentials.
Post Condition
User record will be successfully stored in the Database.

Actor Action System Response


The user should The Software will display a splash screen
start the following by an IDE which occupy
application by multiple fields to be filled in. Also these
Clicking the Icon fields needs to be filled with accuracy and
of the Application. here the user will set his login id and
password for login anytime
User will input his The Software will store his name in
Name/Surname Database
User will input his The Software will store his email in
Email id Database
User will input his The Software will store his Address in
Address Database
User will input his The Software will store his Password in
Password Database
User will Re-enter The Software will authenticate his
his Password Password
User will input his The Software will store his phone number
Phone Number. in Database

User will Press The record will be successfully Stored in


Register Button database
Extensions

The University of Lahore, Chenab Campus Page 35


In case if password is not given correctly or user has not pressed
Register button. His record will went lame.

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.

Actor Action System Response

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

The University of Lahore, Chenab Campus Page 36


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.
Pre-Condition
The User will give his feed back

Post Condition
The Software will store feedback in Database

Actor Action System Response


User will tap the The application will generate a pop-up
hamburger icon on with the options of Feedback as well as
welcome screen Rating.
User will tap Feedback The feedback will be given and stored
option automatically.

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

Actor Action System Response

The University of Lahore, Chenab Campus Page 37


User will tap the The application will generate a pop-up
hamburger icon on with the options of Feedback as well as
welcome screen Rating
User will tap Rating The Rating will be given and stored
option automatically.

4.1.5 Match Type Selection


Use case Match type selection
Actors User
Description
A pre-dominant feature of this Application is to select the Category of cricket Match. By
tapping Match Type the user will be provided with three options i.e. ODI, Test Match and
T-20. The user will click the desired type and proceed
Pre-Condition
User will select the desired Match Type.
Post Condition
The List of Players with be in Accordance with Selected Match Type.

Actor Action System Response


The use will click The Application will provide a scroll down of
on Match type. Type of Matches

The User will The List of Players will be in accordance with


Select a Match selected Match Types.
Type

4.1.6 Venue Selection


Use case Venue Selection
Actors User
Description
A pre-dominant feature of this Application is to select the Venue of cricket Match. By
tapping Venue, the user will be provided with options of list of countries. The user will

The University of Lahore, Chenab Campus Page 38


click the desired country and proceed
Pre-Condition
User will select the desired venue.
Post Condition
The List of Players with be in Accordance with Selected venue.

Actor Action System Response


The use will click The Application will provide a scroll down of List
on Select Venue. of countries

The User will The List of Players will be in accordance with


Select a country selected country.

4.1.7 Opponent Selection


Use case Opponent Selection
Actors User
Description
A pre-dominant feature of this Application is to select the Opponent for cricket Match.
By tapping Select Opponent, the user will be provided with options of list of countries.
The user will click the desired country and proceed
Pre-Condition
User will select the desired opponent.
Post Condition
The List of Players with be in Accordance with Selected venue.

Actor Action System Response


The use will click The Application will provide a scroll down of List
on Select opponent. of countries.

The User will The List of Players will be in accordance with


Select a country selected country.

The University of Lahore, Chenab Campus Page 39


4.1.8 Pitch Condition Selection
Use case Pitch Condition Selection
Actors User
Description
A pre-dominant feature of this Application is to select the Opponent for cricket Match.
By tapping Select Opponent, the user will be provided with options of list of countries.
The user will click the desired country and proceed
Pre-Condition
User will select the desired opponent.
Post Condition
The List of Players with be in Accordance with Selected venue.

Actor Action System Response


The use will click The Application will provide a scroll down of List
on Select opponent. of countries.

The User will The List of Players will be in accordance with


Select a country selected country.

4.1.9 Player Selection


Use case Player Selection
Actors User
Description
Here, at this point of Application when we got a list of users that we eventually fetched
out after providing multiple Filters of Match type, Venue, Opponent and Pitch condition.
If user want to view the detailed information of any player he just simply have to tap the
player and his history will be displayed including multiple information about him.
Pre-Condition
User will select the Player.
Post Condition
The history of relevant player will be flashed.

The University of Lahore, Chenab Campus Page 40


Actor Action System Response
The use will click The Application will provide the history and
on the Player. information about the player.

4.1.10 Player History


Use case Player history
Actors User
Description
Here, at this point of Application when we got a list of users that we eventually fetched
out after providing multiple Filters of Match type, Venue, Opponent and Pitch condition.
If user want to view the detailed information of any player he just simply have to tap the
player and his history will be displayed including multiple information about him. Player
history contains detailed data and statistics about the player.
Pre-Condition
The history of relevant player will be flashed.
Post Condition
The user can view the history

Actor Action System Response


The use will click The Application will provide the history and
on the Player. information about the player.

The user can view the data and statistics of the player.

The University of Lahore, Chenab Campus Page 41


4.2 Use Case

The University of Lahore, Chenab Campus Page 42


4.3Class Diagram

The University of Lahore, Chenab Campus Page 43


4.3Activity Diagram

The University of Lahore, Chenab Campus Page 44


4.4 Architecture Diagram

The University of Lahore, Chenab Campus Page 45


CHAPTER 5
Modules

The University of Lahore, Chenab Campus Page 46


CHAPTER-5

Modules
5 Application Modules

There are following modules of the application

5.1 Library Files

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.

The University of Lahore, Chenab Campus Page 47


5.2 Android SDK
This picture shows that which of specified sdk version we are using. We are currently
using Oreo and Nougat to run android virtual device.

5.3Virtual Devices

The University of Lahore, Chenab Campus Page 48


The picture shows that which of virtual device we are using to display our project. There
can be many virtual devices and there is option to select virtual device and download that.
After download you can use it easily.

5.4Splash Screen

When the user open the project a screen is shown which is as follow:

The University of Lahore, Chenab Campus Page 49


5.5 Login page
After splash screen the login page is open if the user register already he/she simply enter
required Info and login, if not then the user first register by clicking text view (if new one
Register here…!)

5.6 Signup page

If the user new one then he/she firstly register here.

The University of Lahore, Chenab Campus Page 50


5.7 Welcome Page

This is the welcome page of the application if the user click on the generate team button
the next activity is open up.

5.8 Input Section

The University of Lahore, Chenab Campus Page 51


In this screen the user selects the Match type which is ODI, Test match and T-20, Select
user selects the venue where the match takes place, select the opponent team and click
next.

5.9 Generate Team

When the user click on the next button the team is generate according to the format.

5.10 Player’s Information

This activity shows the information about the player e.g: Name, age, carrier status etc

The University of Lahore, Chenab Campus Page 52


5.11Rate Us

In this activity the user can rate the application performance.

5.12 Feedback

The user also gives feedback about the application.

The University of Lahore, Chenab Campus Page 53


5.13 Admin Panel

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.

The University of Lahore, Chenab Campus Page 54


CHAPTER 6
Testing

The University of Lahore, Chenab Campus Page 55


CHAPTER-6

Testing
6.1Testing

Software testing is an investigation conducted to provide stakeholders with information


about the quality of the product or service under test. Software testing also provides an
objective, independent view of the software to allow the business to appreciate and
understand the risks of software implementation. Test techniques include, but are not
limited to, the process of executing a program or application with the intent of finding
software bugs.
Software testing can also be stated as the process of validating and verifying that a
software program/application/product:
 Meets the business and technical requirements that guided its design and
development.

 Works as expected

 Can be implemented with the same characteristics.

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.

The University of Lahore, Chenab Campus Page 56


6.1.1 Test Case 1

New Account Creation


Test Engineer: Zainab Arshad
Test Case ID: TC1
Date: 01-08-18
Purpose: Any user/ guest who is not register can sign up to take advantages of
our application
Pre-Req: Working internet
Test Data: Tester will enter data on registration form
Steps:

1. Enter Required Information


2. Press Create New Account Button
3. Update Database
4. Verify if user already registered
5. Database Updated
6. Database Updated Successfully

Status: Pass

6.1.2 Test Case2

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

The University of Lahore, Chenab Campus Page 57


6.1.3 Test case3

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

6.1.4 Test case4

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

The University of Lahore, Chenab Campus Page 58


6.1.5 Test case5

Auto Team Selector


Test Engineer: Tayyba Maryam
Test Case ID: TC5
Date: 27-08-18
Purpose: User check the generate team and also check the players individual
details
Pre-Req: Working internet
Test Data: Tester check the players
Steps: 1. After click the next button the user move to the next activity
where the team generate
2. User check the players detail also by on single touch
3. User check the best team according to the format(ODI, T20,
TEST)

Status: Pass

The University of Lahore, Chenab Campus Page 59


CHAPTER 7
Conclusions and Further Work

The University of Lahore, Chenab Campus Page 60


CHAPTER-7

Conclusions and Further Work

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.

7.2 Future Work


To put it in a nutshell, in future we will add new features like live cricket scoring and
cricketer news etc.

The University of Lahore, Chenab Campus Page 61


CHAPTER 8
Bibliography / References

The University of Lahore, Chenab Campus Page 62


CHAPTER-8

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-

The University of Lahore, Chenab Campus Page 63


The University of Lahore, Chenab Campus Page 64

Potrebbero piacerti anche