SlideShare a Scribd company logo
Machine
Learning - VI
Time Series - II
Time Series: Simple Moving Average
Types:
• Simple Moving Averages
• Exponential Moving Averages
A simple moving average is formed by computing the average value of a series over
a specific number of periods.
data("AirPassengers")
View(AirPassengers)
AirPassengers1=AirPassengers
plot(AirPassengers1)
library(TTR)
AirPassengers1_smoothened<- SMA(AirPassengers1,n=8)
#n= number of periods to average over
plot.ts(AirPassengers1_smoothened)
Rupak Roy
Before After
Time Series: Exponential Moving
Exponential Moving Averages:
• The weighting applied to the values depends on the number of
periods in the moving average.
• Further we can do predictive modeling and forecast future time
points with exponential smoothening averages by using HoltWinters()
function.
Rupak Roy
Time Series: Exponential Moving
data("EuStockMarkets")
euro_stocks<-EuStockMarkets
euro_stocks1<-as.data.frame(EuStockMarkets)
euro_stocks2<-euro_stocks1$DAX
#create time series data
eu_stocks_ts3<-ts(euro_stocks2,frequency=12,
start = c(1991,1), end = c(1998))
eu_stocks_ts3
plot(eu_stocks_ts3))
#Log transformation(Reducing the spread of data)
logTimeSeries<-log(eu_stocks_ts3)
plot.ts(logTimeSeries)
#Apply Exponential smoothening average- Holt winters
TimeSeries.exp<-HoltWinters(logTimeSeries,beta=FALSE)
TimeSeries.exp
plot(TimeSeries.exp)
#We can observe the accuracy of the HoltWinters output is very close to the original
values means it is able to predict with high accuracy
Rupak Roy
Time Series: Data smoothening
So exponential data smoothening method is more effective way to
reduce the noise for time series analysis.
TimeSeries.exp$fitted
TimeSeries.exp
Exponential Smoothing is controlled by 3 parameters.
Alpha: displays the estimates
Beta: If False, then the function used exponential smoothing.
Gamma: is the parameter used to display the seasonal component
Rupak Roy
Time Series: Data smoothening
Smoothing Parameters –
The estimated values of alpha, beta and gamma are 0.9, FALSE and
0.45 respectively.
If The value of alpha is relatively low(<0.5) then the estimates of the level
at the current time point is based upon both recent observations.
Beta = FALSE indicates the function will do exponential smoothening.
Gamma = used for the seasonal component. If set to FALSE, an non-
seasonal model is fitted.
If the Gamma Value >0.6, then the estimates of the seasonal
component at the current time point is based upon recent
observations.
TimesSeries.exp$SSE # is the error rate, the lower the value the better the
model is able to predict.
Rupak Roy
Time Series: Data smoothening
Now if we want to predict for say 36 months
library(forecast)
TimeSeriesForecast<-forecast(logTimeSeries,h=36)
plot(TimeSeriesForecast)
Rupak Roy
Next
Understanding the ML algorithms.
Rupak Roy

More Related Content

What's hot

Forcasting methods
Forcasting methodsForcasting methods
Forcasting methods
Robin Saklani
 
Time series analysis
Time series analysisTime series analysis
Time series analysis
Utkarsh Sharma
 
Time Series Analysis - Modeling and Forecasting
Time Series Analysis - Modeling and ForecastingTime Series Analysis - Modeling and Forecasting
Time Series Analysis - Modeling and Forecasting
Maruthi Nataraj K
 
Hrug intro to forecasting
Hrug intro to forecastingHrug intro to forecasting
Hrug intro to forecasting
egoodwintx
 
Intro To Forecasting - Part 2 - HRUG
Intro To Forecasting - Part 2 - HRUGIntro To Forecasting - Part 2 - HRUG
Intro To Forecasting - Part 2 - HRUG
egoodwintx
 
Econometrics
EconometricsEconometrics
Econometrics
QuantUniversity
 
Time series analysis- Part 2
Time series analysis- Part 2Time series analysis- Part 2
Time series analysis- Part 2
QuantUniversity
 
