SlideShare ist ein Scribd-Unternehmen logo
1 von 26
1
REAL-TIME TIME
SERIES PREDICTION
ON GPU
29th May, 2017
Meir TOLEDANO, Algorithm engineer
meir@anodot.com
2
INTRODUCTION TO ANODOT
3
HOW ANODOT WORKS
4
EXEMPLES OF DETECTED ANOMALIES
DROP IN NUMBER OF SESSIONS ACROSS VARIOUS BROWSERS
5
SELECTED CUSTOMERS
Pedro Silva, Senior product manager,
Credit Karma
“ “It used to take us up to several days to
identify an issue on a specific page, offer,
or service that was draining our revenues.
Anodot identifies when a metric increases
or decreases in real time, so we can
resolve it quickly, before business suffers
or revenue is lost.
6
PREDICTION: INTRODUCTION
7
OVERVIEW
• What I will not talk today:
o Model identification : How to find the model that fit to the observed data
o Estimation : How to find the parameters of the model from de observed data
o Politics, Cinema…
• What I will talk about today:
o I already have a model, how to forecast the future values
• How ?
o I choose a “toy model”
o I will compare two prediction methodologies (mathematics / algorithms)
o I will compare two code implementations (engineering)
8
THE PREDICTION TASK
• Depends of the horizon
• Most of the time we need only the
expectancy
• Prediction error is always useful
• For some use cases, tails are
important.
• The most general case is the
distribution according to time: All
needed values can be easily
computed from the distribution.
9
THE “TOY MODEL”
• For mathematicians: Ornstein-Ulhembeck
• For physicist : Langevin or Einstein model (gas kinetic theory)
• For bankers : Vasicek model (Interest rate model)
• For Anodot ?
Small increment of the
process
Small increment of a Brownian
motion, Gaussian noise
Deterministic part Random part, noise model
10
PREDICTION : THE MONTE-CARLO WAY
11
THE IDEA
• We are discretizing the model continuous model
• Simulate thousands of trajectories with a random number generator
• For each time slice, we are computing the histogram
✓This is a approximation of the distribution if the enough trajectories
12
FROM CONTINOUS TO DISCRETE
Discretization
The autoregressive process,
ARIMA(1, 0, 0)
13
SUMULATION AND HISTOGRAM
The horizon
The horizon
14
RESULTS
15
PREDICTION: THE FOKKER-PLANCK WAY
16
THE IDEA
• From the continuous model we are using the Fokker-Planck theorem.
We are obtaining a partial differential equation (PDE) for the distribution.
• We are solving numerically this equation.
17
PARTIAL DIFFERENTIAL EQUATIONS
• The unknown is a function with more
than one variable
• Its partial derivatives
18
THE MAGIC BRIDGE
Stochastic process, Time series Partial differential equations
Fundamentally random Fundamentally deterministic
Mathematical tools : Stochastic calculus Mathematical tools : Standard analysis
Stochastic process, Time series Partial differential equations
The Fokker-Plank /
Kolmogorov forward
19
NUMERICAL SOLUTION
Discretization
(Euler forward)
20
NUMERICAL RESOLUTION
Discretization
(Euler forward)
21
SOLUTION
22
CPU AND GPU IMPLEMENTATION
23
NUMERICAL RESULTS
CPU GPU
Monte-Carlo 2.78 s
Fokker-Planck 19.20 ms +/- 0.44 ms 4.4 us +/- 3.4 us
145x
4372x ~ 80x (parallel algo ) * 50x hardware
632068 x = 6.3E5 x
State of the art: Implemented in
Facebook prophet and other …
24
PRICE COMPARAISON FOR 1M SERIES
• CPU: AWS On demand, m3.2xlarge, North Virginia , $0.532 per Hour
• GPU: AWS On demand, g2.2xlarge, North Virginia , $0.650 per Hour
CPU (Multithreaded 8 cores) GPU (IO not included)
Monte-Carlo 77094 h = 5859 $
Fokker-Planck 76h = 41 $ 7.31 min , less than 0.1 $ !!!
25
CONCLUSION
• The continuous twin of the AR(1) process is the Ornstein-Ulhembeck process
• How to derive an PDE for the distribution of the process
• The Fokker-Planck method is always faster than Mont-Carlo
• The prediction task is easily parallelizable on GPU
• We break the state of the art by five order of magnitude
26
THANK YOU
Meir TOLEDANO, Algorithm engineer
meir@anodot.com

Weitere ähnliche Inhalte

Ähnlich wie Real-Time time series prediction on GPU

model simulating
model simulatingmodel simulating
model simulatingFEG
 
Real-time time series anomaly detection at scale - KDD2017
Real-time time series anomaly detection at scale - KDD2017Real-time time series anomaly detection at scale - KDD2017
Real-time time series anomaly detection at scale - KDD2017Meir TOLEDANO
 
