SlideShare a Scribd company logo
1 of 59
Download to read offline
Data Science | Design | Technology
https://www.meetup.com/DSDTmtl
Sept
29
2021
2
Data Science | Design | Technology
https://www.meetup.com/DSDTmtl
Sept
29
(2021)
Please, don't forget to
mute yourself
JL Maréchaux
DSDT Co-Organizer
(Google)
Christophe Pere
Chief Data Scientist
La Capitale Insurance
https://www.meetup.com/DSDTmtl
Agenda
3:45 - 4:00 Arrival & Networking 
4:00 - 4:15 News & Intro
4:15 - 5:15 Time series in financial domain: A
deep learning approach
5:15 - 5:30: Virtual Snack & Networking
4
DSDT Meetup - Sept 29, 2021
Monthly cadence, on Wednesdays.
Incredible sessions already planned. Contact us with your expectations & ideas.
ML
Validation
Reinforcement
Learning
Explainable
AI
Rodent brain
& NN
Lorem ipsum
Commodo
April 28
May 26 Aug 25
DSDT meetups in 2021
July 21
Your meetup,
your ideas.
http://bit.ly/DSDTsurvey2021
RNN & Time
Series
Sept 29
Sept 28 - Dec 1: The largest Open Innovation
challenge in Canada (cooperathon.ca)
Cooperathon 2021
6
Community & Training Partners
<MTL> Connect, October 12-17
7
mtlconnecte.ca
DSDT Mtl meetup
Pdipiscing elit
322,722 views
DSDT Meetup
Pdipiscing elit
322,722 views
DSDT Meetup
Pdipiscing elit
322,722 views
DSDT
Pdipiscin
322,722
Virtual Meetups
Until we can do in-person events
again in Montreal…
Past (and future) presentations
available on Slideshare.
on slideshare.net/DSDT_MTL
slideshare.net/DSDT_MTL
DSDT Meetups: In-person events
Back to normal soon at Notman House
9
Time series in
financial domain
A deep learning
approach
10
Christophe Pere
Chief Data Scientist
La Capitale Insurance
Picture
Data Science | Design | Technology
Content
11
● Who am I
● Time Series
● RNN Family
● Applications with real data
● Discussion
● Conclusion
● Future
Who am I
- French guy
- PhD in Astrophysics
- Researcher since 2016
- Automotive market
- Autonomous vehicle
- NLP
- Synthetic data (imbalanced data)
- Knowledge Representation
- Reasoning
- Passion for AI
- Passion for Quantum
12
13
When you try to work
on your presentation...
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
14
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
15
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
Ok, but in practice?
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
16
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
2
Čepulionis Paulius, Lukoševičiūtė Kristina Electrocardiogram time series forecasting and optimization using ant colony optimization algorithm.
Mathematical Models in Engineering, Vol. 2, Issue 1, 2016, p. 69-77
Electrocardiogram2
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
17
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
2
https://ionides.github.io/531w16/final_project/Project13/final_project.html
Stock Market2
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
18
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
2
https://www.w3.org/People/Bos/Nice/tempgraph
Temperatures in Nice city, France2
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
19
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
2
https://climate.nasa.gov/vital-signs/carbon-dioxide/
Carbon Dioxide concentration2
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
20
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
Is that all? Could we use other kind of data with another representation of “time”?
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
21
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
Is that all? Could we use other kind of data with another representation of “time”?
What do we call Time ?
Time Series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a
sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights
of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.
22
Wikipedia1
1
https://en.wikipedia.org/wiki/Time_series
Is that all? Could we use other kind of data with another representation of “time”?
What do we call Time ?
Time Series
23
Source: How DNA works, Craig Freudenrich, Ph.D., https://science.howstuffworks.com/life/cellular-microscopic/dna.htm
Time Series - Composition
24
Autocorrelation
Time Series - Composition
25
Seasonality
Time Series - Composition
26
Trend
Movement of a series
(high and low values)
over a long period of
time
Time Series
27
Stationarity
Constant mean
Constant variance
Covariance independent of time
Source: https://towardsdatascience.com/the-complete-guide-to-time-series-analysis-and-forecasting-70d476bfe775
RNN Family
28
Feedforward
Loss
Backpropagation
RNN Family
29
Sequence model
- text
- video
- sound
Persist information
- Memory
- Hidden state
RNN Family
30
Simple RNN
Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/
Advantage:
- Short-term memory
Hidden state
tanh has a range of -1, 1 allows to keep values coherent
RNN Family
31
Simple RNN
Problems:
- Vanishing gradient
- Exploding gradient
- Long memory (only remember the previous output)
Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/
RNN Family
32
Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/
A little bit more complex...
Cell states
Add
Remove informations
Gates
Excellent resource to know how LSTM works
Long Short-Term Memory
(LSTM)
Forget gate
Input
gate
Output
gate
0 or 1, keep
or forget
RNN Family
33
Gated Recurrent Unit
(GRU)
Combines the forget and input gates
into a single “update gate”
Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/
Reset
gate
Update
gate
RNN Family
34
Applications:
- Prediction problems (ex: forecasting)
- Language modelling
- Text Generation
- Machine Translation
- Speech Recognition
- Image description generation
- Video Tagging
- Text summarization
- Call center Analysis
- Face detection
- OCR
- Image Recognition
- Music Generation
- ...
RNN Family - Architectures
35
Classical
neural
network
Music
Generation
Sentiment
analysis
Machine
Translation
Name entity
recognition
Andrej Karpathy, 2015. http://karpathy.github.io/2015/05/21/rnn-effectiveness/
Application
TESLA stock prices
Source: yahoo finance
2015-07-09
2021-09-27
Features
+ Date
Min: 28.73$
Max: 883.09$
Application
TESLA stock prices
Source: yahoo finance
2015-07-09
2021-09-27
Features
+ Date
Min: 28.73$
Max: 883.09$
Train
Test
Application
Forecasting?
How to use the
data?
Tabular
Label
Application
Forecasting?
How to use the
data?
Tabular
Label
Application
Forecasting?
How to use the
data?
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 11
2, 3, 4, 5, 6, 7, 8, 9, 10, 11 12
.
.
.
Process to do for:
- Train
- Test
Window Target
Normalization of data points:
- Subtract the mean computed on the training set
and divide by the standard deviation
Or
- Scale the data between 0 and 1
30 days
Application
Forecasting?
A little bit of code
RNN model
One neuron
Save the best model
Will compute the MAE
Visualization of
the loss for each
epoch
Only this part will change
Application - Results
- First we need a baseline
- Simple neural network (50 neurons)
- Test MAE: 75.24
2021
Real close value
Predict close value
Computed on the denormalized
data
Application - Results
Simple
RNN
Single Stacked Bidirectional
LSTM
Single Stacked Bidirectional
GRU
Single Stacked Bidirectional
Models tested
Variations with
recurrent dropout
have been tested
Application - Results
Application - Results
Application - Results
Application - Results
Application - Results
Application - Results
Application - Results
Prediction with
Prophet1
(Facebook)
- additive model
- modular
regression model
1
https://facebook.github.io/prophet/
Recurrent wrong
pattern
Application - Results
Prediction with
Prophet1
(Facebook)
- additive model
- modular
regression model
1
https://facebook.github.io/prophet/
Recurrent wrong
pattern
Could we
improve it?
Application - Results
Prediction with
Prophet1
(Facebook)
- additive model
- modular
regression model
1
https://facebook.github.io/prophet/
Reducing the
history the
model could
focus on the
extreme part
Discussion/Conclusion
The results show that model complexity does not improve performance.
Training a deep learning model is not simple because it requires hyperparameters
optimization.
The choice of the window size has a strong impact on the performance of the
models.
The data history must be chosen with relevance.
Do not forget the more classical statistical models like ARMA, ARIMA, SARIMA...
It is important to always take a baseline.
Memory models (LSTM, GRU) remain the most efficient in single layer or
bidirectional (only considering Deep Learning).
Stock prices are hard to predict, or even impossible if the market fluctuates too
sharply.
Conclusion
54
Marco Peixeiro, 2019. The Complete Guide to Time Series Analysis and Forecasting.
https://towardsdatascience.com/the-complete-guide-to-time-series-analysis-and-forecasting-70d476bfe775
Future reading
55
→ Comparison between Deep Learning and statistical
approaches
Lara-Benitez & Carranza-Garcia & Riquelme, 2021. An Experimental Review on Deep
Learning Architectures for Time Series Forecasting. ArXiv.
https://arxiv.org/pdf/2103.12057.pdf
Future
56
- Self-Supervised learning
- Quantum Machine Learning
Github
You can access to the notebook, data and presentation here:
- https://github.com/Christophe-pere/DSDT-timeseries-rnn
57
Merci / Thank You
@DsdtMtl
Data Science | Design | Technology
(Check for next DSDT meetup at meetup.com/DSDTmtl)
http://bit.ly/dsdtmtl-in
RNN Family - Architectures
59
CS 230 - Stanford
https://stanford.edu/~shervine/teachin
g/cs-230/cheatsheet-recurrent-neural-
networks

