Using Linear and Polynomial Regression to Predict Arctic Sea Ice Extent
By: Noah Alviz
Tags: Arctic Sea Ice, Linear Regression, Polynomial Regression, Arctic Amplification, Machine Learning

BACKGROUND AND INSPIRATION

Arctic amplification is an expression for the rapid warming of the Arctic due to climate change, and is associated with the acceleration of Arctic sea ice melt. From my summer research on this topic, I found that the Fall (SON) season would experience the fastest loss in Arctic sea ice extent. My experience with this internship and the results I discovered about Arctic sea ice loss form the basis of this machine learning project.

OBJECTIVE

The objective of this project is to utilize sci-kit learn’s linear and polynomial regression models to predict Arctic sea ice loss against three input variables: temperature, carbon dioxide (CO2), and methane (CH4).

DATA

For this project, I retrieved time-series data from 1980–2019 (a period of 40 years) for the following variables from the following sources:

Arctic Sea Ice: I accessed monthly sea ice extent data from the National Snow and Ice Data Center. Since we are focusing on the SON season, we only need Sea Ice data for September, October, and November. Sea ice extent refers to the ocean with at least 15% of sea ice, which is measured in millions of square kilometers. The data set spans 1978–2020.

Temperature: Temperature: For this variable, I accessed monthly temperature averages from the National Oceanic and Atmospheric Administration’s (NOAA) National Centers for Environmental Information. I used data from Barrow Airport in Utqiagvik, Alaska (71ºN) to represent Arctic temperatures. Later, we will extract just the SON months of data. Temperature data is originally given in Fahrenheit.

Carbon Dioxide and Methane: Monthly data for these variables were accessed from NOAA’s Global Monitoring Laboratory. We will use global concentrations of CO2 and CH4, which have units of parts per million (ppm) and parts per billion (ppb), respectively. Note: methane data only goes as far back as 1984, so our analysis will start from that point instead of 1980. Later on we will also just extract SON months of data.

METHODOLOGY

My methodology for this project is summarized in three portions:

Loading of data Implementation of Linear Regression Implementation of Polynomial Regression

Loading of Data

First, we will load the temperature, carbon dioxide, methane, and sea ice data we will use. I had cleaned all of the downloaded data beforehand, and saved it into a new comma-separated values (csv) file called “temp_data_cleaned.csv”, “CO2_data_cleaned.csv”, ““CH4_data_cleaned.csv”. I didn’t have to clean the downloaded sea ice data, so those files are called “N_09_extent_v3.0.csv” for September, “N_10_extent_v3.0.csv” for October, and “N_11_extent_v3.0.csv” for November.

After loading each variable, make sure to only extract the months of September, October, and November for every year between 1980–2019 since we are only analyzing the fall season. Note: methane data is the only variable that starts with 1984. You will then take the average of the three months for each year to get Fall season averages.

First we will start with Arctic temperature. Make sure to convert your units from Fahrenheit to Celsius after loading this data.

Next, load global carbon dioxide data:

Now load the global methane data:

Last, load Arctic sea ice extent data:

At this point, we have finished loading all the data! Now, combine all of the variables of extracted data into one csv file. This combined csv is called “SON_temp_gases_ice.csv”. We will use this csv file for my linear and polynomial regression models below:

Implementation of the Linear Regression Model

I will be showing my plots later on in the results section of this article :)

Make sure to call the model from the sklearn library, and begin to load SON_temp_gases_ice.csv from above. Make sure to use df.sort_values to arrange temperature in order from least to greatest. This will help avoid mishaps later on when using polynomial regression. We will also calculate the root mean squared error (RMSE) to measure differences between predicted and observed values.

We will first implement the linear regression model by using 1980–2019 SON average temperatures as our input feature. Arctic sea ice extent will be our target variable for this entire linear regression analysis.

Now we will follow the same procedure as above with carbon dioxide as our input feature:

Now we will follow the same procedure as above with methane as our input feature. Remember when calling sea ice extent, you need to exclude 1980–1984 because “SON_temp_gases_ice.csv” begins at 1980 while CH4 data begins at 1984.

IMPLEMENTATION OF THE POLYNOMIAL REGRESSION MODEL

Now we transition from linear to polynomial regression. I was able to get linear fits that weren’t too bad (which you will see in my results section), but I also wanted to try a polynomial regression to see if we could possibly get an even better fit than the linear regression model.

For this model, I am only using a degree 2 and 3 regression to avoid overfitting. Make sure to call PolynomialFeatures from the sklearn library to implement this model. We also don’t need to extract data from SON_temp_gases_ice.csv again since we already have it called for the linear regression model above.

