SlideShare a Scribd company logo
Change	
  Point	
  Detec.on	
  
with	
  Bayesian	
  Inference	
  
By	
  Frank	
  Kelly	
  
Py	
  data	
  
6th	
  January	
  2015	
  
Overview	
  
•  Nigeria,	
  oil	
  wells	
  &	
  drilling	
  
•  Noisy	
  data	
  
•  Some	
  maths	
  
•  Python	
  implementaDon	
  
•  Examples	
  in	
  different	
  domains	
  
FPSO	
  (oil	
  plaIorm	
  picture)	
  
Mud	
  pulse	
  telemetry	
  
•  InformaDon	
  
encoded	
  digitally,	
  
transmiOed	
  via	
  
pressure	
  pulses	
  
through	
  mud	
  fluid.	
  
•  Alert	
  drillers	
  that	
  
they	
  have	
  reached	
  
oil,	
  detect	
  rock	
  types	
  
and	
  general	
  
monitoring.	
  
The	
  problem	
  
•  Poor	
  bit	
  rate	
  and	
  
resoluDon	
  
•  Time	
  consuming	
  
analysis	
  
Approaches	
  to	
  staDsDcs	
  
•  FrequenDst	
  
– Data	
  gathered	
  is	
  a	
  
repeatable	
  random	
  
sample.	
  “Frequency”	
  
– Underlying	
  
parameters	
  are	
  
constant	
  
– Fisher’s	
  0.05	
  
•  Bayesian	
  
– Data	
  are,	
  fixed	
  and	
  
observed	
  from	
  the	
  
realised	
  sample	
  
– Parameters	
  unknown	
  
and	
  described	
  
probabilisDcally	
  
– Introduce	
  
“subjecDvity”	
  
	
  
FrequenDst	
  vs.	
  Bayesian	
  
The	
  Theory:	
  Bayesian	
  inference	
  
•  Methodology	
  of	
  mathemaDcal	
  inference:	
  	
  
–  Choosing	
  between	
  several	
  possible	
  models	
  
–  ExtracDng	
  parameters	
  for	
  these	
  models	
  
•  Bayes’	
  Theorem:	
  
Rev	
  Thomas	
  Bayes	
  1702	
  
-­‐	
  1761	
  
p(w | D) =
p(D | w)p(w)
p(D)
Likelihood	
  
Prior	
  
Probability	
  
Posterior	
  
Probability	
   Evidence	
  
-­‐  Remove	
  nuisance	
  
parameters	
  by	
  
marginalisaDon	
  
-­‐  InteresDng	
  ones	
  
remain	
  
Modelling	
  the	
  problem	
  
µ2
1µ
m
N
0	
   20	
   40	
   60	
   80	
   100	
   120	
   140	
   160	
   180	
   200	
  
0.5	
  
1	
  
1.5	
  
2	
  
2.5	
  
data	
  =	
  model	
  +	
  noise	
  
	
  
•  a	
  sequence	
  of	
  N	
  
samples	
  of	
  data	
  
from	
  a	
  piecewise	
  
constant	
  source	
  
with	
  added	
  
Gaussian	
  noise.	
  
•  Noise	
  independent	
  
of	
  mean,	
  idenDcally	
  
distributed	
  and	
  S.D.	
  
=	
  σ	
  
•  Heterogenous:	
  
divide	
  into	
  two	
  
homogenous	
  
segments	
  
µ2
⎩
⎨
⎧
+
+
=
i
i
i
e
e
d
2
1
µ
µ
Nim
mi
≤<
≤
1µ
Nm
Single	
  changepoint	
  detector:	
  
How	
  does	
  it	
  work?	
  
	
  
•  SubsDtute	
  likelihood	
  into	
  Bayes’ Law	
  
–  Simple	
  model-­‐	
  consider	
  Ockham’s	
  Razor	
  
•  Interested	
  in	
  changepoint	
  locaDon	
  m,	
  integrate	
  w.r.t.	
  the	
  
nuisance	
  parameters	
  (µ1,	
  µ2	
  and	
  σ)…rearrange	
  this…	
  
•  …get	
  a	
  BIG	
  expression	
  for	
  p({m}|dI),	
  code	
  in	
  Python	
  
•  On	
  running	
  obtain	
  most	
  likely	
  changepoint	
  locaDon	
  