More Related Content

Similar to DSDT Meetup Septembre 2021

Real-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL DatabasesReal-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL DatabasesEugene Dvorkin
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series AnalysisQAware GmbH
 
Time Series Processing with Solr and Spark
Time Series Processing with Solr and SparkTime Series Processing with Solr and Spark
Time Series Processing with Solr and SparkJosef Adersberger
 
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...Lucidworks
 
An introductiontoappliedmultivariateanalysiswithr everit
An introductiontoappliedmultivariateanalysiswithr everitAn introductiontoappliedmultivariateanalysiswithr everit
An introductiontoappliedmultivariateanalysiswithr everitFredy Gomez Gutierrez
 
ACM DEBS 2015: Realtime Streaming Analytics Patterns
ACM DEBS 2015: Realtime Streaming Analytics PatternsACM DEBS 2015: Realtime Streaming Analytics Patterns
ACM DEBS 2015: Realtime Streaming Analytics PatternsSrinath Perera
 
DEBS 2015 Tutorial : Patterns for Realtime Streaming Analytics
DEBS 2015 Tutorial : Patterns for Realtime Streaming AnalyticsDEBS 2015 Tutorial : Patterns for Realtime Streaming Analytics
DEBS 2015 Tutorial : Patterns for Realtime Streaming AnalyticsSriskandarajah Suhothayan
 
