Current directory: /home3/bjinbymy/public_html/indianext/wp-content/mu-plugins User Submission: How To Make Climate Change Predictions With The Help Of Machine Learning - AI Next
Indianext
No Result
View All Result
Subscribe
  • News
    • Project Watch
    • Policy
  • AI Next
  • People
    • Interviews
    • Profiles
  • Companies
  • Make In India
    • Solutions
    • State News
  • About Us
    • Editors Corner
    • Mission
    • Contact Us
    • Work Culture
  • Events
  • Guest post
  • News
    • Project Watch
    • Policy
  • AI Next
  • People
    • Interviews
    • Profiles
  • Companies
  • Make In India
    • Solutions
    • State News
  • About Us
    • Editors Corner
    • Mission
    • Contact Us
    • Work Culture
  • Events
  • Guest post
No Result
View All Result
Latest News on AI, Healthcare & Energy updates in India
No Result
View All Result
Home AI Next

User Submission: How To Make Climate Change Predictions With The Help Of Machine Learning

May 2, 2022
machine learning

Climate changes have been a concern for scientists for a long time and have been the primary cause of forest fires. Forest fires are uncontrolled that occur naturally in nature. Sometimes it gets severed due to climatic changes. Forest fires are considered one of the most common threats in a forested environment.

They pose a warning to the forest’s vegetation and biodiversity. Forest fires that are unplanned and unexpected are the cause of forest degradation but controlled fire to manage and restrict the spread of forest fires is an action that helps to improve the forest. Forest fires result in an environmental threat.

Below points gives the full explanation-

1. The rise in temperature leads to dry conditions in forests, and mild snow leads to the burning of forests.

2. It makes it further drier and results in the loss of vegetation that acts as fuel for the burn of the forest.

3. It leads to an increase in CO2 concentration in the atmosphere that further increases the temperature.

CSV files downloaded from the website 

Forest fires in Europe (europa.eu)

6075432649Picture1

From the graph, it’s clear that some preventive measures have worked so far since 1980; however, in upcoming years, drought and heatwaves have increased in the central and northern areas of Europe, making them prone to fires.

89593download%20(72)

Total Wildfires –

Total Wildfires and Acres Burned (nifc.gov)

756791231349241Picture1

Objective

The main motive of the article is to show with the help of Auto-regressive Integrated Moving Average (ARIMA) that in the upcoming future, carbon dioxide is increasing and is a threat to the environment.

Time Series Analysis

We can download the data from – GitHub – aster28/Climate.

We will be using Google colab instead of jupyter notebook.

#Import the libraries

import numpy as np

import pandas as pd  import matplotlib.pyplot as plt %matplotlib inline  import math from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from sklearn.preprocessing import MinMaxScaler from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error 
from sklearn.model_selection import train_test_split
import seaborn as sns from IPython.display import SVG from keras.utils.vis_utils import model_to_dot  import itertools import warnings warnings.filterwarnings('ignore')

df1=pd.read_csv('Climate_Change.csv')
df1.info()
85897Picture1

df1.isna().sum()

13348picture5

years = df1[‘Year’].unique()

# Draw Plot

fig, axes = plt.subplots(1, 2, figsize=(35,7), dpi= 80)

sns.boxplot(x=’Year’, y=’Temp’, data=df1, ax=axes[0])

sns.boxplot(x=’Month’, y=’Temp’, data=df1.loc[~df1.Year.isin([1983, 2008]), :])

# Set Title

axes[0].set_title(‘Year-wise Box Plot)’, fontsize=18);

axes[1].set_title(‘Month-wise Box Plot)’, fontsize=18)

plt.show()

12818download%20(83)

df1[‘Date’] = df1[‘Year’].apply(str) + “-” +df1[‘Month’].apply(str)

df1.drop(['Year','Month'], axis=1, inplace=True)
df1
39439Picture2

df1.set_index(‘Date’,inplace=True)

df1.head()

df1.shape

(308,9)