Data Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series ForecastingData Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series Forecasting
Derek Kane
 
Trend and Seasonal Components
Trend and Seasonal ComponentsTrend and Seasonal Components
Trend and Seasonal Components
AnnaRevin
 
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia AnggarestaTrend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
CindyAprilia15
 
Time Series
Time SeriesTime Series
Time Series
yush313
 
Lesson 2 stationary_time_series
Lesson 2 stationary_time_seriesLesson 2 stationary_time_series
Lesson 2 stationary_time_series
ankit_ppt
 
Classical decomposition
Classical decompositionClassical decomposition
Classical decomposition
Azzuriey Ahmad
 
Time series
Time seriesTime series
Time series
Haitham Ahmed
 
Chapter 18 Part I
Chapter 18 Part IChapter 18 Part I
Chapter 18 Part I
Matthew L Levy
 
Adj Exp Smoothing
Adj Exp SmoothingAdj Exp Smoothing
Adj Exp Smoothing
ahmad bassiouny
 
Ecm time series forecast
Ecm time series forecastEcm time series forecast
Ecm time series forecast
Ayapparaj SKS
 
time series analysis
time series analysistime series analysis
time series analysis
SACHIN AWASTHI
 
Deseasonalizing Forecasts
Deseasonalizing ForecastsDeseasonalizing Forecasts
Deseasonalizing Forecasts
ahmad bassiouny
 
Time series Analysis
Time series AnalysisTime series Analysis

What's hot (20)

Forcasting methods
Forcasting methodsForcasting methods
Forcasting methods
 
Time series analysis
Time series analysisTime series analysis
Time series analysis
 
Time Series Analysis - Modeling and Forecasting
Time Series Analysis - Modeling and ForecastingTime Series Analysis - Modeling and Forecasting
Time Series Analysis - Modeling and Forecasting
 
Hrug intro to forecasting
Hrug intro to forecastingHrug intro to forecasting
Hrug intro to forecasting
 
Intro To Forecasting - Part 2 - HRUG
Intro To Forecasting - Part 2 - HRUGIntro To Forecasting - Part 2 - HRUG
Intro To Forecasting - Part 2 - HRUG
 
Econometrics
EconometricsEconometrics
Econometrics
 
Time series analysis- Part 2
Time series analysis- Part 2Time series analysis- Part 2
Time series analysis- Part 2
 
Data Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series ForecastingData Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series Forecasting
 
Trend and Seasonal Components
Trend and Seasonal ComponentsTrend and Seasonal Components
Trend and Seasonal Components
 
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia AnggarestaTrend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
 
Time Series
Time SeriesTime Series
Time Series
 
Lesson 2 stationary_time_series
Lesson 2 stationary_time_seriesLesson 2 stationary_time_series
Lesson 2 stationary_time_series
 
Classical decomposition
Classical decompositionClassical decomposition
Classical decomposition
 
Time series
Time seriesTime series
Time series
 
Chapter 18 Part I
Chapter 18 Part IChapter 18 Part I
Chapter 18 Part I
 
Adj Exp Smoothing
Adj Exp SmoothingAdj Exp Smoothing
Adj Exp Smoothing
 
Ecm time series forecast
Ecm time series forecastEcm time series forecast
Ecm time series forecast
 
time series analysis
time series analysistime series analysis
time series analysis
 
Deseasonalizing Forecasts
Deseasonalizing ForecastsDeseasonalizing Forecasts
Deseasonalizing Forecasts
 
Time series Analysis
Time series AnalysisTime series Analysis
Time series Analysis
 

Similar to Machine Learning - Time Series Part 2

Byungchul Yea (Project)
Byungchul Yea (Project)Byungchul Yea (Project)
Byungchul Yea (Project)
Byung Chul Yea
 
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
Simplilearn
 
Different Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIMLDifferent Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIML
VijaySharma802
 
timeseries cheat sheet with example code for R
timeseries cheat sheet with example code for Rtimeseries cheat sheet with example code for R
timeseries cheat sheet with example code for R
derekjohnson549253
 
Time series modelling arima-arch
Time series modelling  arima-archTime series modelling  arima-arch
Time series modelling arima-arch
jeevan solaskar
 