The Other HPC: High Productivity Computing
The Other HPC: High Productivity ComputingThe Other HPC: High Productivity Computing
The Other HPC: High Productivity ComputingUniversity of Washington
 
Real-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL Databases Real-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL Databases MongoDB
 
Download-manuals-surface water-waterlevel-40howtocompiledischargedata
 Download-manuals-surface water-waterlevel-40howtocompiledischargedata Download-manuals-surface water-waterlevel-40howtocompiledischargedata
Download-manuals-surface water-waterlevel-40howtocompiledischargedatahydrologyproject001
 
Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...
Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...
Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...Universidad Rey Juan Carlos
 
2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible research2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible researchYannick Wurm
 
Time seriesdb influx
Time seriesdb influxTime seriesdb influx
Time seriesdb influxMauro Rainis
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningMeghaj Mallick
 
Data Science Academy Student Demo day--Michael blecher,the importance of clea...
Data Science Academy Student Demo day--Michael blecher,the importance of clea...Data Science Academy Student Demo day--Michael blecher,the importance of clea...
Data Science Academy Student Demo day--Michael blecher,the importance of clea...Vivian S. Zhang
 
Stream Reasoning: Where we got so far. Oxford 2010.1.18
Stream Reasoning: Where we got so far. Oxford 2010.1.18Stream Reasoning: Where we got so far. Oxford 2010.1.18
Stream Reasoning: Where we got so far. Oxford 2010.1.18Emanuele Della Valle
 

Similar to DSDT Meetup Septembre 2021 (20)

Real-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL DatabasesReal-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL Databases
 
Big Data com Python
Big Data com PythonBig Data com Python
Big Data com Python
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series Analysis
 
Time Series Processing with Solr and Spark
Time Series Processing with Solr and SparkTime Series Processing with Solr and Spark
Time Series Processing with Solr and Spark
 
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
Time Series Processing with Solr and Spark: Presented by Josef Adersberger, Q...
 
