Coder Social home page Coder Social logo

vaibhavbichave / suicide-rate-prediction Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 3.0 11.24 MB

The objective of this project is to predict the Suicide Rate using Machine Learning algorithms and to analyzing significant patterns features that result in increase of suicide rates globally. To see project click here https://suicide-rate-prediction-api.herokuapp.com/

Jupyter Notebook 99.43% Python 0.18% HTML 0.38% CSS 0.01%
data-science supervised-machine-learning data-visualization exploratory-data-analysis data-preprocessing data-prediction

suicide-rate-prediction's Introduction

Suicide Rate Prediction

image image

Table of Content

Introduction

Suicide is a serious public health problem. The World Health Organization (WHO) estimates that every year close to 800 000 people take their own life, which is one person every 40 seconds and there are many more people who attempt suicide. Suicide occurs throughout the lifespan and was the second leading cause of death among 25-35 year olds globally in 2016. Hence it is quite clear that suicide is a cause for global concern, so it should be analyzed which are the contributing factors for suicide. Here we have analyzed and visualized the factors affecting the suicide rate in a certain region or country.

The objective of this project is to predict the suicide rates using Machine Learning algorithms and to analyzing significant patterns features that result in increase of suicide rates globally. To see project click here.

Installation

The Code is written in Python 3.6.10. If you don't have Python installed you can find it here. If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip. To install the required packages and libraries, run this command in the project directory after cloning the repository:

pip install -r requirements.txt

Directory Tree

├── pickle
│   ├── label.pkl
│   ├── model.pkl
│   ├── robust.pkl
├── templates
│   ├── index.html
│   ├── styles.css
├── Procfile
├── README.md
├── Suicide Rate Prediction.ipynb
├── app.py
├── requirements.txt
├── suicide_data.csv

Technologies Used

Result

Accuracy of various model used for prediction

ML Model Train Accuracy Test Accuracy Train RMSE Test RMSE
0 Bagging Regression 0.999 0.997 0.240 0.478
1 Random Forest 0.991 0.988 0.903 1.041
2 Gradient Boosted Regression 0.991 0.988 0.925 1.031
3 Decision Tree 0.976 0.969 1.498 1.653
4 Multilayer Perceptron Regression 0.894 0.902 3.144 2.935
5 k-Nearest Neighbors Regression 1.000 0.732 0.000 4.862
6 Linear Regression 0.284 0.274 8.179 8.006
7 Support Vector Regression 0.212 0.207 8.579 8.367

Accuracy of Bagging Regression by changing n_estimators value

image

Conclusion

The final take away form this project is the working of different machine learning models on a dataset and understanding their parameters. Creating this notebook helped me to learn a lot about the parameters of the models, how to tuned them and how they affect the model performance. The final conclusion on the suicide dataset are that the irrespective of age group and generation, male population are more prone to commit suicide than female.

suicide-rate-prediction's People

Contributors

vaibhavbichave avatar

Stargazers

 avatar  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.