Git Product home page Git Product logo

berlin-population-prediction's Introduction

Berlin 2035 Population Prediction with Linear Regression, Polynomial Regression and Long Short-Term Memory

Photo: I took it by SM-A520F.

Problem Statement

The purpose of this study is to predict the population of Berlin in 2035. Population is a very important variable for city regulations and planning. Estimation processes about the population of Berlin, the capital of Germany, in 2035 were created in line with the regression models. Afterwards, the results were compared over the R² values. In addition, the forecast graph was drawn over the LSTM Network.

Dataset

Dataset is downloaded from macrotrends website. Dataset has 3 columns (Year, Population, Annual Change) and 87 rows with the header.

Methodology

In this project, as stated in the title, results were obtained through three different methods. These methods are as respectively listed below:

1. Linear Regression

2. Polynomial Regression

3. Long Short-Term Memory (LSTM)

Analysis

# Column Non-Null Count Dtype
0 date 86 non-null int64
1 Population 86 non-null int64
2 Annual Change 85 non-null float64

Correlation Matrix


Pair Plot


1. Linear Regression

Linear regression population prediction in 2035:

3593846.83239776

Linear regression R² value:

0.6086274988056017


2. Polynomial Regression

2.1. 2nd Order Polynomial Regression

Polinomial regression (degree=2) population prediction in 2035:

3727080.32005322

Polinomial regression (degree=2) R² value:

0.7346609389955037

2.2. 4 th Order Polynomial Regression

Polinomial regression (degree=4) population prediction in 2035:

3596823.26672745

Polinomial regression (degree=4) R² value:

0.825311510724274


3. Long Short-Term Memory (LSTM)

RMS (Difference between actual population prediction and predicted population):

37224.69914068592


Process took 8.878643035888672 seconds.

How to Run Code

Before running the code make sure that you have these libraries:

  • pandas
  • matplotlib
  • seaborn
  • time
  • keras
  • sklearn
  • numpy

Contact Me

If you have something to say to me please contact me:

berlin-population-prediction's People

Contributors

doguilmak avatar

Watchers

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