Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

New Content

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

1. INTRODUCTION

1
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

1. INTRODUCTION

In the country of London, growth is hindered with the increasing crime rates and affects the
nation as whole. Foreign investments as well as the international image of a country over the
entire globe are at stake due to the continuous development in the crime behavior. Therefore,
there is a need to analyze and monitor the crimes happening across the country and also to
regulate them. Analytics of crime databases existing in past may be used to carry out the analysis
of the crime and essential actions should be suggested and evaluated based on the analysis. This
task of regulating crime is completely the responsibility of government.

Data Science is the field, where the data is dealt with in order to derive valuable information,
insights, which could help solve some problems. It brings together various skills - statistics,
programming, mathematics, problem solving techniques to avail a unique point of view to look
at things, to find the patterns which are not easy to find, especially while working with large
datasets. Data Science is applicable in every field, from a web search engine, to the field of
mining. Smart cities have found a ton of applications of data science-safety, networking, city
administration, etc. All this is made possible, because our modern technology provides us ways
to collect and store data from various sources. This data is the key to finding solutions to the
various problems.

Thought crime analysis is being carried out for centuries, in different types - crime mapping,
criminal analysis, police planning, operation analysis, etc. The availability of data was never the
same. And with the changing ways of crime, which now involve more risk and more damage to
thief and property of the civilians, a different approach is needed to study these crimes and find
some information which could help to control them. The purpose of this project is to define the
merits of the data science and explain how the information can mined from a very large dataset.
In open crime dataset for the city of London is used where they carry out some analysis on this
data and explain the process of data analytics.

2
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

BIG DATA:
Big data is a propelling term that depicts any voluminous measure of sorted out, semi-
composed and unstructured data that can be burrowed for information. Though huge data doesn't
suggest a specific sum, the term is much of the time used when discussing Petabytes and
Exabyte's of data.
Big data is a term for informational collections that are so extensive or complex that
customary information handling application programming is lacking to manage them. Gigantic
data is used to depict a tremendous volume of data that is expansive to the point that it's difficult
to process. The data is excessively colossal that outperforms current getting ready cutoff.
Gigantic Data is an articulation used to mean an enormous volume of both sorted out and
unstructured data that is so sweeping it is difficult to process using traditional database and
programming frameworks. In most undertaking situations the volume of information is too
enormous or it moves too quickly or it surpasses current handling limit. Huge Data can possibly
enable organizations to enhance operations and make speedier, keener choices. This information,
when caught, organized, controlled, put away, and investigated can enable an organization to
increase helpful understanding to expand incomes, to get or hold clients, and enhance operations.

3
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

2. LITERATURE SURVEY

4
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

2. LITERATURE SURVEY

Various researchers have addressed the problems regarding crime control and have
proposed different crime-prediction algorithms. The accuracy of prediction depends on the
attributes selected and the dataset used as a reference.

A. Bogomolov et al.(2014) In , human behavioral data derived from mobile network activity
combined with demographic information using real crime data were used to predict crime
hotspots in London, UK. R. Iqbal (2013)In, a comparison between two classification
algorithms, Decision Tree and Naïve Bayesian, was performed using WEKA, an open-source
data mining software, and 10-fold cross-validation. The socio-economic, law-enforcement,
and crime datasets for this study were compiled from the 1990 US Census, the 1990 US
LEMAS survey, and the 1995 FBI UCR, respectively. Three different classification
algorithms, Bayes and Naïve Bayes were used on a dataset of 18,288 accidents.

A major challenge regarding crime prediction is analyzing large crime datasets accurately
and efficiently. Data mining is utilized to find hidden patterns in large crime datasets quickly
and efficiently. The increased efficiency and reduced errors in crime data-mining techniques
increase the accuracy of crime prediction. Most research in crime prediction is focused on
identifying crime hotspots, which refers to the areas in which the crime rates are above the
average level. Authors provided a comparative analysis of Naive Bayes Algorithm and Bayes
algorithms for creating hotspot maps and proposed area-specific predictive models using sparse
data. N. Mahmud et al. (2016) in a crime incidence-scanning algorithm was applied to train
Artificial Neural Network (ANN) enhanced by the Gamma test to predict the crime hotspots in
Bangladesh. Y. L. Lin et al. (2017) a data-driven machine-learning algorithm based on broken-
window theory, spatial analysis, and visualization techniques was used in to analyze drug-
related crime data in Taiwan and predict emerging hotspots.