Ockham’s	
  razor:	
  
hOp://www.jstor.org/discover/10.2307/29774559?sid=21105568247973&uid=3738032&uid=4&uid=2	
  	
  
The	
  maths	
  
More	
  maths	
  
•  Integrate	
  w.r.t.	
  (and	
  thereby	
  remove)	
  
nuisance	
  parameters	
  
Other	
  applicaDons…	
  
hOp://moz.com/google-­‐algorithm-­‐change	
  
“Google’s	
  algorithm	
  is	
  the	
  “secret	
  sauce	
  recipe”	
  that	
  has	
  enabled	
  it	
  to	
  dominate	
  search.”	
  	
  
	
  
-­‐	
  FT.com	
  16th	
  Sept	
  2014	
  
hOp://www.p.com/cms/s/0/9615661c-­‐3ce1-­‐11e4-­‐9733-­‐00144feabdc0.html?
siteediDon=uk#axzz3DSwXYAW8	
  
Any	
  business	
  with	
  an	
  online	
  presence	
  today	
  open	
  struggles	
  to	
  accurately	
  evaluate:	
  	
  
	
  
●	
  The	
  quality	
  of	
  their	
  website	
  and	
  associated	
  linking	
  pages,	
  as	
  perceived	
  by	
  Google	
  
	
  
●	
  The	
  robustness	
  of	
  their	
  website	
  to	
  a	
  sudden	
  change	
  in	
  Google’s	
  search	
  algorithm	
  
Web	
  traffic	
  
30000	
  
35000	
  
40000	
  
45000	
  
50000	
  
55000	
  
60000	
  
raw	
  daily	
  google	
  search-­‐sourced	
  pageviews	
  
Web	
  traffic	
  (2)	
  
30000	
  
35000	
  
40000	
  
45000	
  
50000	
  
55000	
  
60000	
  
smoothed	
  data	
  using	
  moving	
  average	
  
Web	
  traffic	
  (3)	
  
30000	
  
35000	
  
40000	
  
45000	
  
50000	
  
55000	
  
60000	
  
smoothed	
  data	
  with	
  cyclicality	
  removed	
  
Web	
  traffic	
  (4)	
  
-­‐838	
  
-­‐837.5	
  
-­‐837	
  
-­‐836.5	
  
-­‐836	
  
-­‐835.5	
  
-­‐835	
  
-­‐834.5	
  
-­‐834	
  
-­‐833.5	
  
-­‐833	
  
30000	
  
35000	
  
40000	
  
45000	
  
50000	
  
55000	
  
60000	
  
likelihood	
  of	
  change	
  in	
  data	
  plo>ed	
  over	
  .me	
  
day	
  removed	
   likelihood	
  CP	
  
number	
  of	
  tropical	
  storms	
  per	
  year	
  in	
  the	
  North	
  AtlanDc	
  
Data	
  obtained	
  from	
  ibtracs	
  database:	
  
hOps://www.ncdc.noaa.gov/ibtracs/	
  
"Amo	
  Dmeseries	
  1856-­‐present"	
  by	
  Rosentod,	
  Marsupilami	
  -­‐	
  hOp://www.cdc.noaa.gov/CorrelaDon/amon.us.long.data.	
  Licensed	
  under	
  Public	
  
Domain	
  via	
  Wikimedia	
  Commons	
  -­‐	
  hOp://commons.wikimedia.org/wiki/File:Amo_Dmeseries_1856-­‐present.svg#mediaviewer/
File:Amo_Dmeseries_1856-­‐present.svg	
  
Other	
  applicaDons	
  /	
  possibiliDes	
  
•  Financial	
  markets	
  and	
  poliDcal	
  events	
  
•  Combine	
  with	
  frequenDst	
  staDcal	
  methods:	
  
– Use	
  of	
  GLR	
  in	
  online	
  (moving	
  window)	
  detecDon	
  
applicaDon	
  
•  Your	
  own	
  data/	
  ideas	
  !	
  
Thank	
  you	
  
•  Link	
  to	
  Python	
  code	
  on	
  github:	
  
hOps://github.com/swhustla/pydata-­‐bayes-­‐changepoint	
  	
  
–  Single	
  changepoint	
  detector	
  (as	
  seen	
  tonight)	
  
–  Dual	
  changepoint	
  detector	
  