Planning for power systems
Planning for power systemsPlanning for power systems
Planning for power systemsOlivier Teytaud
 
An introduction to machine learning and statistics
An introduction to machine learning and statisticsAn introduction to machine learning and statistics
An introduction to machine learning and statisticsSpotle.ai
 
Cloudera Data Science Challenge
Cloudera Data Science ChallengeCloudera Data Science Challenge
Cloudera Data Science ChallengeMark Nichols, P.E.
 
Data Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupData Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupDoug Needham
 
Symposium 2019 : Gestion de projet en Intelligence Artificielle
Symposium 2019 : Gestion de projet en Intelligence ArtificielleSymposium 2019 : Gestion de projet en Intelligence Artificielle
Symposium 2019 : Gestion de projet en Intelligence ArtificiellePMI-Montréal
 
Forecasting time series powerful and simple
Forecasting time series powerful and simpleForecasting time series powerful and simple
Forecasting time series powerful and simpleIvo Andreev
 
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...The Art of Intelligence – A Practical Introduction Machine Learning for Orac...
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...Lucas Jellema
 
Barga Data Science lecture 2
Barga Data Science lecture 2Barga Data Science lecture 2
Barga Data Science lecture 2Roger Barga
 
Algorithmic pricing: Forecasting and Pricing
Algorithmic pricing: Forecasting and PricingAlgorithmic pricing: Forecasting and Pricing
Algorithmic pricing: Forecasting and PricingTofigh Naghibi
 
Algo_Lecture01.pptx
Algo_Lecture01.pptxAlgo_Lecture01.pptx
Algo_Lecture01.pptxShaistaRiaz4
 
Optimization of power systems - old and new tools
Optimization of power systems - old and new toolsOptimization of power systems - old and new tools
Optimization of power systems - old and new toolsOlivier Teytaud
 
Tools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power SystemsTools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power SystemsOlivier Teytaud
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models ananth
 
Anomaly detection made easy - Piotr Guzik Allegro
Anomaly detection made easy - Piotr Guzik AllegroAnomaly detection made easy - Piotr Guzik Allegro
Anomaly detection made easy - Piotr Guzik AllegroEvention
 
Anomaly detection made easy
Anomaly detection made easyAnomaly detection made easy
Anomaly detection made easyPiotr Guzik
 
Automatic algorithms for time series forecasting
Automatic algorithms for time series forecastingAutomatic algorithms for time series forecasting
Automatic algorithms for time series forecastingRob Hyndman
 

Ähnlich wie Real-Time time series prediction on GPU (20)

model simulating
model simulatingmodel simulating
model simulating
 
Real-time time series anomaly detection at scale - KDD2017
Real-time time series anomaly detection at scale - KDD2017Real-time time series anomaly detection at scale - KDD2017
Real-time time series anomaly detection at scale - KDD2017
 
Planning for power systems
Planning for power systemsPlanning for power systems
Planning for power systems
 
An introduction to machine learning and statistics
An introduction to machine learning and statisticsAn introduction to machine learning and statistics
An introduction to machine learning and statistics
 
Cloudera Data Science Challenge
Cloudera Data Science ChallengeCloudera Data Science Challenge
Cloudera Data Science Challenge
 
Data Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupData Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup Group
 
Symposium 2019 : Gestion de projet en Intelligence Artificielle
Symposium 2019 : Gestion de projet en Intelligence ArtificielleSymposium 2019 : Gestion de projet en Intelligence Artificielle
Symposium 2019 : Gestion de projet en Intelligence Artificielle
 
Forecasting time series powerful and simple
Forecasting time series powerful and simpleForecasting time series powerful and simple
Forecasting time series powerful and simple
 
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...The Art of Intelligence – A Practical Introduction Machine Learning for Orac...
The Art of Intelligence – A Practical Introduction Machine Learning for Orac...
 
Barga Data Science lecture 2
Barga Data Science lecture 2Barga Data Science lecture 2
Barga Data Science lecture 2
 
Algorithmic pricing: Forecasting and Pricing
Algorithmic pricing: Forecasting and PricingAlgorithmic pricing: Forecasting and Pricing
Algorithmic pricing: Forecasting and Pricing
 
Algo_Lecture01.pptx
Algo_Lecture01.pptxAlgo_Lecture01.pptx
Algo_Lecture01.pptx
 
Optimization of power systems - old and new tools
Optimization of power systems - old and new toolsOptimization of power systems - old and new tools
Optimization of power systems - old and new tools
 
Tools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power SystemsTools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power Systems
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
 
Anomaly detection made easy - Piotr Guzik Allegro
Anomaly detection made easy - Piotr Guzik AllegroAnomaly detection made easy - Piotr Guzik Allegro
Anomaly detection made easy - Piotr Guzik Allegro
 