In , authors applied reverse-geocoding technique and a density-based clustering algorithm to


build a machine-learning model for crime prediction using Open Street Map (OSM) and
geospatial data for different categories of crime in the province of Nova Scotia (NS), Canada. A
feature-level data-fusion method based on a Deep Neural Network (DNN) trained by spatial-,
temporal-, environmental-, and joint-feature representation layers for predicting crimes in the

5
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

City of Chicago was proposed in H. W. Kang et al.(2017). Several crime-prediction methods


were reviewed in V. Grover et al. (2007), and Knowledge Discovery in Databases (KDD)
techniques, which combine statistical modelling, machine learning, database storage, and AI
technologies, was suggested as an effective tool for crime prediction. In X. Zhao et al. (2017), a
transfer-learning framework that captures temporal-spatial patterns was proposed for
leveraging cross- domain urban datasets, meteorological data, points of interests, human
mobility data, and complaint data. A fully-probabilistic algorithm based on Bayesian approach
was applied in R. Marchant et al. (2018) to model the dependency between the offence data
and environmental factors such as the demographic characteristics and the spatial location in the
state of New South Wales (NSW), Australia. WEKA was used in L. McClendon et al. (2015) to
conduct a comparative study for measuring the accuracy and effectiveness of linear regression,
additive regression, and decision stump algorithms for predicting the crime in the state of
Mississippi. In S. Prabakaran et al. (2018), authors presented a survey paper on crime data
mining reviewing ANN, decision tree, rule induction, nearest-neighbor method, and genetic
algorithm.

An approach based on Auto-Regressive Integrated Moving Average model (ARIMA) was


utilized in E. Cesario et al. (2016) to design a reliable predictive model for forecasting crime
trends in urban areas. In M. A. Tayebi et al. (2015), authors proposed a probabilistic model of
spatial behavior for known offenders based on a random-walk-based approach to model
offender activity in the Metro Vancouver area. The random forest algorithm was used in L. G.
A. Alves et al. (2018), to quantify the role of urban indicators for crime prediction in Brazil. In
N. Baloian et al. (2017), prospective method, Dempster-Shafer theory of evidence, and the
multi-kernel method were used to develop a crime- prediction solution for Chilean large cities.
In M. V. Barnadas et al. (2016), three algorithms, KNN, Parzen windows, and Neural Networks,
were developed, tested, and compared for predicting the crimes in the city of San Francisco. In
E. Budur et al. (2015), Gradient Boosting Machine (GBM) technique was applied in a machine-
learning prediction model to find hidden links in criminal networks and the weighted page-rank
method was used as an effective strategy to weaken and destroy such networks.

Based on the literature, in this project, the Bayes algorithm and Navie Bayes algorithm
were used to analyze the London crime dataset.

6
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

3. SYSTEM ANALYSIS

7
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

3. SYSTEM ANALYSIS

3.1. EXISTING SYSTEM

The existing system uses a query based approach for analysing the data. This analysis provides
lot of computational challenges for analysing the data without distributed mechanism. The data
analysis is performed on a simple server environment without parallel processing.
Disadvantages of Existing System:
● When data sizes increases, computational process becomes a challenging thing.
● No perfect visualisation.
● Parallel processing is not possible in clustering Analysis
● Mining techniques does not work well with the big data in analysis when we occurred
with multiple column analysis.

3.2 PROPOSED SYSTEM:


We are analyzing a Data set by using a object based approach with in the Python
programming Language. Python programming Language provides libraries which also focus on
the implementation of data analysis and in representing the data in different visualizations.
Advantages:
● Use statistical analysis with sampling data in the analysis.
● Considering the data visualization which is not done in the bigdata analysis.
● No maximum skill is required by the analyzers’ to perform the analysis.
● Python has good graphical libraries.
● The output is more effective using graphical libraries in Python.

8
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

4. REQUIREMENTS ANALYSIS

9
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

4.REQUIREMENTS ANALYSIS

4.1 SOFTWARE REQUIREMENT SPECIFICATION:


The reason for this SRS record is to distinguish the necessities and functionalities for
Intelligent Network Backup Tool. The SRS will characterize how our group and the customer
consider the last item and the attributes or usefulness it must have. This record additionally
makes a note of the discretionary prerequisites which we intend to execute yet are not required
for the working of the venture.
This stage assesses the required necessities for the Images Processing for an orderly method
for assessing the prerequisites a few procedures are included. The initial step associated with
dissecting the prerequisites of the framework is perceiving the idea of framework for a solid
examination and all the case are defined to better comprehend the investigation of the dataset.

Intended Audience and Reading Suggestions


This record is proposed for extend engineers, directors, clients, analyzers and
documentation journalists. This report goes for examining plan and execution imperatives,
conditions, framework highlights, outside interface prerequisites and other non utilitarian
necessities.

Identification of Needs
The first and imperative need for a business firm or an association is to know how they
are performing in the market and parallelly they have to know how to conquer their rivals in the
market.
To do as such we have to investigation our information in view of all the accessible variables
4.1.1 FEASIBILITY STUDY
A credibility contemplate expects to fair-mindedly and soundly uncover the qualities and
inadequacies of a present business or proposed meander, openings and threats present in nature,
the benefits required to bring through, and in the long run the prospects for advance. In its most
clear terms, the two criteria to judge believability are incurred significant injury required and
motivator to the fulfilled.

10
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

An inside and out arranged feasibility ponder should give a recorded establishment of the
business or wander, a delineation of the thing or organization, accounting explanations, purposes
of enthusiasm of the operations and organization, publicizing examination and game plans,
budgetary data, authentic necessities and cost duties. All things considered, plausibility looks at
go before specific change and wander utilization. There are three sorts of attainability
• Economical Feasibility
• Technical Feasibility
• Operational Feasibility
Economical feasibility
The electronic structure manages the present existing system's data stream and technique
absolutely and should make each one of the reports of the manual structure other than a
substantial gathering of the other organization reports. It should be filled in as an electronic
application with specific web server and database server. Advance a segment of the associated
trades happen in different ranges. Open source programming like TOMCAT, JAVA, MySQL
and Linux is used to restrict the cost for the Customer. No extraordinary wander need to manage
the instrument.
Technical feasibility
Surveying the particular probability is the trickiest bit of a believability consider. This is
in light of the fact that, starting at the present moment, not a lot of point by point layout of the
system, making it difficult to get to issues like execution, costs on (by excellence of the kind of
development to be passed on) et cetera.
Different issues must be considered while doing a particular examination. Grasp the
differing progressions required in the proposed system. Before starting the wander, we should be
clear about what are the advances that are to be required for the change of the new system.
Check whether the affiliation by and by has the required advancements. Is the required
development open with the affiliation?
In case so is the utmost sufficient?
For instance – "Will the present printer have the ability to manage the new reports and structures
required for the new system?"

11
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

Operational feasibility
Proposed wanders are profitable just if they can be changed into information systems that
will meet the affiliations working necessities. Simply communicated, this trial of probability asks
with reference to whether the structure will work when it is made and presented. Are there
genuine obstacles to Implementation? Here are questions that will help test the operational
achievability of a wander.
• Is there sufficient help for the wander from organization from customers? In case the
present structure is particularly cherished and used to the extent that individuals won't
have the ability to see purposes behind change, there may be resistance.
• Are the present business methodologies qualified to the customer? If they are not, Users
may welcome a change that will accomplish a more operational and supportive systems.
• Have the customer been locked in with the orchestrating and change of the wander? Early
commitment decreases the chances of impenetrability to the structure.

4.2.About Python:
Python is a programming language, which means it’a a language both people and
computers can understand. Python was developed by a Dutch software engineer named Guido
van Rossum, who created the language to solve some problems he saw in computer languages of
the time.
Python is an interpreted high-level programming language for general-purpose programming.
Created by Guido van Rossum and first released in 1991, Python has a design philosophy that
emphasizes code readability, and a syntax that allows programmers to express concepts in fewer
lines of code, notably using significant whitespace. It provides constructs that enable clear
programming on both small and large scales.
Python features a dynamic type system and automatic memory management. It supports multiple
programming paradigms, including object-oriented, imperative, functional and procedural, and
has a large and comprehensive standard library

12
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

You Can Use Python for Pretty Much Anything