ARIMA - Statistical Analysis for Data Science
ARIMA - Statistical Analysis for Data ScienceARIMA - Statistical Analysis for Data Science
ARIMA - Statistical Analysis for Data Science
sridhark868747
 
Unit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdfUnit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdf
Sheba41
 
What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?
What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?
What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?
Smarten Augmented Analytics
 
ARIMA Models - [Lab 3]
ARIMA Models - [Lab 3]ARIMA Models - [Lab 3]
ARIMA Models - [Lab 3]
Theodore Grammatikopoulos
 
Dynamic Pricing Of stocks
Dynamic Pricing Of stocksDynamic Pricing Of stocks
Dynamic Pricing Of stocks
parc18
 
Time Series Analysis with R
Time Series Analysis with RTime Series Analysis with R
Time Series Analysis with R
ARCHIT GUPTA
 
working with python
working with pythonworking with python
working with python
bhavesh lande
 
Forecasting exponential smoothing
Forecasting exponential smoothingForecasting exponential smoothing
Forecasting exponential smoothing
Sublaxmi Gupta
 
arimamodel-170204090012.pdf
arimamodel-170204090012.pdfarimamodel-170204090012.pdf
arimamodel-170204090012.pdf
ssuserdca880
 
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptxASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
sunitha1792
 
ICMS_Tax_Collection_Time_Series.pdf
ICMS_Tax_Collection_Time_Series.pdfICMS_Tax_Collection_Time_Series.pdf
ICMS_Tax_Collection_Time_Series.pdf
Guttenberg Ferreira Passos
 
Arima model
Arima modelArima model
Arima model
Jassika
 
Social_Distancing_DIS_Time_Series
Social_Distancing_DIS_Time_SeriesSocial_Distancing_DIS_Time_Series
Social_Distancing_DIS_Time_Series
Guttenberg Ferreira Passos
 
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
Smarten Augmented Analytics
 
LFM Pedersen Calibration - Cappelli
LFM Pedersen Calibration - CappelliLFM Pedersen Calibration - Cappelli
LFM Pedersen Calibration - Cappelli
Joel Cappelli
 

Similar to Machine Learning - Time Series Part 2 (20)

Byungchul Yea (Project)
Byungchul Yea (Project)Byungchul Yea (Project)
Byungchul Yea (Project)
 
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
Time Series Analysis - 2 | Time Series in R | ARIMA Model Forecasting | Data ...
 
Different Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIMLDifferent Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIML
 
timeseries cheat sheet with example code for R
timeseries cheat sheet with example code for Rtimeseries cheat sheet with example code for R
timeseries cheat sheet with example code for R
 
Time series modelling arima-arch
Time series modelling  arima-archTime series modelling  arima-arch
Time series modelling arima-arch
 
ARIMA - Statistical Analysis for Data Science
ARIMA - Statistical Analysis for Data ScienceARIMA - Statistical Analysis for Data Science
ARIMA - Statistical Analysis for Data Science
 
Unit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdfUnit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdf
 
What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?
What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?
What is ARIMA Forecasting and How Can it Be Used for Enterprise Analysis?
 
ARIMA Models - [Lab 3]
ARIMA Models - [Lab 3]ARIMA Models - [Lab 3]
ARIMA Models - [Lab 3]
 
Dynamic Pricing Of stocks
Dynamic Pricing Of stocksDynamic Pricing Of stocks
Dynamic Pricing Of stocks
 
Time Series Analysis with R
Time Series Analysis with RTime Series Analysis with R
Time Series Analysis with R
 
working with python
working with pythonworking with python
working with python
 
Forecasting exponential smoothing
Forecasting exponential smoothingForecasting exponential smoothing
Forecasting exponential smoothing
 
arimamodel-170204090012.pdf
arimamodel-170204090012.pdfarimamodel-170204090012.pdf
arimamodel-170204090012.pdf
 
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptxASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
ASYMTOTIC NOTATIONS BIG O OEMGA THETE NOTATION.pptx
 