–  Ramp	
  detector	
  
•  Further	
  reading:	
  
–  Numerical	
  Bayesian	
  Methods	
  Applied	
  to	
  Signal	
  Processing	
  
(StaDsDcs	
  and	
  CompuDng)	
  by	
  Fitzgerald,	
  O’Ruanaidh,	
  1996	
  :	
  
hOp://www.amazon.co.uk/Numerical-­‐Bayesian-­‐Processing-­‐
StaDsDcs-­‐CompuDng/dp/0387946292	
  	
  	
  
–  Bayesian	
  Inference	
  on	
  Change	
  Point	
  Problems	
  (2007)
hOp://www.cs.ubc.ca/~murphyk/Students/Xuan_MSc07.pdf	
  	
  
	
  
TwiOer:	
  @norhustla	
  
Email:	
  frank.kelly@cantab.net	
  
Thank	
  you	
  
•  AddiDonal	
  links:	
  
–  Google	
  Algo	
  updates:	
  	
  hOp://moz.com/google-­‐algorithm-­‐change	
  	
  
–  Mathsight	
  -­‐>	
  insights	
  into	
  algorithm	
  changes	
  hOp://mathsight.org	
  	
  
–  AtlanDc	
  mulD-­‐decadal	
  oscillaDon	
  spaDal	
  paOern:
hOp://commons.wikimedia.org/wiki/File:AMO_PaOern.png	
  
–  NaDonal	
  climaDc	
  data	
  center	
  hOps://www.ncdc.noaa.gov/ibtracs/	
  	
  
–  Ockham’s	
  Razor	
  and	
  Bayesian	
  Inference:	
  
hOp://www.jstor.org/discover/10.2307/29774559?
sid=21105568247973&uid=3738032&uid=4&uid=2	
  
–  ConverDng	
  from	
  Matlab	
  to	
  Python:	
  
hOp://mathesaurus.sourceforge.net/matlab-­‐numpy.html	
  	
  
	
  
TwiOer:	
  @norhustla	
  
Email:	
  frank.kelly@cantab.net	
  

More Related Content

What's hot

Module 3: Linear Regression
Module 3:  Linear RegressionModule 3:  Linear Regression
Module 3: Linear RegressionSara Hooker
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networksSi Haem
 
Deep learning: Overfitting , underfitting, and regularization
Deep learning: Overfitting , underfitting, and regularizationDeep learning: Overfitting , underfitting, and regularization
Deep learning: Overfitting , underfitting, and regularizationAly Abdelkareem
 
Representation learning on graphs
Representation learning on graphsRepresentation learning on graphs
Representation learning on graphsDeakin University
 
Feature Engineering
Feature Engineering Feature Engineering
Feature Engineering odsc
 
Interpretable machine learning
Interpretable machine learningInterpretable machine learning
Interpretable machine learningSri Ambati
 
The Gaussian Process Latent Variable Model (GPLVM)
The Gaussian Process Latent Variable Model (GPLVM)The Gaussian Process Latent Variable Model (GPLVM)
The Gaussian Process Latent Variable Model (GPLVM)James McMurray
 
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai UniversityMadhav Mishra
 
Dimensionality reduction
Dimensionality reductionDimensionality reduction
Dimensionality reductionShatakirti Er
 
Fighting financial fraud at Danske Bank with artificial intelligence
Fighting financial fraud at Danske Bank with artificial intelligenceFighting financial fraud at Danske Bank with artificial intelligence
Fighting financial fraud at Danske Bank with artificial intelligenceRon Bodkin
 
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...Edureka!
 
Recurrent and Recursive Nets (part 2)
Recurrent and Recursive Nets (part 2)Recurrent and Recursive Nets (part 2)
Recurrent and Recursive Nets (part 2)sohaib_alam
 
Classification
ClassificationClassification
ClassificationCloudxLab
 
Causal discovery and prediction mechanisms
Causal discovery and prediction mechanismsCausal discovery and prediction mechanisms
Causal discovery and prediction mechanismsShiga University, RIKEN
 
Independent Component Analysis
Independent Component AnalysisIndependent Component Analysis
Independent Component AnalysisTatsuya Yokota
 

What's hot (20)

Module 3: Linear Regression
Module 3:  Linear RegressionModule 3:  Linear Regression
Module 3: Linear Regression
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
 