df1.plot(kind=”scatter”,x=”CO2″,y=”Temp”)

df1.plot(kind=”scatter”,x=”N2O”,y=”Temp”)

sns.heatmap(df1.corr())

79166download%20(79)

df1.index

Index(['1983-5', '1983-6', '1983-7', '1983-8', '1983-9', '1983-10', '1983-11',
       '1983-12', '1984-1', '1984-2',
       ...
       '2008-3', '2008-4', '2008-5', '2008-6', '2008-7', '2008-8', '2008-9',
       '2008-10', '2008-11', '2008-12'],
      dtype='object', name='Date', length=308)

plt.figure(figsize=(10,5))

plt.boxplot(df1[‘CO2’])

plt.xlabel(‘Date’)

plt.ylabel(‘CO2’)

plt.title(‘CO2 Label’)

sns.catplot(x=”Year”,y=”Temp”, data=df1, height=5, aspect=3)

Forest fires have been on the rise due to global warming, which has resulted in more severe droughts and more extreme weather occurrences. These fires increase warming and temperature by releasing smoke and carbon into the atmosphere. Fires raging across the Western United States had killed scores of people, burned countless homes, displaced hundreds of thousands of people, and deteriorated air quality when the corona-virus epidemic was poisonous to respiratory health.

plt.plot( df1[‘N2O’], df1[‘Temp’])

plt.title(‘N2O’)

plt.ylabel(‘Temp’);

plt.show()

plt.plot( df1[‘Aerosols’], df1[‘Temp’])

plt.title(‘Aerosols’)

plt.ylabel(‘Temp’);

plt.show();

df1.plot(figsize=(20,10), linewidth=5, fontsize=20)

plt.xlabel(‘Date’, fontsize=20);

N2O and CO2 shows high correlation with Temperature.

Carbon = df1[[‘CO2’]]

Carbon.rolling(12).mean().plot(figsize=(20,10), linewidth=5, fontsize=20)

plt.xlabel(‘Date’, fontsize=20);

nitrous = df1[[‘N2O’]]

nitrous.rolling(12).mean().plot(figsize=(20,10), linewidth=5, fontsize=20)

plt.xlabel(‘Date’, fontsize=20);

df_rm = pd.concat([Carbon.rolling(12).mean(), nitrous.rolling(12).mean()], axis=1)

df_rm.plot(figsize=(20,10), linewidth=5, fontsize=20)

plt.xlabel(‘Date’, fontsize=20);

Time Series Data Seasonal Patterns

Removing the trend from a time series is one approach to thinking about the seasonal components of the data. To get rid of the pattern, subtract the original signal from the trend you calculated before (rolling mean). However, this will determine the number of data points you averaged.

First-order Difference

Carbon.diff().plot(figsize=(20,10), linewidth=5, fontsize=20)

plt.xlabel(‘Date’, fontsize=20);

ARIMA Model Prediction

def adfuller_test(RESULT):
    result=adfuller(df1['CO2'])
    labels = ['ADF Test Statistic','p-value']
    for value,label in zip(result,labels):
        print(label+' : '+str(value) )
    if result[1] <= 0.05:
        print("strong evidence. Data is stationary")
    else:
        print("weak evidence, it is non-stationary ")
adfuller_test(df1['CO2'])
32434Picture2
df1[' First Difference'] = df1['CO2'] - df1['CO2'].shift(1)
df1['Seasonal First Difference']=df1['CO2']-df1['CO2'].shift(12)
adfuller_test(df['Seasonal First Difference'].dropna())

df1[‘Seasonal First Difference’].plot()

20260download%20(59)

from pandas.plotting import autocorrelation_plot

autocorrelation_plot(df1[‘CO2’])

plt.show()

82198download%20(60)

Auto-correlation and Periodicity

If a time series repeats itself at evenly spaced intervals, every 12 months, it is said to be periodic.

The concept of autocorrelation captures the correlation of a time series with such a shifted version of itself.

