Coder Social home page Coder Social logo

vancouver-crime-predictor's Introduction

The Vancover Crime Predictor

The purpose of this project is to setup a crime prediction model for Vancouver using its crime data from 2003 to 2017.

Link to dataset: https://www.kaggle.com/datasets/wosaku/crime-in-vancouver?select=crime.csv

The model used to make these predictions is from an algorithm called KNN (K-Nearest Neigbors). A description of the algorithm can be found here: https://www.geeksforgeeks.org/k-nearest-neighbours/. The reason I use this algorithm is because it's the one that make sense the most for the dataset with how it can use supervised learning for pattern recognition. I've also made a file called crime-shortener to make the dataset smaller for easier testing.

In short, the accuracy of my model is around 30-45%. And even though it's better than random, the accuracy is not high enough to be considered reliable. One reason could be the model itself and the algorithm might not be the perfect fit for the dataset. Another one could just be the nature of crime itself and it's not always guaranteed that a type of crime will happen at this specific time and this particular neighborhood. Regardless, I intend to implement different algorithms to see if there are other ways to improve model accuracy.

To run the program, just run Crime_Pred.ipnyb as a Python file and it will run on the crime_shortened.csv file by default to run quickly. You can change the link to file on crime.csv to run with the full dataset.

vancouver-crime-predictor's People

Contributors

donguyenhung avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.