Professional Documents
Culture Documents
Crime Analysis System
Crime Analysis System
Crime Analysis System
1 INTRODUCTION
Crime is one of the biggest and dominating problem in our society and its prevention is an important.
task. Daily there are huge numbers of crimes committed frequently. This require keeping track of all
the crimes and maintaining a database for same which may be used for future reference. The current
problem faced are maintaining of proper dataset of crime and analyzing this data to help in predicting
and solving crimes in future. The objective of this project is to analyze dataset which consist of
numerous crimes and predicting the type of crime which may happen in future depending upon
various conditions. In this project, we will be using the technique of machine learning and data
science for crime prediction of India crime data set. The crime data is extracted from the official
portal of India police. It consists of crime information like location description, type of crime, date,
time, latitude, longitude. Before training of the model data preprocessing will be done following this
feature selection and scaling will be done so that accuracy obtain will be high. The K-Nearest
Neighbor (KNN) classification and various other algorithms will be tested for crime prediction and
one with better accuracy will be used for training. Visualization of dataset will be done in terms of
graphical representation of many cases for example at which time the criminal rates are high or at
which month the criminal activities are high. The soul purpose of this project is to give a jest idea of
how machine learning can be used by the law enforcement agencies to detect, predict and solve
crimes at a much faster rate and thus reduces the crime rate. It not restricted to India, this can be used
in other states or countries depending upon the availability of the dataset.
Abstract
Crime is one of the biggest and dominating problem in our society and its prevention is an
important. task. Daily there are huge numbers of crimes committed frequently. This require
keeping track of all the crimes and maintaining a database for same which may be used for
future reference. The current problem faced are maintaining of proper dataset of crime and
analyzing this data to help in predicting and solving crimes in future. The objective of this
project is to analyze dataset which consist of numerous crimes and predicting the type of
crime which may happen in future depending upon various conditions. In this project, we will
be using the technique of machine learning and data science for crime prediction of India
crime data set. The crime data is extracted from the official portal of India police. It consists
of crime information like location description, type of crime, date, time, latitude, longitude.
Before training of the model data pre-processing will be done following this feature selection
and scaling will be done so that accuracy obtain will be high. The K-Nearest Neighbor
(KNN) classification and various other algorithms will be tested for crime prediction and one
with better accuracy will be used for training.
Crimes are the significant threat to the humankind. There are many crimes that happens
regular interval of time. Perhaps it is increasing and spreading at a fast and vast rate. Crimes
happen from small village, town to big cities. Crimes are of different type – robbery, murder,
rape, assault, battery, false imprisonment, kidnapping, homicide. Since crimes are increasing
there is a need to solve the cases in a much faster way. The crime activities have been
increased at a faster rate and it is the responsibility of police department to control and reduce
the crime activities. Crime prediction and criminal identification are the major problems to
the police department as there are tremendous amount of crime data that exist. There is a
need of technology through which the case solving could be faster.
The above problem made me to go for a research about how can solving a crime case made
easier. Through many documentation and cases, it came out that machine learning and data
science can make the work easier and faster. The aim of this project is to make crime
prediction using the features present in the dataset. The dataset is extracted from the official
sites. With the help of machine learning algorithm, using python as core we can predict the
type of crime which will occur in a particular area. The objective would be to train a model
for prediction. The training would be done using the training data set which will be validated
using the test dataset. Building the model will be done using better algorithm depending upon
the accuracy. The Convolutional Neural Network (CNN) classification and other algorithm
will be used for crime prediction. Visualization of dataset is done to analyze the crimes which
may have occurred in the country. This work helps the law enforcement agencies to predict
and detect crimes in India with improved accuracy and thus reduces the crime rate.
Problem Statement
Crimes are the significant threat to the humankind. There are many crimes that happens
regular interval of time. Perhaps it is increasing and spreading at a fast and vast rate. Crimes
happen from small village, town to big cities. Crimes are of different type –robbery, murder,
rape, assault, battery, false imprisonment, kidnapping, homicide. Since crimes are increasing
there is a need to solve the cases in a much faster way. The crime activities have been
increased at a faster rate and it is the responsibility of police department to control and reduce
the crime activities. Crime prediction and criminal identification are the major problems to
the police department as there are tremendous amount of crime data that exist. There is a
need of technology through which the case solving could be faster.
Proposed Solution
Predictive modeling is the way of building a model that is capable of making predictions. The
process includes a machine learning algorithm that learns certain properties from a training
dataset in order to make those predictions. Predictive modeling can be divided further into
two areas: Regression and pattern classification. Regression models are based on the analysis
of relationships between variables and trends in order to make predictions about continuous
variables. In contrast to regression models, the task of pattern classification is to assign
discrete class labels to particular data value as output of a prediction. Example of a
classification model is -A pattern classification task in weather forecasting could be the
prediction of a sunny, rainy, or snowy day. In this project, we will be using the technique of
machine learning and data science for crime prediction of India crime data set. The crime
data is extracted from the official portal of India police. It consists of crime information like
location description, type of crime, date, time, latitude, longitude. Before training of the
model data pre-processing will be done following this feature selection and scaling will be
done so that accuracy obtain will be high. The Convolutional Neural Network (CNN)
classification and various other algorithms will be tested for crime prediction and one with
better accuracy will be used for training.
System Requirements:
Hardware Requirements:
Software Requirements:
Predictive modeling is the way of building a model that is capable of making predictions. The
process includes a machine learning algorithm that learns certain properties from a training
dataset in order to make those predictions. Predictive modeling can be divided further into
two areas: Regression and pattern classification. Regression models are based on the analysis
of relationships between variables and trends in order to make predictions about continuous
variables. In contrast to regression models, the task of pattern classification is to assign
discrete class labels to particular data value as output of a prediction.
Classification and Decision TreesA decision tree is an algorithm that uses a tree shaped graph
or model of decisions including chance event outcomes, costs, and utility. It is one way to
display an algorithm. Naive Bayes -In machine learning, naive Bayes classifiers are a family
of simple probabilistic classifiers based on applying Bayes theorem with independence
assumptions between the features. The technique constructs classifier models that assign class
labels to problem instances, represented as vectors of feature values, where the class labels
are drawn from some finite set.
Linear Regression – The analysis is a statistical process for estimating the relationships
among variables. Linear regression is an approach for modelling the relationship between a
scalar dependent variable Y and one or more explanatory variables denoted X. The case of
one explanatory variable is called simple linear regression. More than one variable is called
multivariate. Logistic Regression - In statistics, logistic regression, is a regression model
where the dependent variable is categorical or binary. Data Preprocessing This process
includes methods to remove any null values or infinite values which may affect the accuracy
of the system. The main steps includeFormatting, cleaning and sampling.Cleaning process is
used for removal or fixing of some missing data there may be data that are incomplete.
Sampling is the process where appropriate data are used which may reduce the running time
for the algorithm. Using python, the preprocessing is done.
3. Data Modelling
4. Estimation of performance
Prepare Data
1. In this step we need prepare data into right format for analysis
Analyze and Transform Variables We may need to transform the variables using one of the
approaches
1. Normalization or standardization
• Test Sample: Model performances will be validated on this sample. 30% or 20% of the data
goes here
Model Selection
Based on the defined goal(s) (supervised or unsupervised) we have to select one of or
combinations of modeling techniques. Such as
• KNN Classification
• Logistic Regression
• Decision Trees
• Random Forest
• Bayesian methods
Build/Develop/Train Models
Validate the assumptions of the chosen algorithm
Develop/Train Model on Training Sample, which is the available data(Population)
Check Model performance - Error, Accuracy
Validate/Test Model
Score and Predict using Test Sample
Algorithm Explanation
CNNs enable analysis and extraction of the spatial information in images, building from fine
grained details into higher level structures. The temporal dimension can be added to these
networks by adding a third axis to the convolutional kernels. This work demonstrates how
CNNs can be used to interpret the output of Numerical Weather Prediction (NWP)
automatically to generate local forecasts.
The main outcomes of this work are:
• CNNs are able to provide a model to interpret numerical weather model fields directly and
to generate local weather forecasts.
• Class Activation Mapping (CAM) provides a valuable mechanism to assess the spatial and
temporal correlations of the different fields visually, helping to introspect and develop new
models.
• 3D convolutions can naturally incorporate the temporal component into neural networks,
significantly improving the accuracy of the results.
3 LITERATURE REVIEW
Complex relationships between these factors. With the development of high-performance
computers, the cost of these machine learning techniques was drastically reduced. They
achieved a great deal of success in many domains. In particular, deep learning, a relatively
recent development in artificial intelligence, has achieved impressive results with many types
of classification problems, ranging from speech to visual recognition. One domain that has
not received much attention within deep learning is crime prediction. Deep learning is well
suited to handle the temporal and spatial components of the problem as well as a large feature
set that can be constructed using relevant public datasets in addition to crime datasets. In
addition, the inherent complexity of the problem makes it suitable for deep learning.
Using neural networks reduces the need for extensive feature engineering found in some
previous work and allows for training over large datasets. In order to address the temporal
aspects of crime prediction, a Recurrent Neural Network (RNN) can be used. In a traditional
neural network, there is the assumption that all inputs and outputs are independent of one
another, but for crime this is clearly not the case. Crimes that happened yesterday will affect
what happens today. For example, if there is an increase in thefts in an area then it is possible
that the area is being targeted and will continue to have theft rates higher than normal for a
period of time.
RNNs apply the same weights to each element of a sequence while also having a memory of
past states of the sequence. This memory encodes the sequence up to the given point in time
(it is also called the hidden state). This means a given output at a time depends on the current
input at the time and the hidden state containing the history up until the time, allowing for
greater predictive power. For the spatial aspects of crime prediction, a Convolution Neural
Network (CNN) is fitted. CNNs are widely used and successful in image classification. For
this task, the image is input as a grid of pixels with three channels, corresponding to RGB
values.
For our purposes, we can think of a city grid with relevant data in each grid in terms of an
image. Each grid cell corresponds to a pixel, and each different feature in that cell
corresponds to a different channel. CNNs slide filters across an image to get local responses
from the image, and then use a max pooling over these responses to reduce the
dimensionality of the problem. As dimensionality is reduced, the features extracted go from
highly local to a global view built off the aggregate of the local features. Since crime is not
randomly distributed geographically, taking into account what is happening in neighbouring
cells is useful for predictions in the main cell. While RNNs and CNNs capture temporal and
spatial aspects of the problem separately, they can be combined into a single network that
captures both. Network architecture is flexible and so it is possible to include both types of
layers into one network. The most important spatial features at a time are placed into a grid
and passed through the CNN layers, and the output of the CNN is combined with the rest of
the features. The resulting vector is then treated as input at the time for the RNN.
Data mining is a new information technology as the development of database technology and
artificial intelligence technology. Data mining is the process of extracting the hidden
information and knowledge that people do not know in advance but potentially useful. The
aim is to discover unknown relationships and summarize data in the innovative way of
understanding by the data owner and value, and predict possible future behavior, so as to
provide stronger support for decision.
making. According to the different forms of the main data structure, data mining can be
divided into three categories in general, that is data mining, Web data mining and text data
mining. Data mining. The data mining is for structured data, such as SQL, Server, Oracle,
Informix and other data or data warehouse. At present, the following software DB2
Intelligent Miner for Data SAS Enterprise Miner of IBM can be used. Web mining. The
object of data mining is a traditional database or data warehousing, and Web data mining is
the various Web data including Web pages, structure between pages, the user access to
information, and business transaction information, which is to discover useful knowledge to
help people extract knowledge from the World Wide Web, improving site design and
ecommerce to better or improve services. Web data mining can be divided into Web content
mining, Web usage mining and Web structure mining. Text data mining. When the objects of
data mining is composed entirely of text type, the process of automated information
processing and analysis massive text information is called text data mining, which is in the
way of data mining algorithms and information retrieval algorithms. It includes feature
extraction, text summarization, text classification and clustering, concept operations and
exploratory data analysis. The techniques of text data mining contains the vector of word
frequency, the word string representation, Bayesian classifier, Bag of word, text clustering
algorithm based on the concept and classification algorithm of K - the nearest neighbor. Data
mining technology and its application is a hot topic in the international arena currently, and it
has been applied in many industries, which demonstrates its advantages and development
potential. In the area of information management, it is the only way to achieve development
of knowledge retrieval and knowledge management, as long as we integrate data mining
technology with artificial intelligence technology, access to user knowledge, literature and
other kinds of knowledge. Data mining is to discover and extract hidden information from
large databases and vast network information space in the digital library, and the purpose is to
help information workers search for the potential association between the data and find the
neglected elements, which is very useful to predict trends and make decision.
Inductive learning method. Inductive learning methods include information methods or
decision tree and set theory methods. Decision tree uses attribute structure to represent the
decision-making set, and these decision set products rules through classification of data sets.
Typical methods of decision tree have classification and regression tree and mining used in
classification rules. Decision tree classification method is faster and more easily converted
into simple understandable classification rules, etc., especially in problem areas of high
dimension, it can get a very good classification results. Set theory method is a new
mathematical tool dealing with vague and uncertain problems. It has some advantages of a
strong mathematical foundation, simple method, highly targeted and small computation.
Using this method it can handle the following problems, including data simplification, data
association discovery, data meaning evaluation and approximate analysis of data.
Imitation biotechnology method. Imitation biotechnology method includes neural networks
and genetic algorithms. Artificial neural networks imitating biological neural network in
structure, is a nonlinear prediction model through training, and can be used for classification,
clustering, feature extraction and other operations. Genetic algorithm is an optimization
technique, it uses a series of concepts of biological evolution to search issues, and ultimately
to optimize. It calculates the fitness of individuals after genetic, then carries out chromosome
replication, exchange and mutation, etc., produces new individuals, repeats this operation
until obtains the best or better individual. In data mining, it is often expressed as a search
problem, and uses powerful search capabilities of genetic algorithms to find the optimal
solution. Formula discovery. Formula discovery includes discovery system BACON of
physical laws and discovery system FDD of empirical formula. It identifies the new record
through combination of K similar historical records, and this technique can be used as data
mining tasks of clustering and deviation analysis. Statistical analysis. Statistical analysis is to
extract unknown mathematical model from samples analysis. In data mining, it often involves
a certain statistical procedure, judgment hypothesis and errors control.
3 SYSTEM DESIGN
System design is transition from a user oriented document to programmers or data base
personnel. The design is a solution, how to approach to the creation of a new system. This is
composed of several steps. It provides the understanding and procedural details necessary for
implementing the system recommended in the feasibility study. Designing goes through
logical and physical stages of development, logical design reviews the present physical
system, prepare input and output specification, details of implementation plan and prepare a
logical design walkthrough.
The database tables are designed by analyzing functions involved in the system and
format of the fields is also designed. The fields in the database tables should define their role
in the system. The unnecessary fields should be avoided because it affects the storage areas of
the system. Then in the input and output screen design, the design should be made user
friendly. The menu should be precise and compact.
Software Design:
Software is designed such that, each system should consists of hierarchy of modules and
serve to partition into separate function.
Coupling:
Cohesion:
Shared use:
Avoid duplication by allowing a single module is called by other that needs the function it
provides.
Data Flow Diagrams:
A Data Flow Diagram (DFD) is also known as a Process Model. Process Modeling is
an analysis technique used to capture the flow of inputs through a system (or group of
processes) to their resulting output. The model is fairly simple in that there are only four
types of symbols.
Process, dataflow, external entity, data store. Process Modeling is used to visually
represent what a system is doing. It is much easier to look at a picture and understand the
essence than to read through verbiage describing the activities. System Analyst after talking
with various users will create DFD diagrams and then show them to users to verify that their
understanding is correct. The process models can be created to represent an existing system
as well as a proposed system.
The data flow diagrams are very helpful in determining the flow of data in an application.
Dataset:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
dataset=pd.read_csv('data.csv')
data=pd.read_csv('data.csv')
dataset.head()
db=pd.DataFrame({"year": column_1.dt.year,
"month": column_1.dt.month,
"day": column_1.dt.day,
"hour": column_1.dt.hour,
"dayofyear": column_1.dt.dayofyear,
"week": column_1.dt.week,
"weekofyear": column_1.dt.weekofyear,
"dayofweek": column_1.dt.dayofweek,
"weekday": column_1.dt.weekday,
"quarter": column_1.dt.quarter,
})
dataset1=dataset.drop('timestamp',axis=1)
data1=pd.concat([db,dataset1],axis=1)
data1.info()
data1.dropna(inplace=True)
data1.head()
sns.boxplot(x='act379' ,y='hour' ,data=data1, palette='winter_r')
plt.show()
data1.plot.hexbin(x='act13',y='hour',gridsize=25)
plt.show()
#Choose data
X=data1.iloc[:,[1,2,3,4,6]].values
y=data1.iloc[:,[10,11,12,13,14,15]].values
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.20, random_state=50)
from sklearn.neighbors import KNeighborsClassifier
knn = KNeighborsClassifier(n_neighbors=10)
knn.fit(X_train,y_train)
print("Score: ",knn.score(X_test,y_test))
print("Score: ",knn.score(X_train,y_train))
data1.to_csv("result.csv",index=False)
Output:
<class 'str'>
<class 'numpy.int64'>
<class 'numpy.int64'>
<class 'numpy.int64'>
<class 'numpy.int64'>
<class 'numpy.int64'>
<class 'numpy.int64'>
<class 'numpy.float64'>
<class 'numpy.float64'>
http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#ix-indexer-is-
deprecated
column_1 = data.ix[:,0]
<class 'pandas.core.frame.DataFrame'>
Score: 0.5797101449275363
Score: 0.6463119709794438
CNN Implementation:
import pandas as pd
import numpy as np
dataset = pd.read_csv('result.csv')
#X =
dataset.drop(['year','month','day','hour','dayofyear','week','weekofyear','dayofweek','
weekday','quarter', 'act363','act302','latitude','longitude'],axis=1)
#X =
dataset.drop(['hour','weekofyear','dayofweek','weekday','quarter','act379','act13','act
279','act323','act363','act302','latitude','longitude'],axis=1)
#y = dataset[["hour","week"]]
X=dataset.iloc[:,[1,2,3,4,6]].values
y=dataset.iloc[:,[10,11,12,13,14,15]].values
model = Sequential()
model.add(Dense(8, activation='relu'))
model.add(Dense(6, activation='sigmoid'))
, metrics=['accuracy'])
_, accuracy = model.evaluate(X, y)
Output:
Instructions for updating:
Epoch 1/1000
Epoch 2/1000
Epoch 3/1000
Epoch 4/1000
Epoch 6/1000
Epoch 7/1000
Epoch 8/1000
Epoch 9/1000
Epoch 10/1000
Epoch 11/1000
Epoch 12/1000
Epoch 13/1000
Epoch 15/1000
Epoch 16/1000
Epoch 17/1000
Epoch 18/1000
Epoch 19/1000
Epoch 20/1000
Epoch 21/1000
Epoch 22/1000
Epoch 24/1000
Epoch 25/1000
Epoch 26/1000
Epoch 27/1000
Epoch 28/1000
Epoch 29/1000
Epoch 30/1000
Epoch 31/1000
Epoch 701/1000
Epoch 702/1000
Epoch 703/1000
Epoch 704/1000
Epoch 705/1000
Epoch 706/1000
Epoch 707/1000
Epoch 708/1000
Epoch 710/1000
Epoch 711/1000
Epoch 712/1000
Epoch 713/1000
Epoch 714/1000
Epoch 715/1000
Epoch 716/1000
Epoch 717/1000
Epoch 719/1000
Epoch 720/1000
Epoch 721/1000
Epoch 722/1000
Epoch 723/1000
Epoch 724/1000
Epoch 725/1000
Epoch 726/1000
Epoch 728/1000
Epoch 729/1000
Epoch 730/1000
Epoch 731/1000
Epoch 732/1000
Epoch 733/1000
Epoch 734/1000
Epoch 735/1000
Epoch 737/1000
Epoch 738/1000
Epoch 739/1000
Epoch 740/1000
Epoch 741/1000
Epoch 742/1000
Epoch 743/1000
Epoch 744/1000
Epoch 746/1000
Epoch 747/1000
Epoch 748/1000
Epoch 749/1000
Epoch 750/1000
Epoch 751/1000
Epoch 752/1000
Epoch 753/1000
Epoch 755/1000
Epoch 756/1000
Epoch 757/1000
Epoch 758/1000
Epoch 759/1000
Epoch 760/1000
Epoch 761/1000
Epoch 762/1000
Epoch 764/1000
Epoch 765/1000
Epoch 766/1000
Epoch 767/1000
Epoch 768/1000
Epoch 769/1000
Epoch 770/1000
Epoch 771/1000
Epoch 773/1000
Epoch 774/1000
Epoch 775/1000
Epoch 776/1000
Epoch 777/1000
Epoch 778/1000
Epoch 779/1000
Epoch 780/1000
Epoch 782/1000
Epoch 783/1000
Epoch 784/1000
Epoch 785/1000
Epoch 786/1000
Epoch 787/1000
Epoch 788/1000
Epoch 789/1000
Epoch 791/1000
Epoch 792/1000
Epoch 793/1000
Epoch 794/1000
Epoch 795/1000
Epoch 796/1000
Epoch 797/1000
Epoch 798/1000
Epoch 800/1000
Epoch 801/1000
Epoch 802/1000
Epoch 803/1000
Epoch 804/1000
Epoch 805/1000
Epoch 806/1000
Epoch 807/1000
Epoch 809/1000
Epoch 810/1000
Epoch 811/1000
Epoch 812/1000
Epoch 813/1000
Epoch 814/1000
Epoch 815/1000
Epoch 816/1000
Epoch 818/1000
Epoch 819/1000
Epoch 820/1000
Epoch 821/1000
Epoch 822/1000
Epoch 823/1000
Epoch 824/1000
Epoch 825/1000
Epoch 827/1000
Epoch 828/1000
Epoch 829/1000
Epoch 830/1000
Epoch 831/1000
Epoch 832/1000
Epoch 833/1000
Epoch 834/1000
Epoch 836/1000
Epoch 837/1000
Epoch 838/1000
Epoch 839/1000
Epoch 840/1000
Epoch 841/1000
Epoch 842/1000
Epoch 843/1000
Epoch 845/1000
Epoch 846/1000
Epoch 847/1000
Epoch 848/1000
Epoch 849/1000
Epoch 850/1000
Epoch 851/1000
Epoch 852/1000
Epoch 854/1000
Epoch 855/1000
Epoch 856/1000
Epoch 857/1000
Epoch 858/1000
Epoch 859/1000
Epoch 860/1000
Epoch 861/1000
Epoch 863/1000
Epoch 864/1000
Epoch 865/1000
Epoch 866/1000
Epoch 867/1000
Epoch 868/1000
Epoch 869/1000
Epoch 870/1000
Epoch 872/1000
Epoch 873/1000
Epoch 874/1000
Epoch 875/1000
Epoch 876/1000
Epoch 877/1000
Epoch 878/1000
Epoch 879/1000
Epoch 881/1000
Epoch 882/1000
Epoch 883/1000
Epoch 884/1000
Epoch 885/1000
Epoch 886/1000
Epoch 887/1000
Epoch 888/1000
Epoch 890/1000
Epoch 891/1000
Epoch 892/1000
Epoch 893/1000
Epoch 894/1000
Epoch 895/1000
Epoch 896/1000
Epoch 897/1000
Epoch 899/1000
Epoch 900/1000
Epoch 901/1000
Epoch 902/1000
Epoch 903/1000
Epoch 904/1000
Epoch 905/1000
Epoch 906/1000
Epoch 908/1000
Epoch 909/1000
Epoch 910/1000
Epoch 911/1000
Epoch 912/1000
Epoch 913/1000
Epoch 914/1000
Epoch 915/1000
Epoch 917/1000
Epoch 918/1000
Epoch 919/1000
Epoch 920/1000
Epoch 921/1000
Epoch 922/1000
Epoch 923/1000
Epoch 924/1000
Epoch 926/1000
Epoch 927/1000
Epoch 928/1000
Epoch 929/1000
Epoch 930/1000
Epoch 931/1000
Epoch 932/1000
Epoch 933/1000
Epoch 935/1000
Epoch 936/1000
Epoch 937/1000
Epoch 938/1000
Epoch 939/1000
Epoch 940/1000
Epoch 941/1000
Epoch 942/1000
Epoch 944/1000
Epoch 945/1000
Epoch 946/1000
Epoch 947/1000
Epoch 948/1000
Epoch 949/1000
Epoch 950/1000
Epoch 951/1000
Epoch 953/1000
Epoch 954/1000
Epoch 955/1000
Epoch 956/1000
Epoch 957/1000
Epoch 958/1000
Epoch 959/1000
Epoch 960/1000
Epoch 962/1000
Epoch 963/1000
Epoch 964/1000
Epoch 965/1000
Epoch 966/1000
Epoch 967/1000
Epoch 968/1000
Epoch 969/1000
Epoch 971/1000
Epoch 972/1000
Epoch 973/1000
Epoch 974/1000
Epoch 975/1000
Epoch 976/1000
Epoch 977/1000
Epoch 978/1000
Epoch 980/1000
Epoch 981/1000
Epoch 982/1000
Epoch 983/1000
Epoch 984/1000
Epoch 985/1000
Epoch 986/1000
Epoch 987/1000
Epoch 989/1000
Epoch 990/1000
Epoch 991/1000
Epoch 992/1000
Epoch 993/1000
Epoch 994/1000
Epoch 995/1000
Epoch 996/1000
Epoch 998/1000
Epoch 999/1000
Epoch 1000/1000
Accuracy: 85.64
[Finished in 44.6s]
5. SYSTEM TESTING
Testing is a process, which reveals errors in the program. It is the major quality measure employed
during software development. During testing, the program is executed with a set of conditions
known as test cases and the output is evaluated to determine whether the program is performing as
expected.
Software testing is the process of testing the functionality and correctness of software by
running it. Process of executing a program with the intent of finding an error.
A good test case is one that has a high probability of finding an as yet undiscovered error. A
successful test is one that uncovers an as yet undiscovered error. Software testing is usually
performed for two reasons.
Defect detection
Reliability estimation
In order to make sure that the system does not have errors, the different levels of testing strategies
that are applied at differing phases of software development are:
Unit Testing:
Unit Testing is done on individual modules as they are completed and become executable. It is
confined only to the designer's requirements.
In this strategy some test cases are generated as input conditions that fully execute all functional
requirements for the program. This testing has been uses to find errors in the following
categories:
In this the test cases are generated on the logic of each module by drawing flow graphs of that
module and logical decisions are tested on all the cases.
It has been uses to generate the test cases in the following cases:
Integration testing ensures that software and subsystems work together as a whole. It tests
the interface of all the modules to make sure that the modules behave properly when
integrated together.
3. System Testing:
Involves in-house testing of the entire system before delivery to the user. Its aim is to satisfy
the user the system meets all requirements of the client's specifications.
4. Acceptance Testing:
It is a pre-delivery testing in which entire system is tested at client's site on real world data to
find errors.
Validation:
The system has been tested and implemented successfully and thus ensured that all the
requirements as listed in the software requirements specification are completely fulfilled. In case of
erroneous input corresponding error messages are displayed.
COMPILING TEST
It was a good idea to do our stress testing early on, because it gave us time to fix some of
the unexpected deadlocks and stability problems that only occurred when components were
exposed to very high transaction volumes.
EXECUTION TEST
OUTPUT TEST
The successful output screens are placed in the output screens section above.
6.4 TEST CASES:
Test Description: when a user selected dataset and applied algorithm for user based analysis and
the accuracy is good
Test Description: when a user selected dataset and applied regression and the accuracy is better
than the prior
Requirements Verified: Yes
Test Description: when a user selected dataset and applied SVD and accuracy is good
1. Yadav, S., Timbadia, M., Yadav, A., Vishwakarma, R., & Yadav, N. (2017, April). Crime
pattern detection, analysis & prediction. In Electronics, Communication and Aerospace
Technology (ICECA), 2017 International conference of (Vol. 1, pp. 225-230). IEEE.
2. Shamsuddin, N. H. M., Ali, N. A., & Alwee, R. (2017, May). An overview on crime
prediction methods. In Student Project Conference (ICT-ISPC), 2017 6th ICT International
(pp. 1-5). IEEE.
3. Sivaranjani, S., Sivakumari, S., & Aasha, M. (2016, October). Crime prediction and
forecasting in Tamilnadu using clustering approaches. In Emerging Technological Trends
(ICETT),
International Conference on (pp. 1-6). IEEE.
4. Sathyadevan, S., & Gangadharan, S. (2014, August). Crime analysis and prediction using
data mining. In Networks & Soft Computing (ICNSC), 2014 First International Conference
on (pp. 406-412). IEEE.
5. Nath, S. V. (2006, December). Crime pattern detection using data mining. In Web
intelligence and intelligent agent technology workshops, 2006. wi-iat 2006 workshops. 2006
ieee/wic/acm international conference on (pp. 41-44). IEEE.
6. Zhao, X., & Tang, J. (2017, November). Exploring Transfer Learning for Crime
Prediction. In Data Mining Workshops (ICDMW), 2017 IEEE International Conference on
(pp. 1158-1159). IEEE.
7. Al Boni, M., & Gerber, M. S. (2016, December). Area-Specific Crime Prediction Models.
In Machine Learning and Applications (ICMLA), 2016 15th IEEE International Conference
on (pp. 671-676). IEEE.
8. Tayebi, M. A., Gla, U., & Brantingham, P. L. (2015, May). Learning where to inspect:
location learning for crime prediction. In Intelligence and Security Informatics (ISI), 2015
IEEE International Conference on (pp. 25-30). IEEE.
Appendix