Crime Prediction and Analysis Using Machine Learning
Crime Prediction and Analysis Using Machine Learning
Crime Prediction and Analysis Using Machine Learning
Crime analysis and prediction is a systematic approach for identifying the crime. This
system can predict regions which have high probability for crime occurrences and
visualize crime prone areas. Using the concept of data mining we can extract previously
unknown, useful information from unstructured data. The extraction of new information
is predicted using the existing datasets. Crimes are treacherous and common social
problems faced worldwide. Crimes affect the quality of life, economic growth and
reputation of a nation. With the aim of securing the society from crimes, there is a need
for advanced systems and new approaches for improving the crime analytics for
protecting their communities. Propose a system which can analyze, detect, and predict
various crime probability in a given region.Explains various types of criminal analysis
and crime prediction using several data mining techniques.
5
TABLE OF CONTENTS
Abstract 5
List of Figures 8
List of Tables 6
List of Abbreviation 9
1 INTRODUCTION
1.2 Objective 10
2 LITERATURE SURVEY
4 METHODOLOGY
4.1 Introduction To ML 17
4.3.1 Classification 19
4.3.2 Regression 20
6
4.4 System Architecture 20
4.8 Datasets 23
4.9.1 Pandas 23
4.9.2 Numpy 23
4.10.1 Scikit-Learn 24
4.10.2 Scikit-Plot 25
4.12 Python 27
7 APPENDICES
A)Source Code 41
B) Screenshots 46
C) Publication With 51
Plagiarism Report
7
LIST OF FIGURES
8
LIST OF ABBREVIATIONS
ABBREVIATION EXPANSION
9
CHAPTER 1
INTRODUCTION
Day by day crime data rate is increasing because the modern technologies and hi-tech
methods are helps the criminals to achieving the illegal activities .according to Crime
Record Bureau crimes like burglary, arson etc have been increased while crimes like
murder, sex, abuse, gang rap etc have been increased.crime data will be collected from
various blogs, news and websites. The huge data is used as a record for creating a
crime report database. The knowledge which is acquired from the data mining
techniques will help in reducing crimes as it helps in finding the culprits faster and also
the areas that are most affected by crime .
1.2 OBJECTIVE
This system gives the most trending technology-based skills used at the present. To
help police to detect the crime type based on location. Provides the user with the
technology he is saving a life and saves a lot of time. Html (Hypertext Markup
Language) and CSS (Cascading Style Sheet) are two of the core technologies for
building Web pages.
HTML provides the structure of the page, CSS the (virtual and aural) layout for a variety
of devices. Along with graphics and scripting HTML and CSS are the basis of building
Web pages and Web Applications. HTML gives authors the means to : Publish online
documents with headings, text, tables, lists, photos. Retrieve online information via
hypertext links, at the click of a button. Design forms for conducting transactions with
remote services, for use in searching for information etc. Include spreadsheets, video
10
clips, Sound clips and other applications directly in their documents. Flask is the most
popular framework of python for web development. It is free, open source and server-
side(the code is executed on the server).
Machine learning is a process that is widely used for prediction. N number of algorithms
are available in various libraries which can be used for prediction. In this article, we are
going to build a prediction model on historic data using different machine learning
algorithms and classifiers, plot the results and calculate the accuracy of the model on
the testing data. Building/Training a model using various algorithms on a large dataset
is one part of the data. But using these models within different applications is the
second part of deploying machine learning in the real world.To put it to use in order to
predict the new data, we have to deploy it over the internet so that the outside world can
use it. In this article, we will talk about how we have trained a machine learning model,
created a web application on it using Flask.
11
CHAPTER 2
LITERATURE SURVEY
12
13
14
CHAPTER 3
AIM AND SCOPE OF THE PROJECT
Data mining in the study and analysis of criminology can be categorized into main
areas, crime control and crime suppression. De Bruin et. al. introduced a framework for
crime trends using a new distance measure for comparing all individuals based on their
profiles and then clustering them accordingly. Manish Gupta et. al. highlights the
existing systems used by Indian police as e-governance initiatives and also proposes an
interactive query based interface as crime analysis tool to assist police in their activities.
He proposed an interface which is used to extract useful information from the vast crime
database maintained by National Crime Record Bureau (NCRB) and find crime hot
spots using crime data mining techniques such as clustering etc. The effectiveness of
the proposed interface has been illustrated on Indian crime records. Sutapat Thiprungsri
examines the application of cluster analysis in the accounting domain, particularly
discrepancy detection in audit. The purpose of his study is to examine the use of
clustering technology to automate fraud filtering during an audit. He used cluster
analysis to help auditors focus their efforts when evaluating group life insurance claims.
In this project, we will be using the technique of machine learning and data science for
crime prediction of crime data sets. The crime data is extracted from the official portal of
police. It consists of crime information like location description, type of crime, date, time,
latitude, longitude. Before training the model data preprocessing will be done following
this feature selection and scaling will be done so that the accuracy obtained will be high.
The K-Nearest Neighbor (KNN) classification and various other algorithms (Decision
15