An introductiontoappliedmultivariateanalysiswithr everit
An introductiontoappliedmultivariateanalysiswithr everitAn introductiontoappliedmultivariateanalysiswithr everit
An introductiontoappliedmultivariateanalysiswithr everit
 
ACM DEBS 2015: Realtime Streaming Analytics Patterns
ACM DEBS 2015: Realtime Streaming Analytics PatternsACM DEBS 2015: Realtime Streaming Analytics Patterns
ACM DEBS 2015: Realtime Streaming Analytics Patterns
 
DEBS 2015 Tutorial : Patterns for Realtime Streaming Analytics
DEBS 2015 Tutorial : Patterns for Realtime Streaming AnalyticsDEBS 2015 Tutorial : Patterns for Realtime Streaming Analytics
DEBS 2015 Tutorial : Patterns for Realtime Streaming Analytics
 
The Other HPC: High Productivity Computing
The Other HPC: High Productivity ComputingThe Other HPC: High Productivity Computing
The Other HPC: High Productivity Computing
 
Real-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL Databases Real-Time Integration Between MongoDB and SQL Databases
Real-Time Integration Between MongoDB and SQL Databases
 
Download-manuals-surface water-waterlevel-40howtocompiledischargedata
 Download-manuals-surface water-waterlevel-40howtocompiledischargedata Download-manuals-surface water-waterlevel-40howtocompiledischargedata
Download-manuals-surface water-waterlevel-40howtocompiledischargedata
 
Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...
Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...
Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answe...
 
2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible research2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible research
 
Time series.ppt
Time series.pptTime series.ppt
Time series.ppt
 
Time seriesdb influx
Time seriesdb influxTime seriesdb influx
Time seriesdb influx
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
 
A Brief History of Stream Processing
A Brief History of Stream ProcessingA Brief History of Stream Processing
A Brief History of Stream Processing
 
Data Science Academy Student Demo day--Michael blecher,the importance of clea...
Data Science Academy Student Demo day--Michael blecher,the importance of clea...Data Science Academy Student Demo day--Michael blecher,the importance of clea...
Data Science Academy Student Demo day--Michael blecher,the importance of clea...
 
Stream Reasoning: Where we got so far. Oxford 2010.1.18
Stream Reasoning: Where we got so far. Oxford 2010.1.18Stream Reasoning: Where we got so far. Oxford 2010.1.18
Stream Reasoning: Where we got so far. Oxford 2010.1.18
 
Practical Magic with Incanter
Practical Magic with IncanterPractical Magic with Incanter
Practical Magic with Incanter
 

More from DSDT_MTL

DSDT Meetup August 2021
DSDT Meetup August 2021DSDT Meetup August 2021
DSDT Meetup August 2021DSDT_MTL
 
DSDT meetup July 2021
DSDT meetup July 2021DSDT meetup July 2021
DSDT meetup July 2021DSDT_MTL
 
DSDT Meetup May 2021
DSDT Meetup May 2021DSDT Meetup May 2021
DSDT Meetup May 2021DSDT_MTL
 
DSDT Meetup April 2021
DSDT Meetup April 2021DSDT Meetup April 2021
DSDT Meetup April 2021DSDT_MTL
 
DSDT Meetup May 2019
DSDT Meetup May 2019DSDT Meetup May 2019
DSDT Meetup May 2019DSDT_MTL
 
DSDT Meetup March 2019
DSDT Meetup March 2019DSDT Meetup March 2019
DSDT Meetup March 2019DSDT_MTL
 
DSDT Meetup February 2019
DSDT Meetup February 2019DSDT Meetup February 2019
DSDT Meetup February 2019DSDT_MTL
 
DSDT Meetup May 2017
DSDT Meetup May 2017DSDT Meetup May 2017
DSDT Meetup May 2017DSDT_MTL
 
DSDT Meetup July 2017
DSDT Meetup July 2017DSDT Meetup July 2017
DSDT Meetup July 2017DSDT_MTL
 