Deep learning: Overfitting , underfitting, and regularization
Deep learning: Overfitting , underfitting, and regularizationDeep learning: Overfitting , underfitting, and regularization
Deep learning: Overfitting , underfitting, and regularization
 
Data discretization
Data discretizationData discretization
Data discretization
 
Representation learning on graphs
Representation learning on graphsRepresentation learning on graphs
Representation learning on graphs
 
Feature Engineering
Feature Engineering Feature Engineering
Feature Engineering
 
Interpretable machine learning
Interpretable machine learningInterpretable machine learning
Interpretable machine learning
 
The Gaussian Process Latent Variable Model (GPLVM)
The Gaussian Process Latent Variable Model (GPLVM)The Gaussian Process Latent Variable Model (GPLVM)
The Gaussian Process Latent Variable Model (GPLVM)
 
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
 
Dimensionality reduction
Dimensionality reductionDimensionality reduction
Dimensionality reduction
 
Change Point Analysis
Change Point AnalysisChange Point Analysis
Change Point Analysis
 
Fighting financial fraud at Danske Bank with artificial intelligence
Fighting financial fraud at Danske Bank with artificial intelligenceFighting financial fraud at Danske Bank with artificial intelligence
Fighting financial fraud at Danske Bank with artificial intelligence
 
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
 
Intepretability / Explainable AI for Deep Neural Networks
Intepretability / Explainable AI for Deep Neural NetworksIntepretability / Explainable AI for Deep Neural Networks
Intepretability / Explainable AI for Deep Neural Networks
 
Sequence models
Sequence modelsSequence models
Sequence models
 
Recurrent and Recursive Nets (part 2)
Recurrent and Recursive Nets (part 2)Recurrent and Recursive Nets (part 2)
Recurrent and Recursive Nets (part 2)
 
Xgboost
XgboostXgboost
Xgboost
 
Classification
ClassificationClassification
Classification
 
Causal discovery and prediction mechanisms
Causal discovery and prediction mechanismsCausal discovery and prediction mechanisms
Causal discovery and prediction mechanisms
 
Independent Component Analysis
Independent Component AnalysisIndependent Component Analysis
Independent Component Analysis
 

Similar to Changepoint Detection with Bayesian Inference

Meteo I/O Introduction
Meteo I/O IntroductionMeteo I/O Introduction
Meteo I/O IntroductionRiccardo Rigon
 
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...Cheng Chen
 
"Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler...
"Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler..."Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler...
"Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler...Dataconomy Media
 
flat_presentation_time_evolving_OD_matrix_estimation
flat_presentation_time_evolving_OD_matrix_estimationflat_presentation_time_evolving_OD_matrix_estimation
flat_presentation_time_evolving_OD_matrix_estimationLuís Moreira-Matias
 
"Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler...
"Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler..."Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler...
"Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler...Dataconomy Media
 
ODSC 2019: Sessionisation via stochastic periods for root event identification
ODSC 2019: Sessionisation via stochastic periods for root event identificationODSC 2019: Sessionisation via stochastic periods for root event identification
ODSC 2019: Sessionisation via stochastic periods for root event identificationKuldeep Jiwani
 
5.1 mining data streams
5.1 mining data streams5.1 mining data streams
5.1 mining data streamsKrish_ver2
 
Christian jensen advanced routing in spatial networks using big data
Christian jensen advanced routing in spatial networks using big dataChristian jensen advanced routing in spatial networks using big data
Christian jensen advanced routing in spatial networks using big datajins0618
 
Combining remote sensing earth observations and in situ networks: detection o...
Combining remote sensing earth observations and in situ networks: detection o...Combining remote sensing earth observations and in situ networks: detection o...
Combining remote sensing earth observations and in situ networks: detection o...Integrated Carbon Observation System (ICOS)
 
Evaluating Classification Algorithms Applied To Data Streams Esteban Donato
Evaluating Classification Algorithms Applied To Data Streams   Esteban DonatoEvaluating Classification Algorithms Applied To Data Streams   Esteban Donato
Evaluating Classification Algorithms Applied To Data Streams Esteban DonatoEsteban Donato
 
Alerting mechanism and algorithms introduction
Alerting mechanism and algorithms introductionAlerting mechanism and algorithms introduction
Alerting mechanism and algorithms introductionFEG
 
Approximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming ApplicationsApproximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming ApplicationsDebasish Ghosh
 
Big&open data challenges for smartcity-PIC2014 Shanghai
Big&open data challenges for smartcity-PIC2014 ShanghaiBig&open data challenges for smartcity-PIC2014 Shanghai
Big&open data challenges for smartcity-PIC2014 ShanghaiVictoria López
 
A multi-sensor based uncut crop edge detection method for head-feeding combin...
A multi-sensor based uncut crop edge detection method for head-feeding combin...A multi-sensor based uncut crop edge detection method for head-feeding combin...
A multi-sensor based uncut crop edge detection method for head-feeding combin...Institute of Agricultural Machinery, NARO
 
A Study on Privacy Level in Publishing Data of Smart Tap Network
A Study on Privacy Level in Publishing Data of Smart Tap NetworkA Study on Privacy Level in Publishing Data of Smart Tap Network
A Study on Privacy Level in Publishing Data of Smart Tap NetworkHa Phuong
 
Object Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic TechniquesObject Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic TechniquesVasuhiSamydurai1
 

Similar to Changepoint Detection with Bayesian Inference (20)

Meteo I/O Introduction
Meteo I/O IntroductionMeteo I/O Introduction
Meteo I/O Introduction
 
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
 
"Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler...
"Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler..."Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler...
"Quantum Clustering - Physics Inspired Clustering Algorithm", Sigalit Bechler...
 
flat_presentation_time_evolving_OD_matrix_estimation
flat_presentation_time_evolving_OD_matrix_estimationflat_presentation_time_evolving_OD_matrix_estimation
flat_presentation_time_evolving_OD_matrix_estimation
 
"Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler...
"Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler..."Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler...
"Quantum clustering - physics inspired clustering algorithm", Sigalit Bechler...
 
01-pengantar.pdf
01-pengantar.pdf01-pengantar.pdf
01-pengantar.pdf
 
ODSC 2019: Sessionisation via stochastic periods for root event identification
ODSC 2019: Sessionisation via stochastic periods for root event identificationODSC 2019: Sessionisation via stochastic periods for root event identification
ODSC 2019: Sessionisation via stochastic periods for root event identification
 
5.1 mining data streams
5.1 mining data streams5.1 mining data streams
5.1 mining data streams
 
Christian jensen advanced routing in spatial networks using big data
Christian jensen advanced routing in spatial networks using big dataChristian jensen advanced routing in spatial networks using big data
Christian jensen advanced routing in spatial networks using big data
 
Combining remote sensing earth observations and in situ networks: detection o...
Combining remote sensing earth observations and in situ networks: detection o...Combining remote sensing earth observations and in situ networks: detection o...
Combining remote sensing earth observations and in situ networks: detection o...
 
Evaluating Classification Algorithms Applied To Data Streams Esteban Donato
Evaluating Classification Algorithms Applied To Data Streams   Esteban DonatoEvaluating Classification Algorithms Applied To Data Streams   Esteban Donato
Evaluating Classification Algorithms Applied To Data Streams Esteban Donato
 
Alerting mechanism and algorithms introduction
Alerting mechanism and algorithms introductionAlerting mechanism and algorithms introduction
Alerting mechanism and algorithms introduction
 
Temporal data mining
Temporal data miningTemporal data mining
Temporal data mining
 
Approximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming ApplicationsApproximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming Applications
 
t10_part1.pptx
t10_part1.pptxt10_part1.pptx
t10_part1.pptx
 
Big&open data challenges for smartcity-PIC2014 Shanghai
Big&open data challenges for smartcity-PIC2014 ShanghaiBig&open data challenges for smartcity-PIC2014 Shanghai
Big&open data challenges for smartcity-PIC2014 Shanghai
 
A multi-sensor based uncut crop edge detection method for head-feeding combin...
A multi-sensor based uncut crop edge detection method for head-feeding combin...A multi-sensor based uncut crop edge detection method for head-feeding combin...
A multi-sensor based uncut crop edge detection method for head-feeding combin...
 
Introduction to Bayesian phylogenetics and BEAST
Introduction to Bayesian phylogenetics and BEASTIntroduction to Bayesian phylogenetics and BEAST
Introduction to Bayesian phylogenetics and BEAST
 
