SlideShare a Scribd company logo
1 of 13
Download to read offline
Social Forecasting
Lecture 4: Neural Networks (II)
Thomas Chadefaux
1
Neural network models
Nonlinear model with one hidden layer
Input #1
Input #2
Input #3
Input #4
Output
Hidden
layer
Input
layer
Output
layer
2
Neural network models
Nonlinear model with one hidden layer
Input #1
Input #2
Input #3
Input #4
Output
Hidden
layer
Input
layer
Output
layer
• A multilayer feed-forward network where each
layer of nodes receives inputs from the previous layers.
• Inputs to each node combined using linear
combination. 2
Neural network models
Inputs to hidden neuron j linearly combined:
zj = bj +
4
X
i=1
wi,jxi .
Modified using nonlinear function such as a sigmoid:
s(z) =
1
1 + e−z
,
This tends to reduce the effect of extreme input values, thus making
the network somewhat robust to outliers.
3
Neural network models
• Weights take random values to begin with, which are then
updated using the observed data.
• There is an element of randomness in the predictions. So the
network is usually trained several times using different random
starting points, and the results are averaged.
• Number of hidden layers, and the number of nodes in each
hidden layer, must be specified in advance.
4
NNAR models
• Lagged values of the time series can be used as
inputs to a neural network.
• NNAR(p, k): p lagged inputs and k nodes in the
single hidden layer.
• NNAR(p, 0) model is equivalent to an
ARIMA(p, 0, 0) model but without stationarity
restrictions.
• Seasonal NNAR(p, P, k): inputs
(yt−1, yt−2, . . . , yt−p, yt−m, yt−2m, yt−Pm) and k
neurons in the hidden layer.
• NNAR(p, P, 0)m model is equivalent to an
ARIMA(p, 0, 0)(P,0,0)m model but without
stationarity restrictions. 5
NNAR models in R
• The nnetar() function fits an NNAR(p, P, k)m
model.
• If p and P are not specified, they are
automatically selected.
6
Sunspots
• Surface of the sun contains magnetic regions that appear as
dark spots.
• These affect the propagation of radio waves and so
telecommunication companies like to predict sunspot activity in
order to plan for any future difficulties.
• Sunspots follow a cycle of length between 9 and 14 years.
7
NNAR(9,5) model for sunspots
fit <- nnetar(sunspotarea)
fit %>% forecast(h=20) %>% autoplot()
0
1000
2000
3000
1900 1950 2000
Time
sunspotarea
Forecasts from NNAR(9,5)
8
Prediction intervals by simulation
fit %>% forecast(h=20, PI=TRUE) %>% autoplot()
0
1000
2000
3000
1900 1950 2000
Time
sunspotarea
Forecasts from NNAR(9,5)
9
Accidental Deaths in the US 1973–1978
Forecasts from NNAR(1,1,2)[12]
1973 1974 1975 1976 1977
7000
8000
9000
10000
11000
10
Accidental Deaths in the US 1973–1978
Include prediction intervals
Forecasts from NNAR(1,1,2)[12]
1973 1974 1975 1976 1977
7000
8000
9000
10000
11000
11
Arima version
Forecasts from ARIMA(0,1,0)(0,1,1)[12]
1973 1974 1975 1976 1977
7000
8000
9000
10000
11000
## [1] 203264.4 12

More Related Content

Similar to lecture5.pdf

Artificial Neural Network in the Design of Rectangular Microstrip Antenna
Artificial Neural Network in the Design of Rectangular Microstrip AntennaArtificial Neural Network in the Design of Rectangular Microstrip Antenna
Artificial Neural Network in the Design of Rectangular Microstrip Antennaaciijournal
 
PR-155: Exploring Randomly Wired Neural Networks for Image Recognition
PR-155: Exploring Randomly Wired Neural Networks for Image RecognitionPR-155: Exploring Randomly Wired Neural Networks for Image Recognition
PR-155: Exploring Randomly Wired Neural Networks for Image RecognitionJinwon Lee
 
Secondary structure prediction
Secondary structure predictionSecondary structure prediction
Secondary structure predictionsamantlalit
 
Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...
Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...
Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...Peter Morovic
 
Analysis and reactive measures on the blackhole attack
Analysis and reactive measures on the blackhole attackAnalysis and reactive measures on the blackhole attack
Analysis and reactive measures on the blackhole attackJyotiVERMA176
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
ECG DENOISING USING NN.pp
ECG DENOISING USING NN.ppECG DENOISING USING NN.pp
ECG DENOISING USING NN.ppbobbydm
 
JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience
JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience
JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience hirokazutanaka
 
Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...
Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...
Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...ijtsrd
 
Acem neuralnetworks
Acem neuralnetworksAcem neuralnetworks
Acem neuralnetworksAastha Kohli
 
Adaptive equalization
Adaptive equalizationAdaptive equalization
Adaptive equalizationKamal Bhatt
 
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...Naoki Shibata
 
Lecture intro to_wcdma
Lecture intro to_wcdmaLecture intro to_wcdma
Lecture intro to_wcdmaGurpreet Singh
 

Similar to lecture5.pdf (20)

Artificial Neural Network in the Design of Rectangular Microstrip Antenna
Artificial Neural Network in the Design of Rectangular Microstrip AntennaArtificial Neural Network in the Design of Rectangular Microstrip Antenna
Artificial Neural Network in the Design of Rectangular Microstrip Antenna
 