DSDT Meetup October 2017
DSDT Meetup October 2017DSDT Meetup October 2017
DSDT Meetup October 2017DSDT_MTL
 
DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT_MTL
 
DSDT Meetup January 2018
DSDT Meetup January 2018DSDT Meetup January 2018
DSDT Meetup January 2018DSDT_MTL
 
DSDT Meetup February 2018
DSDT Meetup February 2018DSDT Meetup February 2018
DSDT Meetup February 2018DSDT_MTL
 
DSDT Meetup May 2018
DSDT Meetup May 2018DSDT Meetup May 2018
DSDT Meetup May 2018DSDT_MTL
 
DSDT Meetup June 2018
DSDT Meetup June 2018DSDT Meetup June 2018
DSDT Meetup June 2018DSDT_MTL
 
DSDT Meetup July 2018
DSDT Meetup July 2018DSDT Meetup July 2018
DSDT Meetup July 2018DSDT_MTL
 
DSDT Meetup November 2018
DSDT Meetup November 2018DSDT Meetup November 2018
DSDT Meetup November 2018DSDT_MTL
 

More from DSDT_MTL (17)

DSDT Meetup August 2021
DSDT Meetup August 2021DSDT Meetup August 2021
DSDT Meetup August 2021
 
DSDT meetup July 2021
DSDT meetup July 2021DSDT meetup July 2021
DSDT meetup July 2021
 
DSDT Meetup May 2021
DSDT Meetup May 2021DSDT Meetup May 2021
DSDT Meetup May 2021
 
DSDT Meetup April 2021
DSDT Meetup April 2021DSDT Meetup April 2021
DSDT Meetup April 2021
 
DSDT Meetup May 2019
DSDT Meetup May 2019DSDT Meetup May 2019
DSDT Meetup May 2019
 
DSDT Meetup March 2019
DSDT Meetup March 2019DSDT Meetup March 2019
DSDT Meetup March 2019
 
DSDT Meetup February 2019
DSDT Meetup February 2019DSDT Meetup February 2019
DSDT Meetup February 2019
 
DSDT Meetup May 2017
DSDT Meetup May 2017DSDT Meetup May 2017
DSDT Meetup May 2017
 
DSDT Meetup July 2017
DSDT Meetup July 2017DSDT Meetup July 2017
DSDT Meetup July 2017
 
DSDT Meetup October 2017
DSDT Meetup October 2017DSDT Meetup October 2017
DSDT Meetup October 2017
 
DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT Meetup Nov 2017
DSDT Meetup Nov 2017
 
DSDT Meetup January 2018
DSDT Meetup January 2018DSDT Meetup January 2018
DSDT Meetup January 2018
 
DSDT Meetup February 2018
DSDT Meetup February 2018DSDT Meetup February 2018
DSDT Meetup February 2018
 
DSDT Meetup May 2018
DSDT Meetup May 2018DSDT Meetup May 2018
DSDT Meetup May 2018
 
DSDT Meetup June 2018
DSDT Meetup June 2018DSDT Meetup June 2018
DSDT Meetup June 2018
 
DSDT Meetup July 2018
DSDT Meetup July 2018DSDT Meetup July 2018
DSDT Meetup July 2018
 
DSDT Meetup November 2018
DSDT Meetup November 2018DSDT Meetup November 2018
DSDT Meetup November 2018
 

Recently uploaded

Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 

Recently uploaded (20)

Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 