ICMS_Tax_Collection_Time_Series.pdf
ICMS_Tax_Collection_Time_Series.pdfICMS_Tax_Collection_Time_Series.pdf
ICMS_Tax_Collection_Time_Series.pdf
 
Arima model
Arima modelArima model
Arima model
 
Social_Distancing_DIS_Time_Series
Social_Distancing_DIS_Time_SeriesSocial_Distancing_DIS_Time_Series
Social_Distancing_DIS_Time_Series
 
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
 
LFM Pedersen Calibration - Cappelli
LFM Pedersen Calibration - CappelliLFM Pedersen Calibration - Cappelli
LFM Pedersen Calibration - Cappelli
 

More from Rupak Roy

Hierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLPHierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLP
Rupak Roy
 
Clustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLPClustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLP
Rupak Roy
 
Network Analysis - NLP
Network Analysis  - NLPNetwork Analysis  - NLP
Network Analysis - NLP
Rupak Roy
 
Topic Modeling - NLP
Topic Modeling - NLPTopic Modeling - NLP
Topic Modeling - NLP
Rupak Roy
 
Sentiment Analysis Practical Steps
Sentiment Analysis Practical StepsSentiment Analysis Practical Steps
Sentiment Analysis Practical Steps
Rupak Roy
 
NLP - Sentiment Analysis
NLP - Sentiment AnalysisNLP - Sentiment Analysis
NLP - Sentiment Analysis
Rupak Roy
 
Text Mining using Regular Expressions
Text Mining using Regular ExpressionsText Mining using Regular Expressions
Text Mining using Regular Expressions
Rupak Roy
 
Introduction to Text Mining
Introduction to Text Mining Introduction to Text Mining
Introduction to Text Mining
Rupak Roy
 
Apache Hbase Architecture
Apache Hbase ArchitectureApache Hbase Architecture
Apache Hbase Architecture
Rupak Roy
 
Introduction to Hbase
Introduction to Hbase Introduction to Hbase
Introduction to Hbase
Rupak Roy
 
Apache Hive Table Partition and HQL
Apache Hive Table Partition and HQLApache Hive Table Partition and HQL
Apache Hive Table Partition and HQL
Rupak Roy
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export
Rupak Roy
 
Introductive to Hive
Introductive to Hive Introductive to Hive
Introductive to Hive
Rupak Roy
 
Scoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMSScoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMS
Rupak Roy
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode
Rupak Roy
 
Introduction to scoop and its functions
Introduction to scoop and its functionsIntroduction to scoop and its functions
Introduction to scoop and its functions
Rupak Roy
 
Introduction to Flume
Introduction to FlumeIntroduction to Flume
Introduction to Flume
Rupak Roy
 
Apache Pig Relational Operators - II
Apache Pig Relational Operators - II Apache Pig Relational Operators - II
Apache Pig Relational Operators - II
Rupak Roy
 
Passing Parameters using File and Command Line
Passing Parameters using File and Command LinePassing Parameters using File and Command Line
Passing Parameters using File and Command Line
Rupak Roy
 
Apache PIG Relational Operations
Apache PIG Relational Operations Apache PIG Relational Operations
Apache PIG Relational Operations
Rupak Roy
 

More from Rupak Roy (20)

Hierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLPHierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLP
 
Clustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLPClustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLP
 
Network Analysis - NLP
Network Analysis  - NLPNetwork Analysis  - NLP
Network Analysis - NLP
 
Topic Modeling - NLP
Topic Modeling - NLPTopic Modeling - NLP
Topic Modeling - NLP
 
Sentiment Analysis Practical Steps
Sentiment Analysis Practical StepsSentiment Analysis Practical Steps
Sentiment Analysis Practical Steps
 
NLP - Sentiment Analysis
NLP - Sentiment AnalysisNLP - Sentiment Analysis
NLP - Sentiment Analysis
 
Text Mining using Regular Expressions
Text Mining using Regular ExpressionsText Mining using Regular Expressions
Text Mining using Regular Expressions
 
Introduction to Text Mining
Introduction to Text Mining Introduction to Text Mining
Introduction to Text Mining
 