One significant advantage of learning Python is that it’s a general-purpose language that can be
applied in a large variety of projects. Below are just some of the most common fields where
Python has found its use:
• Data science

• Scientific and mathematical computing

• Web development

• Computer graphics

• Basic game development

Python Is Widely Used in Data Science

● Python’s ecosystem is growing over the years and it’s more and more capable of the
statistical analysis.It’s the best compromise between scale and sophistication (in terms od
data processing).
● Python emphasizes productivity and readability.
● Python is used by programmers that want to delve into data analysis or apply statistical
techniques (and by devs that turn to data science)
● There are plenty of Python scientific packages for data visualization, machine learning,
natural language processing, complex data analysis and more. All of these factors make
Python a great tool for scientific computing and a solid alternative for commercial
packages such as MatLab. The most popular libraries and tools for data science are:
Pandas:
A library for data manipulation and analysis. The library provides data structures and operations
for manipulating numerical tables and time series.
NumPy:
The fundamental package for scientific computing with Python, adding support for large, multi-
dimensional arrays and matrices, along with a large library of high-level mathematical functions
to operate on these arrays.

13
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

SciPy:
A library used by scientists, analysts, and engineers doing scientific computing and technical
computing.
Being a free, cross-platform, general-purpose and high-level programming language, Python has
been widely adopted by the scientific community. Scientists value Python for its precise and
efficient syntax, relatively flat learning curve and the fact that it integrates well with other
languages (e.g. C/C++).
As a result of this popularity there are plenty of Python scientific packages for data visualization,
machine learning, natural language processing, complex data analysis and more. All of these
factors make Python a great tool for scientific computing and a solid alternative for commercial
packages such as MatLab.

4.3 SOFTWARE REQUIREMENTS


Operating System : Windows 10
Language : Python 3.5

4.4 HARDWARE REQUIREMENTS


Processor : Intel(R) Core(TM)
RAM : 6 GB RAM
Hard Disk : 300 GB
Keyboard :Logitech
Mouse :Optical

14
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5. SYSTEM DESIGN

15
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5. SYSTEM DESIGN

The System Design Document describes the system requirements, operating


environment, system and subsystem architecture, files and database design, input formats, output
layouts, human-machine interfaces, detailed design, processing logic, and external interfaces.
This section describes the system in narrative form using non-technical terms. It should
provide a high-level system architecture diagram showing a subsystem breakout of the system, if
applicable. The high-level system architecture or subsystem diagrams should, if applicable,
show interfaces to external systems. Supply a high-level context diagram for the system and
subsystems, if applicable. Refer to the requirements trace ability matrix (RTM) in the Functional
Requirements Document (FRD), to identify the allocation of the functional requirements into this
design document.
This section describes any constraints in the system design (reference any trade-off
analyses conducted such, as resource use versus productivity, or conflicts with other systems)
and includes any assumptions made by the project team in developing the system design.
The organization code and title of the key points of contact (and alternates if appropriate) for the
information system development effort. These points of contact should include the Project
Manager, System Proponent, User Organization, Quality Assurance (QA) Manager, Security
Manager, and Configuration Manager, as appropriate.

16
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.1 SYSTEM ARCHITECTURE

Figure 5.1 System architecture

The System architecture consists of three main layers such as User interface layer,
Service Layer, and Data Access Layer respectively. The User interface layer has three
tools which are classified as Visualization, Editing and Scripting. Service layer has three
functions classified as Plot generator, Edit functions, Script recorder. Data Access Layer
two databases such as ODM and ODM Tools Temp which are having database software
such as SQLite, SQL Server and MySQL.

17
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2 UML DIAGRAMS

UML (Unified Modeling Language) is a standard vernacular for choosing, envisioning, making,
and specifying the collectibles of programming structures. UML is a pictorial vernacular used to
make programming blue prints. It is in like way used to exhibit non programming structures
similarly like process stream in a gathering unit and so forth.
UML is not a programming vernacular yet rather instruments can be utilized to make code in
different tongues utilizing UML graphs. UML has an incite relationship with question composed
examination and outline. UML expect a fundamental part in portraying trade viewpoints of a
structure.

18
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2.1 Use case Diagram:


The use case graph is for demonstrating the direct of the structure

Figure: 5.2.1 Use Case Diagram

19
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2.2 Class Diagram:


The class graph is the most normally pulled in layout UML. It addresses the static course of
action perspective of the structure. It solidifies the strategy of classes, interfaces, joint attempts
and their affiliations.

Figure: 5.2.2 Class Diagram

In the above class diagram, the relationship that is the dependence between each one of the
classes is sketched out. Additionally, even the operations performed in each and every class is
similarly appeared.

20
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2.3 Sequence Diagram:


This is a cooperation design which tends to the time requesting of messages. It includes set of
parts and the messages sent and gotten by the instance of parts. This chart is utilized to address
the dynamic perspective of the structure.

Figure: 5.2.3 Sequence Diagram


A succession outline indicates question communications masterminded in time arrangement. In
the above graph, there are five articles cooperating with each other. Each protest has a vertical
dashed line which speaks to the presence of a question over some undefined time frame. This
graph has additionally a tall, thin rectangle which is called center of cont

21
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2.4 Collaboration Diagram:


This is a support format, which tends to the principal relationship of articles that send and
get messages. It incorporates set of parts, connectors that interface the parts and the messages
sent and get by those parts. This graph is utilized to address the dynamic perspective of the
framework.

Figure: 5.2.4 Collaboration Diagram

The joint effort outline contains articles, way and arrangement number. In the above graph, there
are five questions specifically customer, client, framework, Python and server. These items are
connected to each other utilizing a way. A succession number show the time request of a
message.

22
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2.5 State Chart Diagram:


The state graph contains the game-plan of states, occasions and exercises. This graph is
noteworthy for tending to the lead of the interface, class and made an effort. The key
centralization of state outline is to show the occasion sort out lead of the request. The state
follows diagram the dynamic perspective of the framework.

Figure: 5.2.5 State Chart Diagram

23
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2.6 Component Diagram:


The imperative portion of part format is segment. This diagram demonstrates within parts,
connectors and ports that understand the piece. Precisely when section is instantiated, duplicates
of inside parts are besides instantiated.
The information is sent to the Python where scoop is utilized for information cleaning and
the reports are produced utilizing hive’s utilizing a rectangle with adjusted corners. Change is a
strong bolt speaks to the way between various conditions of a question. Name the change with
the occasion that activated it and the activity those outcomes from it.

Figure 5.2.6 Component Diagram

24
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.2.7 Deployment Diagram:


The fundamental fragment in game-plan layout is a middle point. The strategy of focus
focuses and their relationship with other is tended to utilizing sending plot. The sending outline
is identified with the area diagram, that is one focus purpose obviously of activity format
frequently includes no short of what one sections. This outline is in like way critical for tending
to the static perspective of the framework.

Figure: 5.2.7 Deployment Diagram

25
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

5.3 DATA FLOW DIAGRAMS


An information stream design (DFD) is a graphical portrayal of the "stream" of
information through a data framework, demonstrating its strategy edges. A DFD is a significant
part of the time utilized as a preparatory stroll to make an overview of the framework, which can
later be cleared up. DFDs can in like way be utilized for the depiction of information prepare. A
DFD indicates what sort of data will be sense of duty regarding and yield from the structure,
where the information will begin from and go to, and where the information will be secured. It
doesn't demonstrate data about the organizing of process or data about whether strategy will
work in game-plan or in parallel.

DFD Symbols:
In the DFD, there are many symbols such as
● A square defines a source or destination of system data.
● An arrow identifies data flow. It is the pipeline through which the information flows.
● A circle represents a process that transforms incoming data flow into outgoing data flow.

Level 0: System input/ output level


A level 0 DFD describes the system wide boundaries, dealing input to and output flow from the
system and major processes.

Figure.5.3.1 Level 0 DFD

26
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

DFD Level 0 is in like way called a Context Diagram. It's a urgent review of the entire
structure or process being bankrupt down or appeared. It's required to be an at first watch,
demonstrating the framework as a particular surprising state handle, with its relationship to
outside substances.

Level 1: Sub system level data flow


Level 1 DFD delineates the accompanying level of purposes of enthusiasm with the data
stream between subsystems. The Level 1 DFD exhibits how the system is secluded into sub-
structures (shapes), each of which oversees no less than one of the data streams to or from an
outside pro, and which together give most of the helpfulness of the system as a rule.

Figure 5.3.2 Level 1 DFD