A Study on Privacy Level in Publishing Data of Smart Tap Network
A Study on Privacy Level in Publishing Data of Smart Tap NetworkA Study on Privacy Level in Publishing Data of Smart Tap Network
A Study on Privacy Level in Publishing Data of Smart Tap Network
 
Object Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic TechniquesObject Detection and Tracking using Statistical and Stochastic Techniques
Object Detection and Tracking using Statistical and Stochastic Techniques
 

Recently uploaded

Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIAlejandraGmez176757
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单vcaxypu
 
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBAlireza Kamrani
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单ocavb
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单ewymefz
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportSatyamNeelmani2
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...correoyaya
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单yhkoc
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单ewymefz
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJames Polillo
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sMAQIB18
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单vcaxypu
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundOppotus
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单ukgaet
 
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...Domenico Conte
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictJack Cole
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单enxupq
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhArpitMalhotra16
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单ewymefz
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单nscud
 

Recently uploaded (20)

Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDB
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis Report
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
Computer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage sComputer Presentation.pptx ecommerce advantage s
Computer Presentation.pptx ecommerce advantage s
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 

Changepoint Detection with Bayesian Inference

  • 1. Change  Point  Detec.on   with  Bayesian  Inference   By  Frank  Kelly   Py  data   6th  January  2015  
  • 2. Overview   •  Nigeria,  oil  wells  &  drilling   •  Noisy  data   •  Some  maths   •  Python  implementaDon   •  Examples  in  different  domains  
  • 3. FPSO  (oil  plaIorm  picture)  
  • 4.
  • 5.
  • 6. Mud  pulse  telemetry   •  InformaDon   encoded  digitally,   transmiOed  via   pressure  pulses   through  mud  fluid.   •  Alert  drillers  that   they  have  reached   oil,  detect  rock  types   and  general   monitoring.  
  • 7. The  problem   •  Poor  bit  rate  and   resoluDon   •  Time  consuming   analysis  
  • 8. Approaches  to  staDsDcs   •  FrequenDst   – Data  gathered  is  a   repeatable  random   sample.  “Frequency”   – Underlying   parameters  are   constant   – Fisher’s  0.05   •  Bayesian   – Data  are,  fixed  and   observed  from  the   realised  sample   – Parameters  unknown   and  described   probabilisDcally   – Introduce   “subjecDvity”    
  • 10. The  Theory:  Bayesian  inference   •  Methodology  of  mathemaDcal  inference:     –  Choosing  between  several  possible  models   –  ExtracDng  parameters  for  these  models   •  Bayes’  Theorem:   Rev  Thomas  Bayes  1702   -­‐  1761   p(w | D) = p(D | w)p(w) p(D) Likelihood   Prior   Probability   Posterior   Probability   Evidence   -­‐  Remove  nuisance   parameters  by   marginalisaDon   -­‐  InteresDng  ones   remain  
  • 11. Modelling  the  problem   µ2 1µ m N
  • 12. 0   20   40   60   80   100   120   140   160   180   200   0.5   1   1.5   2   2.5   data  =  model  +  noise     •  a  sequence  of  N   samples  of  data   from  a  piecewise   constant  source   with  added   Gaussian  noise.   •  Noise  independent   of  mean,  idenDcally   distributed  and  S.D.   =  σ   •  Heterogenous:   divide  into  two   homogenous   segments   µ2 ⎩ ⎨ ⎧ + + = i i i e e d 2 1 µ µ Nim mi ≤< ≤ 1µ Nm
  • 13. Single  changepoint  detector:   How  does  it  work?     •  SubsDtute  likelihood  into  Bayes’ Law   –  Simple  model-­‐  consider  Ockham’s  Razor   •  Interested  in  changepoint  locaDon  m,  integrate  w.r.t.  the   nuisance  parameters  (µ1,  µ2  and  σ)…rearrange  this…   •  …get  a  BIG  expression  for  p({m}|dI),  code  in  Python   •  On  running  obtain  most  likely  changepoint  locaDon   Ockham’s  razor:   hOp://www.jstor.org/discover/10.2307/29774559?sid=21105568247973&uid=3738032&uid=4&uid=2    
  • 15. More  maths   •  Integrate  w.r.t.  (and  thereby  remove)   nuisance  parameters  
  • 16.
  • 17.
  • 20. “Google’s  algorithm  is  the  “secret  sauce  recipe”  that  has  enabled  it  to  dominate  search.”       -­‐  FT.com  16th  Sept  2014   hOp://www.p.com/cms/s/0/9615661c-­‐3ce1-­‐11e4-­‐9733-­‐00144feabdc0.html? siteediDon=uk#axzz3DSwXYAW8   Any  business  with  an  online  presence  today  open  struggles  to  accurately  evaluate:       ●  The  quality  of  their  website  and  associated  linking  pages,  as  perceived  by  Google     ●  The  robustness  of  their  website  to  a  sudden  change  in  Google’s  search  algorithm  
  • 21. Web  traffic   30000   35000   40000   45000   50000   55000   60000   raw  daily  google  search-­‐sourced  pageviews  
  • 22. Web  traffic  (2)   30000   35000   40000   45000   50000   55000   60000   smoothed  data  using  moving  average  
  • 23. Web  traffic  (3)   30000   35000   40000   45000   50000   55000   60000   smoothed  data  with  cyclicality  removed  
  • 24. Web  traffic  (4)   -­‐838   -­‐837.5   -­‐837   -­‐836.5   -­‐836   -­‐835.5   -­‐835   -­‐834.5   -­‐834   -­‐833.5   -­‐833   30000   35000   40000   45000   50000   55000   60000   likelihood  of  change  in  data  plo>ed  over  .me   day  removed   likelihood  CP  
  • 25.
  • 26. number  of  tropical  storms  per  year  in  the  North  AtlanDc   Data  obtained  from  ibtracs  database:   hOps://www.ncdc.noaa.gov/ibtracs/  
  • 27. "Amo  Dmeseries  1856-­‐present"  by  Rosentod,  Marsupilami  -­‐  hOp://www.cdc.noaa.gov/CorrelaDon/amon.us.long.data.  Licensed  under  Public   Domain  via  Wikimedia  Commons  -­‐  hOp://commons.wikimedia.org/wiki/File:Amo_Dmeseries_1856-­‐present.svg#mediaviewer/ File:Amo_Dmeseries_1856-­‐present.svg  
  • 28.
  • 29. Other  applicaDons  /  possibiliDes   •  Financial  markets  and  poliDcal  events   •  Combine  with  frequenDst  staDcal  methods:   – Use  of  GLR  in  online  (moving  window)  detecDon   applicaDon   •  Your  own  data/  ideas  !  
  • 30. Thank  you   •  Link  to  Python  code  on  github:   hOps://github.com/swhustla/pydata-­‐bayes-­‐changepoint     –  Single  changepoint  detector  (as  seen  tonight)   –  Dual  changepoint  detector   –  Ramp  detector   •  Further  reading:   –  Numerical  Bayesian  Methods  Applied  to  Signal  Processing   (StaDsDcs  and  CompuDng)  by  Fitzgerald,  O’Ruanaidh,  1996  :   hOp://www.amazon.co.uk/Numerical-­‐Bayesian-­‐Processing-­‐ StaDsDcs-­‐CompuDng/dp/0387946292       –  Bayesian  Inference  on  Change  Point  Problems  (2007) hOp://www.cs.ubc.ca/~murphyk/Students/Xuan_MSc07.pdf       TwiOer:  @norhustla   Email:  frank.kelly@cantab.net  
  • 31. Thank  you   •  AddiDonal  links:   –  Google  Algo  updates:    hOp://moz.com/google-­‐algorithm-­‐change     –  Mathsight  -­‐>  insights  into  algorithm  changes  hOp://mathsight.org     –  AtlanDc  mulD-­‐decadal  oscillaDon  spaDal  paOern: hOp://commons.wikimedia.org/wiki/File:AMO_PaOern.png   –  NaDonal  climaDc  data  center  hOps://www.ncdc.noaa.gov/ibtracs/     –  Ockham’s  Razor  and  Bayesian  Inference:   hOp://www.jstor.org/discover/10.2307/29774559? sid=21105568247973&uid=3738032&uid=4&uid=2   –  ConverDng  from  Matlab  to  Python:   hOp://mathesaurus.sourceforge.net/matlab-­‐numpy.html       TwiOer:  @norhustla   Email:  frank.kelly@cantab.net