# Risk and Pattern Analysis of Pakistani Crime Data Using Unsupervised Learning Techniques
## 3 Methodology and Experimental Investigation
### Attributes Selection and Extraction for Final Dataset Generation  
After translating the data into the English language and converting it into tabular form, attribute selection is performed in consultation with the domain experts to take into account only those attributes that can help perform the exploratory data analysis. Based on each attribute's information, six attributes are selected in total, which became part of the finalised crime dataset.  
For better data analysis, data discretisation is done on selected attributes to get more promising results. The attribute _DayType_ is derived from the attribute _crime-reportingdate_ which has now only two possible values 'Weekdays' and 'Weekend' after discretisation. Similarly, another attribute _Crime Time_ is derived from the attribute _crime-reporting-time_ that presently has only five possible values, i.e., 'Morning', 'After-Noon, 'Evening', 'Night', and 'Mid-Night'. Table 3 is showing the names and possible values of the selected attributes presented in the finalised crime dataset.  
After performing data discretisation on _Crime Time_ and _Day Type_ attributes, data characterisation on the attribute _Crime Type_ is also done as there exist multiple types of crimes. Figure 3 shows the concept hierarchy of the _Crime Type_ attribute.  
A concept hierarchy is developed to describe the categorization of low-level concepts into high level more generalized concepts. Generalization leads to more pattern extraction. _Crime Type_ is initially divided into three groups at Level 1, i.e., \"Crime against State\",  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Attributes’ Name** & **Attributes’ Values** \\ \hline _Crime Time_ & ‘Morning’, ‘After-Noon’, ‘Evening’, ‘Night’, ‘Mid-Night’ \\ _Day Type_ & ‘Weekdays, Weekend’ \\ _Abbas Block’, ‘Azam Garden’, ‘BOR Main Road’, ‘Bohar Wala Chowk’, ‘Canal Bank Rd’, ‘Canal View Housing Society’, ‘Ferozpur Road’, ‘G1 Markef’, ‘Mian Plaza’, ‘Muthan Chungi’, ‘Samsani Road’, ‘Shah Di Kio’, ‘Thokar Niaz Baig’, ‘Township’, ‘Wahdat Road’, ‘Sohwari’, ‘Shalimar Link Road’, ‘Mughalpura Chowk’, ‘Mughalpura Road’, ‘Ramgar Bazar’. \\ _Distance of Crime Event from Police Station_ & ‘1 km’, 2 km’, 3 km’, 4 km’, 11 km’, 15 km’ \\ _The direction of Crime Event from Police Station_ & ‘North’, ‘South East’, ‘West’, North East’, ‘South West’ \\ _The direction of Crime Event from Police Station_ & ‘South East’, ‘North West’ \\ _The_ & ‘Assault’, ‘Conspiracy’, ‘Drug Trafficking’, ‘Electricity Theft’ Fraud’, ‘Gambling’, ‘Kidnapping’, ‘Kite Flying Offense’, ‘Marriage Ordinance’, ‘Murder’, ‘Possession of Weapon’, ‘Price Control’, ‘Robbery’ Theft’, ‘Traffic Violation’ (See Figure 2 for description) \\ \hline \hline \end{tabular}
\end{table}
Table 3: List of the finalised set of attributes along with possible values.  
Figure 3: Concept hierarchy of attribute Crime Type.  
\"Crime against Belongings\", and \"Crime against Person\". Moreover, groups are divided into further subgroups at Level 2 and Level 3, respectively. The numeric value present on each box is showing the count of the records present against that particular _Crime Type_. For example, the crime dataset has 380 records against the _Crime Type_ 'Crime Against State'.