Anomaly detection made easy
Anomaly detection made easyAnomaly detection made easy
Anomaly detection made easy
 
TD Learning Webinar
TD Learning WebinarTD Learning Webinar
TD Learning Webinar
 
MLOps.pptx
MLOps.pptxMLOps.pptx
MLOps.pptx
 
Automatic algorithms for time series forecasting
Automatic algorithms for time series forecastingAutomatic algorithms for time series forecasting
Automatic algorithms for time series forecasting
 

Kürzlich hochgeladen

DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfchwongval
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 

Kürzlich hochgeladen (20)

DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdf
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 

Real-Time time series prediction on GPU

  • 1. 1 REAL-TIME TIME SERIES PREDICTION ON GPU 29th May, 2017 Meir TOLEDANO, Algorithm engineer meir@anodot.com
  • 4. 4 EXEMPLES OF DETECTED ANOMALIES DROP IN NUMBER OF SESSIONS ACROSS VARIOUS BROWSERS
  • 5. 5 SELECTED CUSTOMERS Pedro Silva, Senior product manager, Credit Karma “ “It used to take us up to several days to identify an issue on a specific page, offer, or service that was draining our revenues. Anodot identifies when a metric increases or decreases in real time, so we can resolve it quickly, before business suffers or revenue is lost.
  • 7. 7 OVERVIEW • What I will not talk today: o Model identification : How to find the model that fit to the observed data o Estimation : How to find the parameters of the model from de observed data o Politics, Cinema… • What I will talk about today: o I already have a model, how to forecast the future values • How ? o I choose a “toy model” o I will compare two prediction methodologies (mathematics / algorithms) o I will compare two code implementations (engineering)
  • 8. 8 THE PREDICTION TASK • Depends of the horizon • Most of the time we need only the expectancy • Prediction error is always useful • For some use cases, tails are important. • The most general case is the distribution according to time: All needed values can be easily computed from the distribution.
  • 9. 9 THE “TOY MODEL” • For mathematicians: Ornstein-Ulhembeck • For physicist : Langevin or Einstein model (gas kinetic theory) • For bankers : Vasicek model (Interest rate model) • For Anodot ? Small increment of the process Small increment of a Brownian motion, Gaussian noise Deterministic part Random part, noise model
  • 10. 10 PREDICTION : THE MONTE-CARLO WAY
  • 11. 11 THE IDEA • We are discretizing the model continuous model • Simulate thousands of trajectories with a random number generator • For each time slice, we are computing the histogram ✓This is a approximation of the distribution if the enough trajectories
  • 12. 12 FROM CONTINOUS TO DISCRETE Discretization The autoregressive process, ARIMA(1, 0, 0)
  • 13. 13 SUMULATION AND HISTOGRAM The horizon The horizon
  • 16. 16 THE IDEA • From the continuous model we are using the Fokker-Planck theorem. We are obtaining a partial differential equation (PDE) for the distribution. • We are solving numerically this equation.
  • 17. 17 PARTIAL DIFFERENTIAL EQUATIONS • The unknown is a function with more than one variable • Its partial derivatives
  • 18. 18 THE MAGIC BRIDGE Stochastic process, Time series Partial differential equations Fundamentally random Fundamentally deterministic Mathematical tools : Stochastic calculus Mathematical tools : Standard analysis Stochastic process, Time series Partial differential equations The Fokker-Plank / Kolmogorov forward
  • 22. 22 CPU AND GPU IMPLEMENTATION
  • 23. 23 NUMERICAL RESULTS CPU GPU Monte-Carlo 2.78 s Fokker-Planck 19.20 ms +/- 0.44 ms 4.4 us +/- 3.4 us 145x 4372x ~ 80x (parallel algo ) * 50x hardware 632068 x = 6.3E5 x State of the art: Implemented in Facebook prophet and other …
  • 24. 24 PRICE COMPARAISON FOR 1M SERIES • CPU: AWS On demand, m3.2xlarge, North Virginia , $0.532 per Hour • GPU: AWS On demand, g2.2xlarge, North Virginia , $0.650 per Hour CPU (Multithreaded 8 cores) GPU (IO not included) Monte-Carlo 77094 h = 5859 $ Fokker-Planck 76h = 41 $ 7.31 min , less than 0.1 $ !!!
  • 25. 25 CONCLUSION • The continuous twin of the AR(1) process is the Ornstein-Ulhembeck process • How to derive an PDE for the distribution of the process • The Fokker-Planck method is always faster than Mont-Carlo • The prediction task is easily parallelizable on GPU • We break the state of the art by five order of magnitude
  • 26. 26 THANK YOU Meir TOLEDANO, Algorithm engineer meir@anodot.com

Hinweis der Redaktion

  1. Multiple Data sources instead of your metrics Sensors,
  2. Add DT, GoEuro