DSDT Meetup Septembre 2021

  • 1. Data Science | Design | Technology https://www.meetup.com/DSDTmtl Sept 29 2021
  • 2. 2 Data Science | Design | Technology https://www.meetup.com/DSDTmtl Sept 29 (2021) Please, don't forget to mute yourself
  • 3. JL Maréchaux DSDT Co-Organizer (Google) Christophe Pere Chief Data Scientist La Capitale Insurance https://www.meetup.com/DSDTmtl
  • 4. Agenda 3:45 - 4:00 Arrival & Networking  4:00 - 4:15 News & Intro 4:15 - 5:15 Time series in financial domain: A deep learning approach 5:15 - 5:30: Virtual Snack & Networking 4 DSDT Meetup - Sept 29, 2021
  • 5. Monthly cadence, on Wednesdays. Incredible sessions already planned. Contact us with your expectations & ideas. ML Validation Reinforcement Learning Explainable AI Rodent brain & NN Lorem ipsum Commodo April 28 May 26 Aug 25 DSDT meetups in 2021 July 21 Your meetup, your ideas. http://bit.ly/DSDTsurvey2021 RNN & Time Series Sept 29
  • 6. Sept 28 - Dec 1: The largest Open Innovation challenge in Canada (cooperathon.ca) Cooperathon 2021 6 Community & Training Partners
  • 7. <MTL> Connect, October 12-17 7 mtlconnecte.ca
  • 8. DSDT Mtl meetup Pdipiscing elit 322,722 views DSDT Meetup Pdipiscing elit 322,722 views DSDT Meetup Pdipiscing elit 322,722 views DSDT Pdipiscin 322,722 Virtual Meetups Until we can do in-person events again in Montreal… Past (and future) presentations available on Slideshare. on slideshare.net/DSDT_MTL slideshare.net/DSDT_MTL
  • 9. DSDT Meetups: In-person events Back to normal soon at Notman House 9
  • 10. Time series in financial domain A deep learning approach 10 Christophe Pere Chief Data Scientist La Capitale Insurance Picture Data Science | Design | Technology
  • 11. Content 11 ● Who am I ● Time Series ● RNN Family ● Applications with real data ● Discussion ● Conclusion ● Future
  • 12. Who am I - French guy - PhD in Astrophysics - Researcher since 2016 - Automotive market - Autonomous vehicle - NLP - Synthetic data (imbalanced data) - Knowledge Representation - Reasoning - Passion for AI - Passion for Quantum 12
  • 13. 13 When you try to work on your presentation...
  • 14. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 14 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series
  • 15. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 15 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series Ok, but in practice?
  • 16. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 16 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series 2 Čepulionis Paulius, Lukoševičiūtė Kristina Electrocardiogram time series forecasting and optimization using ant colony optimization algorithm. Mathematical Models in Engineering, Vol. 2, Issue 1, 2016, p. 69-77 Electrocardiogram2
  • 17. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 17 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series 2 https://ionides.github.io/531w16/final_project/Project13/final_project.html Stock Market2
  • 18. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 18 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series 2 https://www.w3.org/People/Bos/Nice/tempgraph Temperatures in Nice city, France2
  • 19. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 19 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series 2 https://climate.nasa.gov/vital-signs/carbon-dioxide/ Carbon Dioxide concentration2
  • 20. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 20 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series Is that all? Could we use other kind of data with another representation of “time”?
  • 21. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 21 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series Is that all? Could we use other kind of data with another representation of “time”? What do we call Time ?
  • 22. Time Series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average. 22 Wikipedia1 1 https://en.wikipedia.org/wiki/Time_series Is that all? Could we use other kind of data with another representation of “time”? What do we call Time ?
  • 23. Time Series 23 Source: How DNA works, Craig Freudenrich, Ph.D., https://science.howstuffworks.com/life/cellular-microscopic/dna.htm
  • 24. Time Series - Composition 24 Autocorrelation
  • 25. Time Series - Composition 25 Seasonality
  • 26. Time Series - Composition 26 Trend Movement of a series (high and low values) over a long period of time
  • 27. Time Series 27 Stationarity Constant mean Constant variance Covariance independent of time Source: https://towardsdatascience.com/the-complete-guide-to-time-series-analysis-and-forecasting-70d476bfe775
  • 29. RNN Family 29 Sequence model - text - video - sound Persist information - Memory - Hidden state
  • 30. RNN Family 30 Simple RNN Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/ Advantage: - Short-term memory Hidden state tanh has a range of -1, 1 allows to keep values coherent
  • 31. RNN Family 31 Simple RNN Problems: - Vanishing gradient - Exploding gradient - Long memory (only remember the previous output) Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/
  • 32. RNN Family 32 Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/ A little bit more complex... Cell states Add Remove informations Gates Excellent resource to know how LSTM works Long Short-Term Memory (LSTM) Forget gate Input gate Output gate 0 or 1, keep or forget
  • 33. RNN Family 33 Gated Recurrent Unit (GRU) Combines the forget and input gates into a single “update gate” Source: colah’s blog https://colah.github.io/posts/2015-08-Understanding-LSTMs/ Reset gate Update gate
  • 34. RNN Family 34 Applications: - Prediction problems (ex: forecasting) - Language modelling - Text Generation - Machine Translation - Speech Recognition - Image description generation - Video Tagging - Text summarization - Call center Analysis - Face detection - OCR - Image Recognition - Music Generation - ...
  • 35. RNN Family - Architectures 35 Classical neural network Music Generation Sentiment analysis Machine Translation Name entity recognition Andrej Karpathy, 2015. http://karpathy.github.io/2015/05/21/rnn-effectiveness/
  • 36. Application TESLA stock prices Source: yahoo finance 2015-07-09 2021-09-27 Features + Date Min: 28.73$ Max: 883.09$
  • 37. Application TESLA stock prices Source: yahoo finance 2015-07-09 2021-09-27 Features + Date Min: 28.73$ Max: 883.09$ Train Test
  • 38. Application Forecasting? How to use the data? Tabular Label
  • 39. Application Forecasting? How to use the data? Tabular Label
  • 40. Application Forecasting? How to use the data? 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 11 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 12 . . . Process to do for: - Train - Test Window Target Normalization of data points: - Subtract the mean computed on the training set and divide by the standard deviation Or - Scale the data between 0 and 1 30 days
  • 41. Application Forecasting? A little bit of code RNN model One neuron Save the best model Will compute the MAE Visualization of the loss for each epoch Only this part will change
  • 42. Application - Results - First we need a baseline - Simple neural network (50 neurons) - Test MAE: 75.24 2021 Real close value Predict close value Computed on the denormalized data
  • 43. Application - Results Simple RNN Single Stacked Bidirectional LSTM Single Stacked Bidirectional GRU Single Stacked Bidirectional Models tested Variations with recurrent dropout have been tested
  • 50. Application - Results Prediction with Prophet1 (Facebook) - additive model - modular regression model 1 https://facebook.github.io/prophet/ Recurrent wrong pattern
  • 51. Application - Results Prediction with Prophet1 (Facebook) - additive model - modular regression model 1 https://facebook.github.io/prophet/ Recurrent wrong pattern Could we improve it?
  • 52. Application - Results Prediction with Prophet1 (Facebook) - additive model - modular regression model 1 https://facebook.github.io/prophet/ Reducing the history the model could focus on the extreme part
  • 53. Discussion/Conclusion The results show that model complexity does not improve performance. Training a deep learning model is not simple because it requires hyperparameters optimization. The choice of the window size has a strong impact on the performance of the models. The data history must be chosen with relevance. Do not forget the more classical statistical models like ARMA, ARIMA, SARIMA... It is important to always take a baseline. Memory models (LSTM, GRU) remain the most efficient in single layer or bidirectional (only considering Deep Learning). Stock prices are hard to predict, or even impossible if the market fluctuates too sharply.
  • 54. Conclusion 54 Marco Peixeiro, 2019. The Complete Guide to Time Series Analysis and Forecasting. https://towardsdatascience.com/the-complete-guide-to-time-series-analysis-and-forecasting-70d476bfe775
  • 55. Future reading 55 → Comparison between Deep Learning and statistical approaches Lara-Benitez & Carranza-Garcia & Riquelme, 2021. An Experimental Review on Deep Learning Architectures for Time Series Forecasting. ArXiv. https://arxiv.org/pdf/2103.12057.pdf
  • 56. Future 56 - Self-Supervised learning - Quantum Machine Learning
  • 57. Github You can access to the notebook, data and presentation here: - https://github.com/Christophe-pere/DSDT-timeseries-rnn 57
  • 58. Merci / Thank You @DsdtMtl Data Science | Design | Technology (Check for next DSDT meetup at meetup.com/DSDTmtl) http://bit.ly/dsdtmtl-in
  • 59. RNN Family - Architectures 59 CS 230 - Stanford https://stanford.edu/~shervine/teachin g/cs-230/cheatsheet-recurrent-neural- networks