Apache Hbase Architecture
Apache Hbase ArchitectureApache Hbase Architecture
Apache Hbase Architecture
 
Introduction to Hbase
Introduction to Hbase Introduction to Hbase
Introduction to Hbase
 
Apache Hive Table Partition and HQL
Apache Hive Table Partition and HQLApache Hive Table Partition and HQL
Apache Hive Table Partition and HQL
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export
 
Introductive to Hive
Introductive to Hive Introductive to Hive
Introductive to Hive
 
Scoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMSScoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMS
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode
 
Introduction to scoop and its functions
Introduction to scoop and its functionsIntroduction to scoop and its functions
Introduction to scoop and its functions
 
Introduction to Flume
Introduction to FlumeIntroduction to Flume
Introduction to Flume
 
Apache Pig Relational Operators - II
Apache Pig Relational Operators - II Apache Pig Relational Operators - II
Apache Pig Relational Operators - II
 
Passing Parameters using File and Command Line
Passing Parameters using File and Command LinePassing Parameters using File and Command Line
Passing Parameters using File and Command Line
 
Apache PIG Relational Operations
Apache PIG Relational Operations Apache PIG Relational Operations
Apache PIG Relational Operations
 

Recently uploaded

Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 

Recently uploaded (20)

Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 

Machine Learning - Time Series Part 2

  • 2. Time Series: Simple Moving Average Types: • Simple Moving Averages • Exponential Moving Averages A simple moving average is formed by computing the average value of a series over a specific number of periods. data("AirPassengers") View(AirPassengers) AirPassengers1=AirPassengers plot(AirPassengers1) library(TTR) AirPassengers1_smoothened<- SMA(AirPassengers1,n=8) #n= number of periods to average over plot.ts(AirPassengers1_smoothened) Rupak Roy Before After
  • 3. Time Series: Exponential Moving Exponential Moving Averages: • The weighting applied to the values depends on the number of periods in the moving average. • Further we can do predictive modeling and forecast future time points with exponential smoothening averages by using HoltWinters() function. Rupak Roy
  • 4. Time Series: Exponential Moving data("EuStockMarkets") euro_stocks<-EuStockMarkets euro_stocks1<-as.data.frame(EuStockMarkets) euro_stocks2<-euro_stocks1$DAX #create time series data eu_stocks_ts3<-ts(euro_stocks2,frequency=12, start = c(1991,1), end = c(1998)) eu_stocks_ts3 plot(eu_stocks_ts3)) #Log transformation(Reducing the spread of data) logTimeSeries<-log(eu_stocks_ts3) plot.ts(logTimeSeries) #Apply Exponential smoothening average- Holt winters TimeSeries.exp<-HoltWinters(logTimeSeries,beta=FALSE) TimeSeries.exp plot(TimeSeries.exp) #We can observe the accuracy of the HoltWinters output is very close to the original values means it is able to predict with high accuracy Rupak Roy
  • 5. Time Series: Data smoothening So exponential data smoothening method is more effective way to reduce the noise for time series analysis. TimeSeries.exp$fitted TimeSeries.exp Exponential Smoothing is controlled by 3 parameters. Alpha: displays the estimates Beta: If False, then the function used exponential smoothing. Gamma: is the parameter used to display the seasonal component Rupak Roy
  • 6. Time Series: Data smoothening Smoothing Parameters – The estimated values of alpha, beta and gamma are 0.9, FALSE and 0.45 respectively. If The value of alpha is relatively low(<0.5) then the estimates of the level at the current time point is based upon both recent observations. Beta = FALSE indicates the function will do exponential smoothening. Gamma = used for the seasonal component. If set to FALSE, an non- seasonal model is fitted. If the Gamma Value >0.6, then the estimates of the seasonal component at the current time point is based upon recent observations. TimesSeries.exp$SSE # is the error rate, the lower the value the better the model is able to predict. Rupak Roy
  • 7. Time Series: Data smoothening Now if we want to predict for say 36 months library(forecast) TimeSeriesForecast<-forecast(logTimeSeries,h=36) plot(TimeSeriesForecast) Rupak Roy
  • 8. Next Understanding the ML algorithms. Rupak Roy