We will start in the same order again and first use temperature as our input feature. Arctic sea ice extent will be our target variable for this entire polynomial regression analysis.

Now let’s use CO2 as our input feature:

Last, we will use CH4 as our input feature:

With that, I have gone through my entire methodology, from loading the data to implementing linear and polynomial regression models. Now time for the results!

Results

For Linear and Polynomial Regression of SON average temperature vs. Arctic sea ice extent:

Figure 1: Linear Regression of SON averages of Arctic Temperature vs. Arctic Sea Ice Extent (1980–2019)

From figure 1, the fit shows a predicted decrease in Arctic sea ice extent as SON Arctic average temperatures increase. This result makes sense since warmer temperatures are conducive to sea ice melt. The fit to the observed data is not the best due to some variance, but it also isn’t the worst. The calculated RMSE value ended up being 0.558 for this model prediction.

Figure 2: Polynomial Regression of SON averages of Arctic Temperature vs. Arctic Sea Ice Extent (1980–2019)

From figure 2, the polynomial regression model does a better job with predicting Arctic sea ice as average SON temperatures change. The RMSE values equaled 0.390 for the degree 2 polynomial and 0.365 for the degree 3 polynomial, which are clearly lower values than the RMSE for the linear regression model. Had I done a larger degree polynomial, I would have probably experienced overfitting, and the RMSE would not have gotten better.

Figure 3: Linear Regression of SON averages of Global CO2 Concentration vs. Arctic Sea Ice Extent (1980–2019)

From figure 3, the fit of the predicted values is much better than the fit between temperature and Arctic sea ice. The RMSE value for this model is 0.356, which is pretty decent. The data is more linear, and the results suggest that as global averages in CO2 concentrations increase, Arctic sea ice is predicted to decrease. This makes sense because CO2 emissions are contributing to the greenhouse effect, which then leads to global warming and Arctic amplification. In addition, sea ice melt could release even more carbon dioxide, accelerating this feedback loop.

Figure 4: Polynomial Regression of SON averages of Global CO2 Concentration vs. Arctic Sea Ice Extent (1980–2019)

From figure 4, the fit from the degree 2 and 3 polynomials were not improvements from the linear model. Degree 2 had a 0.355 RMSE value and degree 3 had a 0.329 RMSE value. The degree 2 fit looks very similar to the linear model, and the degree 3 only gives a slightly better fit. Any higher degree polynomial would be a worse predictor of Arctic sea ice.

Figure 5: Linear Regression of SON averages of Global CH4 Concentration vs. Arctic Sea Ice Extent (1984–2019)

From figure 5, we also get a relatively decent fit for predicted ice extent values, which are similar to the results shown in figures 1 and 3. The RMSE value we got here was 0.493, which isn’t too bad. These results suggest that as global averages of methane concentration increase, Arctic sea ice extent is predicted to decrease. This makes sense because methane is another large contributor to the greenhouse effect, which would accelerate Arctic amplification and also lead to Arctic sea ice melt. In turn, the sea ice melt may also release more methane into the atmosphere, accelerating this feedback loop.

Figure 6: Polynomial Regression of SON averages of Global CH4 Concentration vs. Arctic Sea Ice Extent (1984–2019)

From figure 6, we get a better fit for predicted ice extent values using the polynomial regression model. We see that the RMSE values of 0.466 for a degree 2 polynomial and 0.395 for a degree 3 polynomial improved from the linear regression RMSE value of 0.493. I noticed that we also get a more curvy degree 3 polynomial prediction line compared to my other analyses. It is interesting to note the slight predicted increase in ice extent between 1650 to 1700 ppb of methane. However, ice extent begins to significantly decline by the time methane concentrations reach 1750.

Conclusion

From this machine learning project, we were able to predict how Arctic sea ice extent changes against input features such as temperature, carbon dioxide, and methane during the 1980–2019 time period. From my models, I found that increases in all three of these input features result in Arctic sea ice extent decline. This makes sense because increased concentrations of carbon dioxide and methane are contributing to anthropogenic climate change, leading to increased temperatures, and a melting of sea ice.

Future Work

If I were to continue this project, I could do these analyses for the other three seasons since this project only focused on the fall (SON) season. In addition, I could do a different experiment where I test my models with temperature as my target variable, with carbon dioxide and methane as my input features. Last, I learned of another machine learning technique called an Auto Regressive Integrated Moving Average (ARIMA). I could possibly use this to predict future Arctic sea ice extent and temperatures, and global carbon dioxide and methane over a time series.

Acknowledgements

Thank you all for reading, and special thanks to Dr. Jacob Bortnik and TA Donglai Ma for teaching me the fundamentals of machine learning!