from statsmodels.graphics.tsaplots import plot_acf,plot_pacf

import statsmodels.api as sm

fig = plt.figure(figsize=(12,8))

ax1 = fig.add_subplot(211)

fig = sm.graphics.tsa.plot_acf(df1[‘Seasonal First Difference’].dropna(),lags=40,ax=ax1)

ax2 = fig.add_subplot(212)

fig = sm.graphics.tsa.plot_pacf(df1[‘Seasonal First Difference’].dropna(),lags=40,ax=ax2)

41552download%20(61)
from statsmodels.tsa.arima_model import ARIMA
import pmdarima as pm
model = pm.auto_arima(df1['CO2'].values, start_p=1, start_q=1,
                      test='adf'                      )
print(model.summary())
6253334949Picture2%20(1)

model.plot_diagnostics(figsize=(7,5))

plt.show()

model = ARIMA(df1[‘CO2’].values, order=(1,0,3))

model_fit = model.fit(disp=0)

model_fit.plot_predict(dynamic=False)

plt.show()

from pmdarima import auto_arima

Total fit time: 27.703 seconds
train = df1['CO2'].iloc[:len(df1['CO2'])-12]
test = df1['CO2'].iloc[len(df1['CO2'])-12:] 
from statsmodels.tsa.statespace.sarimax import SARIMAX
model = SARIMAX(train, 
                order = (3, 1, 0), 
                seasonal_order =(2, 1, 0, 12))

result = model.fit()
result.summary()
Best model:  ARIMA(3,1,0)(2,1,0)[12] 
start = 90
end = 590

predictions = result.predict(start, end
                             ).rename("Predictions")
# plot predictions and actual values
predictions.plot(legend = True)
test.plot(legend = True)

Prediction of N2O

Seasonal first difference

from statsmodels.tsa.arima_model import ARIMA

import pmdarima as pm
model = pm.auto_arima(df1['N2O'].values, start_p=1, start_q=1,
test='adf', 
)
print(model.summary())

model.plot_diagnostics(figsize=(7,5))

plt.show()

model = ARIMA(df1['N2O'].values, order=(2,1,3))
model_fit = model.fit(disp=0)
# Actual vs Fitted
model_fit.plot_predict(dynamic=False)
plt.show()
from pmdarima import auto_arima
result = auto_arima(df1['N2O'], start_p = 1, start_q = 1,
                          )           # set to stepwise
result.summary()
Best model:  ARIMA(3,0,2)(2,1,0)[12] intercept
Total fit time: 128.568 seconds
import warnings
from sklearn.exceptions import ConvergenceWarning
warnings.simplefilter("ignore", category=ConvergenceWarning)
train = df1['N2O'].iloc[:len(df1['N2O'])-12]
test = df1['N2O'].iloc[len(df1['N2O'])-12:] 
from statsmodels.tsa.statespace.sarimax import SARIMAX
model = SARIMAX(train, 
                order = (3, 0, 2), 
                seasonal_order =(2, 1, 0, 12))
result = model.fit()
result.summary()
start = 90
end = 590

predictions = result.predict(start, end
                             ).rename("Predictions")
# plot predictions and actual values
predictions.plot(legend = True)
test.plot(legend = True)

Conclusion

Weather is what we see in our day-to-day life. Sometimes it’s cold, rainy, and sunny at other times. In some places, we must be enjoying winter, and in some others, we must be enjoying summer days. Forest fires are a severe concern all over the continent. No country is immune to it. Increasing population density day by day and changes in land-use patterns pose a growing threat for everyone. These issues get increased by changing climate and weather circumstances. ARIMA predictions show increases in CO2 and N2O in the environment. It affects climate change. An increase in CO2 leads to a dangerous situation for all. Thus proper steps need to be decided. It is a global problem not concerned with one country.

Three Key take away from this article are as follows 

1.Time Series Analysis with the help of ARIMA shows an increase in CO2 and N20.

2.No Continent remains untouched by Climate Changes.

