Skip to content

javadfarshchi/Climate-Change-Prediction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project description

In this project, I want to estimate what would be the result of the climate change policies to mitigate the consequences of the increase in the atmosphere average temperature. It is believed that carbond dioxide emission is the main reason that the average temperature of the atmosphere increase up to 0.8 C compared to the situation without human-related carbon emission. I collected the data for carbon emission from here and data for average atmosphere temeprature from here. The following figures show the carbon dioxide emission and increase in the world temperature in different years. As shown, the increase in world temperature is highly correlated with the CO2 emission:




As such, I used a time-series model accounting for CO2 emission as an exogenious variable to predict the temprature increase. In summary, I did the following steps during this project based on the data that I had:

  1. I preprocess the data that I have obtained from two different sources.
  2. I fit two different LSTM-based recurrent neural network models to fit the part of the data chosen for training.
  3. I compare the results of model predictions for the test data based on different hyperparameter values and model architecture and select the optimal hyperparameter value
  4. I use the optimal model to predict what will be the world temperature in 2030 if the Paris agreement goals are met (i.e., decrease the annual CO2 emission 2 Gt per year).


First LSTM-based RNN Model

The architecture for the first kind of LSTM-based neural network is shown in the following Figure. As shown, we only use the outputs of the LSTM unit corresponding to the last time step.


We train the RNN model using different sequence lengths for the inputs to find the optimal sequence length. For each model training, I obtained mean squared error of the predictions for the test dataset and divided that by the mean absoloute values of the test dataset to report the percentage of the error. The results are shown in the following table. Note that because the results from model training change from run to run, I trained each model with especfic sequence length four times and reported the avarage value of model accuracy for the test dataset in the table. I will compare the results in the following table with those results that I will obtained when I use a different RNN architecture to decide which architecture is more oppropriate to use. You can find the code for these implementations here.

Number of Inputs MSE for Test Dataset
30 79.59
20 16.52
10 23.22
5 75.5

Second LSTM-based RNN Model

The architecture of the second type of the RNN model is shown in the following. As shown, with the current model, we use a maxpooling layer to collect the information from all the LSTM layers. By doing so, the model is more capable of accounting for the earlier values in the sequence.

To decide what should be the appropriate dimension of the input sequence, I run LSTM-based estimation using different length for the input sequence and based on higher prediction ability of the model for the test data, I chose the appropriate sequence length. Note that, since the results are stochastic and can vary from run to run, I ran the model fitting step four times and decided based on the average values of the four data. The average values are provided in the following figure. You can find the code for these implementations here.

Number of Inputs MSE for Test Dataset
30 8.92
20 11.29
10 4.93
5 16.8

Comparing the results from two tables showed that the second RNN architecture is better to be used with a sequence length of ten. The folowing figure shows the predicted values of temperature increase using the second architecture with the input length of 10 in different years using LSTM-based neural networks compared to the training data:


The following data also shows the test data set vs. the corresponding predictions for the test data set:


Prediction of Atmoshere Temperature if Paris Agreement is Followed

Even with decreasing 2 bilion tone CO2 emission, the atmosphere temperature will go up to arround 1.5. This is the results that have been cofirmed using my model (see the following):

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 71.8%
  • CSS 28.2%