Level 2: File level detail data flow


Plausibility and danger examination are connected here from various perspectives. The level 2
DFD elucidates the fundamental level of understanding about the system's working.

Figure 5.3.3 Level 2 DFD

27
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

Level 3:

Figure 5.3.4 Level 3 DFD

28
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

6. MODULES

29
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

6. MODULES

6.1 Import Data

Importing is bringing a filename London outcomes.csv which includes the


following 10 fields and 10415160 records into a program. It could be opening a file or
adding to a database.

S.No Field Name Data Type

1 Crime_Id Object

2 Month Object

3 Reported By Object

4 Falls within Object

5 Longitude Float

6 Latitude Float

7 Location Object

8 LSQA Code Object

9 LSQA Name Object

10 Outcome Type Object


6.1 London Outcomes of Crime Data

6.2 Data Processing

It is the conversion of data into usable and desired form. The first step towards analysis is pre-
processing. If the data is dirty, it will generate incorrect visualizations, hence leading towards the
incorrect conclusions. The crime data collected also has some level of dirtiness. It contains some
null values, inconsistent date formats, and some outliers. Using python an exploratory analysis is

30
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

carried out to identify this dirtiness in the data. Then, by using some data cleaning procedures, a
well formatted and clean dataset is obtained which will be used to carry out the analysis.

6.3 Results Evaluation

Evaluation is the process of determining the extent to which the objectives are achieved. The
number of crimes for six months in a year is analyzed. When visualization is plotted for the
same against the various outcomes and types of crimes in the city of London, Though it might
seem to be a very basic information, something like an basic knowledge to a mind, but it can be
used to draw more concrete patterns in the crimes.

31
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

7. SYSTEM TESTS

32
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

7. SYSTEM TESTS

7.1 INTRODUCTION TO TESTING


Testing is a procedure, which uncovers blunders in the program. Programming testing is
a basic component of programming quality affirmation and speaks to a definitive audit of
determination, outline and coding. The expanding perceivability of programming as a framework
component and chaperon costs related with a product disappointment are propelling variables for
we arranged, through testing. Testing is the way toward executing a program with the plan of
finding a mistake. The plan of tests for programming and other built items can be as trying as the
underlying outline of the item itself It is the significant quality measure utilized amid
programming improvement. Amid testing, the program is executed with an arrangement of
experiments and the yield of the program for the experiments is assessed to decide whether the
program is executing as it is relied upon to perform.

7.2 TESTING STRATEGIES


A technique for programming testing coordinates the outline of programming
experiments into an all around arranged arrangement of steps that outcome in fruitful
improvement of the product. The procedure gives a guide that portrays the means to be taken,
when, and how much exertion, time, and assets will be required. The procedure joins test
arranging, experiment configuration, test execution, and test outcome gathering and assessment.
The procedure gives direction to the specialist and an arrangement of points of reference for the
chief. Due to time weights, advance must be quantifiable and issues must surface as ahead of
schedule as would be prudent
Keeping in mind the end goal to ensure that the framework does not have blunders, the
distinctive levels of testing techniques that are connected at varying periods of programming
improvement are:

33
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

Unit Testing:
Unit Testing is done on singular modules as they are finished and turned out to be executable. It
is restricted just to the planner's prerequisites. It centers testing around the capacity or
programming module. It Concentrates on the interior preparing rationale and information
structures. It is rearranged when a module is composed with high union
• Reduces the quantity of experiments
• Allows mistakes to be all the more effectively anticipated and revealed Black Box

7.3 TESTING
It is otherwise called Functional testing. A product testing strategy whereby the inward
workings of the thing being tried are not known by the analyzer. For instance, in a discovery test
on a product outline the analyzer just knows the information sources and what the normal results
ought to be and not how the program touches base at those yields. The analyzer does not ever
inspect the programming code and does not require any further learning of the program other
than its determinations. In this system some experiments are produced as information conditions
that completely execute every single practical prerequisite for the program. This testing has been
utilizations to discover mistakes in the accompanying classifications:
• Incorrect or missing capacities
• Interface blunders
• Errors in information structure or outside database get to
• Performance blunders
• Initialization and end blunders.
In this testing just the yield is checked for rightness.

7.3.1 White Box testing