3.The emission of CO2 daily is impacting global warming.

Source: indiaai.gov.in

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Editors Corner

How can Artificial Intelligence tools be a blessing for recruiters?

Will Artificial Intelligence ever match human intelligence?

Artificial Intelligence: Features of peer-to-peer networking

What not to share or ask on Chatgpt?

How can Machine Learning help in detecting and eliminating poverty?

How can Artificial Intelligence help in treating Autism?

Speech Recognition and its Wonders in your corporate life

Most groundbreaking Artificial Intelligence-based gadgets to vouch for in 2023

Recommended News

AI Next

Google: AI From All Perspectives

Alphabet subsidiary Google may have been slower than OpenAI to make its AI capabilities publicly available in the past, but...

by India Next
May 31, 2024
AI Next

US And UK Doctors Think Pfizer Is Setting The Standard For AI And Machine Learning In Drug Discovery

New research from Bryter, which involved over 200 doctors from the US and the UK, including neurologists, hematologists, and oncologists,...

by India Next
May 31, 2024
Solutions

An Agreement Is Signed By MEA, MeitY, And CSC To Offer E-Migration Services Via Shared Service Centers

Three government agencies joined forces to form a synergy in order to deliver eMigrate services through Common Services Centers (CSCs)...

by India Next
May 31, 2024
AI Next

PR Handbook For AI Startups: How To Avoid Traps And Succeed In A Crowded Field

The advent of artificial intelligence has significantly changed the landscape of entrepreneurship. The figures say it all. Global AI startups...

by India Next
May 31, 2024

Related Posts

Google
AI Next

Google: AI From All Perspectives

May 31, 2024
Pfizer
AI Next

US And UK Doctors Think Pfizer Is Setting The Standard For AI And Machine Learning In Drug Discovery

May 31, 2024
Artificial-Intelligence
AI Next

PR Handbook For AI Startups: How To Avoid Traps And Succeed In A Crowded Field

May 31, 2024
openai
AI Next

OpenAI Creates An AI Safety Committee Following Significant Departures

May 31, 2024
Load More
Next Post
AI

AI For Good: Tech In Space To Take On Climate Change

IndiaNext Logo
IndiaNext Brings you latest news on artificial intelligence, Healthcare & Energy sector from all top sources in India and across the world.

Recent Posts

Google: AI From All Perspectives

US And UK Doctors Think Pfizer Is Setting The Standard For AI And Machine Learning In Drug Discovery

An Agreement Is Signed By MEA, MeitY, And CSC To Offer E-Migration Services Via Shared Service Centers

PR Handbook For AI Startups: How To Avoid Traps And Succeed In A Crowded Field

OpenAI Creates An AI Safety Committee Following Significant Departures

Tags

  • AI
  • EV
  • Mental WellBeing
  • Clean Energy
  • TeleMedicine
  • Healthcare
  • Electric Vehicles
  • Artificial Intelligence
  • Chatbots
  • Data Science
  • Electric Vehicles
  • Energy Storage
  • Machine Learning
  • Renewable Energy
  • Green Energy
  • Solar Energy
  • Solar Power

Follow us

  • Facebook
  • Linkedin
  • Twitter
© India Next. All Rights Reserved.     |     Privacy Policy      |      Web Design & Digital Marketing by Heeren Tanna
No Result
View All Result
  • About Us
  • Activate
  • Activity
  • Advisory Council
  • Archive
  • Career Page
  • Companies
  • Contact Us
  • cryptodemo
  • Energy next
  • Energy Next Archive
  • Home
  • Interviews
  • Make in India
  • Market
  • Members
  • Mission
  • News
  • News Update
  • People
  • Policy
  • Privacy Policy
  • Register
  • Reports
  • Subscription Page
  • Technology
  • Top 10
  • Videos
  • White Papers
  • Work Culture
  • Write For Us

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

IndiaNext Logo

Join Our Newsletter

Get daily access to news updates

no spam, we hate it more than you!