PR-155: Exploring Randomly Wired Neural Networks for Image Recognition
PR-155: Exploring Randomly Wired Neural Networks for Image RecognitionPR-155: Exploring Randomly Wired Neural Networks for Image Recognition
PR-155: Exploring Randomly Wired Neural Networks for Image Recognition
 
Secondary structure prediction
Secondary structure predictionSecondary structure prediction
Secondary structure prediction
 
Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...
Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...
Analysis and Compression of Reflectance Data Using An Evolved Spectral Correl...
 
Analysis and reactive measures on the blackhole attack
Analysis and reactive measures on the blackhole attackAnalysis and reactive measures on the blackhole attack
Analysis and reactive measures on the blackhole attack
 
Lec 6-bp
Lec 6-bpLec 6-bp
Lec 6-bp
 
Neural
NeuralNeural
Neural
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
ECG DENOISING USING NN.pp
ECG DENOISING USING NN.ppECG DENOISING USING NN.pp
ECG DENOISING USING NN.pp
 
JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience
JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience
JAISTサマースクール2016「脳を知るための理論」講義04 Neural Networks and Neuroscience
 
Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...
Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...
Mobile Network Coverage Determination at 900MHz for Abuja Rural Areas using A...
 
Advanced Machine Learning
Advanced Machine LearningAdvanced Machine Learning
Advanced Machine Learning
 
rnn BASICS
rnn BASICSrnn BASICS
rnn BASICS
 
Lec10new
Lec10newLec10new
Lec10new
 
lec10new.ppt
lec10new.pptlec10new.ppt
lec10new.ppt
 
Nn devs
Nn devsNn devs
Nn devs
 
Acem neuralnetworks
Acem neuralnetworksAcem neuralnetworks
Acem neuralnetworks
 
Adaptive equalization
Adaptive equalizationAdaptive equalization
Adaptive equalization
 
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...
BalloonNet: A Deploying Method for a Three-Dimensional Wireless Network Surro...
 
Lecture intro to_wcdma
Lecture intro to_wcdmaLecture intro to_wcdma
Lecture intro to_wcdma
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

lecture5.pdf

  • 1. Social Forecasting Lecture 4: Neural Networks (II) Thomas Chadefaux 1
  • 2. Neural network models Nonlinear model with one hidden layer Input #1 Input #2 Input #3 Input #4 Output Hidden layer Input layer Output layer 2
  • 3. Neural network models Nonlinear model with one hidden layer Input #1 Input #2 Input #3 Input #4 Output Hidden layer Input layer Output layer • A multilayer feed-forward network where each layer of nodes receives inputs from the previous layers. • Inputs to each node combined using linear combination. 2
  • 4. Neural network models Inputs to hidden neuron j linearly combined: zj = bj + 4 X i=1 wi,jxi . Modified using nonlinear function such as a sigmoid: s(z) = 1 1 + e−z , This tends to reduce the effect of extreme input values, thus making the network somewhat robust to outliers. 3
  • 5. Neural network models • Weights take random values to begin with, which are then updated using the observed data. • There is an element of randomness in the predictions. So the network is usually trained several times using different random starting points, and the results are averaged. • Number of hidden layers, and the number of nodes in each hidden layer, must be specified in advance. 4
  • 6. NNAR models • Lagged values of the time series can be used as inputs to a neural network. • NNAR(p, k): p lagged inputs and k nodes in the single hidden layer. • NNAR(p, 0) model is equivalent to an ARIMA(p, 0, 0) model but without stationarity restrictions. • Seasonal NNAR(p, P, k): inputs (yt−1, yt−2, . . . , yt−p, yt−m, yt−2m, yt−Pm) and k neurons in the hidden layer. • NNAR(p, P, 0)m model is equivalent to an ARIMA(p, 0, 0)(P,0,0)m model but without stationarity restrictions. 5
  • 7. NNAR models in R • The nnetar() function fits an NNAR(p, P, k)m model. • If p and P are not specified, they are automatically selected. 6
  • 8. Sunspots • Surface of the sun contains magnetic regions that appear as dark spots. • These affect the propagation of radio waves and so telecommunication companies like to predict sunspot activity in order to plan for any future difficulties. • Sunspots follow a cycle of length between 9 and 14 years. 7
  • 9. NNAR(9,5) model for sunspots fit <- nnetar(sunspotarea) fit %>% forecast(h=20) %>% autoplot() 0 1000 2000 3000 1900 1950 2000 Time sunspotarea Forecasts from NNAR(9,5) 8
  • 10. Prediction intervals by simulation fit %>% forecast(h=20, PI=TRUE) %>% autoplot() 0 1000 2000 3000 1900 1950 2000 Time sunspotarea Forecasts from NNAR(9,5) 9
  • 11. Accidental Deaths in the US 1973–1978 Forecasts from NNAR(1,1,2)[12] 1973 1974 1975 1976 1977 7000 8000 9000 10000 11000 10
  • 12. Accidental Deaths in the US 1973–1978 Include prediction intervals Forecasts from NNAR(1,1,2)[12] 1973 1974 1975 1976 1977 7000 8000 9000 10000 11000 11
  • 13. Arima version Forecasts from ARIMA(0,1,0)(0,1,1)[12] 1973 1974 1975 1976 1977 7000 8000 9000 10000 11000 ## [1] 203264.4 12