It is otherwise called Glass box, Structural, Clear box and Open box testing. A product
testing procedure whereby express learning of the inner workings of the thing being tried are
utilized to choose the test information. Not at all like discovery testing, white box testing
utilizes particular learning of programming code to inspect yields. The test is precise just if the
analyzer comprehends what the program should do. He or she would then be able to check

34
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

whether the program veers from its expected objective. White box testing does not represent
blunders caused by oversight, and all obvious code should likewise be discernable. For an entire
programming examination, both white box and discovery tests are required.

In this the experiments are produced on the rationale of every module by drawing stream
diagrams of that module and sensible choices are tried on every one of the cases. It has been
utilizations to produce the experiments in the accompanying cases:

• Guarantee that every single free way have been Executed.

• Execute every single intelligent choice on their actual and false Sides.
7.3.2 Integration Testing
Coordination testing guarantees that product and subsystems cooperate an entirety. It tests
the interface of the considerable number of modules to ensure that the modules carry on
legitimately when coordinated together. It is characterized as a deliberate procedure for
developing the product engineering. In the meantime reconciliation is happening, lead tests to
reveal blunders related with interfaces. Its Objective is to take unit tried modules and assemble a
program structure in view of the recommended outline
Two Approaches of Integration Testing
• Non-incremental Integration Testing
• Incremental Integration Testing

7.3.3 System Testing

Framework testing includes in-house testing of the whole framework before conveyance
to the client. Its point is to fulfill the client the framework meets all necessities of the customer's
determinations. This testing assesses working of framework from client perspective, with the
assistance of particular report. It doesn't require any inward learning of framework like plan or
structure of code.

It contains utilitarian and non-useful zones of utilization/item. Framework Testing is


known as a super arrangement of a wide range of testing as all the significant sorts of testing are

35
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

shrouded in it. In spite of the fact that attention on sorts of testing may differ on the premise of
item, association procedures, course of events and necessities. Framework Testing is the start of
genuine testing where you test an item all in all and not a module/highlight.

7.3.4 Acceptance Testing


Acknowledgment testing, a testing method performed to decide if the product framework
has met the prerequisite particulars. The principle motivation behind this test is to assess the
framework's consistence with the business necessities and check in the event that it is has met the
required criteria for conveyance to end clients. It is a pre-conveyance testing in which whole
framework is tried at customer's site on genuine information to discover blunders. The
acknowledgment test bodies of evidence are executed against the test information or utilizing an
acknowledgment test content and afterward the outcomes are contrasted and the normal ones.
The acknowledgment test exercises are completed in stages. Right off the bat, the
essential tests are executed, and if the test outcomes are palatable then the execution of more
intricate situations are done.

7.4 TEST APPROACH


A Test approach is the test system usage of a venture, characterizes how testing would be
done. The decision of test methodologies or test technique is a standout amongst the most intense
factor in the achievement of the test exertion and the precision of the test designs and gauges.
Testing should be possible in two ways
• Bottom up approach
• Top down approach
7.4.1 Bottom up Approach
Testing can be performed beginning from littlest and most reduced level modules and
continuing each one in turn. In this approach testing is directed from sub module to primary
module, if the fundamental module is not built up a transitory program called DRIVERS is
utilized to recreate the principle module. At the point when base level modules are tried
consideration swings to those on the following level that utilization the lower level ones they are
tried exclusively and afterward connected with the already inspected bring down level modules

36
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

7.4.2 Top down Approach


In this approach testing is directed from fundamental module to sub module. in the event
that the sub module is not built up an impermanent program called STUB is utilized for mimic
the sub module. This sort of testing begins from upper level modules. Since the nitty gritty
exercises more often than not performed in the lower level schedules are not given stubs are
composed. A stub is a module shell called by upper level module and that when achieved
legitimately will restore a message to the calling module demonstrating that appropriate
association happened.
7.5 VALIDATION
The way toward assessing programming amid the improvement procedure or toward the
finish of the advancement procedure to decide if it fulfills determined business prerequisites.
Approval Testing guarantees that the item really addresses the customer's issues. It can likewise
be characterized as to exhibit that the item satisfies its proposed utilize when sent on proper
condition.
The framework has been tried and actualized effectively and along these lines guaranteed
that every one of the prerequisites as recorded in the product necessities determination are totally
satisfied.
7.6 TEST CASES
Experiments include an arrangement of steps, conditions and sources of info that can be
utilized while performing testing undertakings. The principle expectation of this action is to
guarantee whether a product passes or bombs as far as usefulness and different perspectives. The
way toward creating experiments can likewise help discover issues in the prerequisites or plan of
an application. Experiment goes about as the beginning stage for the test execution, and in the
wake of applying an arrangement of information esteems, the application has a conclusive result
and leaves the framework at some end point or otherwise called execution post condition.
Table 7.6 Test Cases

