In today’s blog I will explain my work on the second dataset in which I applied the clustering technique to find out the clusters in the data as per the police officer’s and the encounters which has been done by them.
I grouped the data in K clusters by assessing the ID of the cops and the encounters has been done by them. While performing the machine learning technique of clustering into the second dataset I found that the most of the encounters has been done by the cops bearing the ID number from 1 to 5000 and the clusters are quite compressed in the plot where one can relate the shootings by the cop.
Police officer’s which are having their ID from 5000 and above, their encounters are linear and that is very less in numbers. For doing this I imported ‘sklearn.cluster’ library and also I applied the function called ‘kmeans.fit_predict’. One can refer the plot below in which I have shared a picture of K-means clusters applied in the second dataset.
I my next blog, I try to get the closure for my work where I can relate both the datasets and try to visualise the geospatial of the shootings and find out the dots in the datasets.