37
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

8. RESULTS

38
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

8. RESULTS

8.1 Crime Dataset in London City

39
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

8.2 Case Outcomes

40
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

8.3 Graph analysis based on year vs. no. of crimes

41
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

8.4 Graph analysis based on type of outcome vs. no. of crime

42
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

9. CONCLUSION AND FUTURE SCOPE

43
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

9. CONCLUSION AND FUTURE SCOPE

Conclusion:
In this project, London crime data for the last 5 years was used in dataset approaches. Machine
Learning predictive models Naive Bayes Algorithm and Bayes Algorithm were used to obtain
crime-prediction accuracy. The accuracy, complexity, and training time of algorithms were
slightly different for different approaches. This work use Naive Bayes Algorithm and Bayes
Algorithm with association rule mining for this purpose. The prediction accuracy can be
improved by tuning both the algorithm and the data for specific applications. The project deals
with the occurrence of crime in a subsequent years and type of outcomes in a crime is likely to
analysis. Since it is considering only some limited factors full accuracy cannot be achieved.
Although this model has low accuracy as a prediction model, it provides a preliminary
framework for further analyses.

Future Enhancement:
Along with the present scope of our project, it can also predict the estimated time for the crime to
take place as a future scope. Along with this, one can try to predict the location of the crime. It
will test the accuracy of frequent-item sets and prediction based on different test sets. So the
system will automatically learn the changing patterns in crime by examining the crime patterns.
Also the crime factors change over time. By shifting through the crime data we have to identify
new factors that lead to crime. For getting better results in prediction we have to find more crime
attributes.

44
Department of CSE CMR Institute of Technology
CRIME PREDICTION AND ANALYSIS WITH CRIMINAL DATA SET(LONDON OUTCOMES CSV)

REFERENCES

[1] S. Johnson, ”Internet changes everything: Revolutionizing public participation and access to
government information through the Internet”, Administrative Law Review, Vol. 50, No. 2
(Spring 1998) , pp. 277-337
[2] D. Chrysanthos. ”Strategic manipulation of internet opinion forums: Implications for
consumers and firms.” Management Science 52.10 (2006): 1577-1593.
[3] M. Wollmer, et al. ”Youtube movie reviews: Sentiment analysis in an audio-visual context.”
Intelligent Systems, IEEE (2013): pages 46-53.
[4] J. Naughton, ”The internet: is it changing the way we think?”, The Gaurdian, Saturday 14
August 2010
[5] G. Mishne and N. S. Glance, ”Predicting movie sales from blogger sentiment,” in AAAI
2006 Spring Symposium on Computational Approaches to Analyzing Weblogs, 2006.
[6] L. Barbosa, and J. Feng, ”Robust sentiment detection on twitter from biased and noisy data.”,
in Proceedings of the International Conference on Computational Linguistics (COLING-2010).
2010.
[7] E. Cambria, N. Howard, Y. Xia, and T. S. Chua, ”Computational Intelligence for Big Social
Data Analysis”, IEEE Computational Intelligence Magazine, 11(3), 8-9, 2016.
[8] E. Cambria, B. Schuller, Y. Xia, and B. White, ”New avenues in knowledge bases for natural
language processing”, Knowledge-Based Systems, 108(C), 1-4, 2016.
[9] M. Bautin, L. Vijayarenu, and S. Skiena. ”International sentiment analysis for news and
blogs.”, in Proceedings of the International AAAI Conference on Weblogs and Social Media
(ICWSM-2008). 2008.
[10] I. Becker and V. Aharonson. ”Last but definitely not least: on the role of the last sentence in
automatic polarity-classification.”, in Proceedings of the ACL 2010 Conference Short Papers.
2010.

45
Department of CSE CMR Institute of Technology

You might also like