Data Analysis, Statistics, Machine Learning

Similar documents
Data Analysis, Statistics, Machine Learning

Internal vs. external validity. External validity. This section is based on Stock and Watson s Chapter 9.

CHAPTER 24: INFERENCE IN REGRESSION. Chapter 24: Make inferences about the population from which the sample data came.

PSU GISPOPSCI June 2011 Ordinary Least Squares & Spatial Linear Regression in GeoDa

Five Whys How To Do It Better

Perfrmance f Sensitizing Rules n Shewhart Cntrl Charts with Autcrrelated Data Key Wrds: Autregressive, Mving Average, Runs Tests, Shewhart Cntrl Chart

Data Analysis, Statistics, Machine Learning

SPH3U1 Lesson 06 Kinematics

COMP 551 Applied Machine Learning Lecture 5: Generative models for linear classification

AP Physics Kinematic Wrap Up

This section is primarily focused on tools to aid us in finding roots/zeros/ -intercepts of polynomials. Essentially, our focus turns to solving.

ENSC Discrete Time Systems. Project Outline. Semester

[COLLEGE ALGEBRA EXAM I REVIEW TOPICS] ( u s e t h i s t o m a k e s u r e y o u a r e r e a d y )

We can see from the graph above that the intersection is, i.e., [ ).

Differentiation Applications 1: Related Rates

Smoothing, penalized least squares and splines

Kinetic Model Completeness

LCAO APPROXIMATIONS OF ORGANIC Pi MO SYSTEMS The allyl system (cation, anion or radical).

Thermodynamics Partial Outline of Topics

Trigonometric Ratios Unit 5 Tentative TEST date

COMP 551 Applied Machine Learning Lecture 4: Linear classification

Module 3: Gaussian Process Parameter Estimation, Prediction Uncertainty, and Diagnostics

NAME: Prof. Ruiz. 1. [5 points] What is the difference between simple random sampling and stratified random sampling?

Lab #3: Pendulum Period and Proportionalities

CHAPTER 4 DIAGNOSTICS FOR INFLUENTIAL OBSERVATIONS

Modelling of Clock Behaviour. Don Percival. Applied Physics Laboratory University of Washington Seattle, Washington, USA

CESAR Science Case The differential rotation of the Sun and its Chromosphere. Introduction. Material that is necessary during the laboratory

Activity Guide Loops and Random Numbers

SAMPLING DYNAMICAL SYSTEMS

Computational modeling techniques

Physics 2010 Motion with Constant Acceleration Experiment 1

Who is the Holy Spirit?

Maximum A Posteriori (MAP) CS 109 Lecture 22 May 16th, 2016

Fall 2013 Physics 172 Recitation 3 Momentum and Springs

Compressibility Effects

What is Statistical Learning?

Phys. 344 Ch 7 Lecture 8 Fri., April. 10 th,

OTHER USES OF THE ICRH COUPL ING CO IL. November 1975

Section 5.8 Notes Page Exponential Growth and Decay Models; Newton s Law

The Law of Total Probability, Bayes Rule, and Random Variables (Oh My!)

Misc. ArcMap Stuff Andrew Phay

Corrections for the textbook answers: Sec 6.1 #8h)covert angle to a positive by adding period #9b) # rad/sec

Our Lady Star of the Sea Religious Education CIRCLE OF GRACE LESSON PLAN - Grade 1

Admin. MDP Search Trees. Optimal Quantities. Reinforcement Learning

making triangle (ie same reference angle) ). This is a standard form that will allow us all to have the X= y=

Lab 11 LRC Circuits, Damped Forced Harmonic Motion

Lecture 2: Supervised vs. unsupervised learning, bias-variance tradeoff

ELT COMMUNICATION THEORY

EEO 401 Digital Signal Processing Prof. Mark Fowler

AP Statistics Practice Test Unit Three Exploring Relationships Between Variables. Name Period Date

x 1 Outline IAML: Logistic Regression Decision Boundaries Example Data

Introduction to Regression

Lecture 2: Supervised vs. unsupervised learning, bias-variance tradeoff

The general linear model and Statistical Parametric Mapping I: Introduction to the GLM

IB Sports, Exercise and Health Science Summer Assignment. Mrs. Christina Doyle Seneca Valley High School

Flipping Physics Lecture Notes: Simple Harmonic Motion Introduction via a Horizontal Mass-Spring System

THE LIFE OF AN OBJECT IT SYSTEMS

Chapter 8 Predicting Molecular Geometries

MODULE FOUR. This module addresses functions. SC Academic Elementary Algebra Standards:

Sections 15.1 to 15.12, 16.1 and 16.2 of the textbook (Robbins-Miller) cover the materials required for this topic.

CHAPTER 3 INEQUALITIES. Copyright -The Institute of Chartered Accountants of India

NUMBERS, MATHEMATICS AND EQUATIONS

Math 9 Year End Review Package. (b) = (a) Side length = 15.5 cm ( area ) (b) Perimeter = 4xside = 62 m

AP Literature and Composition. Summer Reading Packet. Instructions and Guidelines

AIP Logic Chapter 4 Notes

Exponential Functions, Growth and Decay

20 Faraday s Law and Maxwell s Extension to Ampere s Law

Turing Machines. Human-aware Robotics. 2017/10/17 & 19 Chapter 3.2 & 3.3 in Sipser Ø Announcement:

, which yields. where z1. and z2

Simple Linear Regression (single variable)

NOTE ON A CASE-STUDY IN BOX-JENKINS SEASONAL FORECASTING OF TIME SERIES BY STEFFEN L. LAURITZEN TECHNICAL REPORT NO. 16 APRIL 1974

Hubble s Law PHYS 1301

Relationships Between Frequency, Capacitance, Inductance and Reactance.

CS 477/677 Analysis of Algorithms Fall 2007 Dr. George Bebis Course Project Due Date: 11/29/2007

Please Stop Laughing at Me and Pay it Forward Final Writing Assignment

Lab 1 The Scientific Method

Lesson Plan. Recode: They will do a graphic organizer to sequence the steps of scientific method.

CAUSAL INFERENCE. Technical Track Session I. Phillippe Leite. The World Bank

Dead-beat controller design

Resampling Methods. Chapter 5. Chapter 5 1 / 52

CHAPTER 2 Algebraic Expressions and Fundamental Operations

Revised 2/07. Projectile Motion

IAML: Support Vector Machines

Physics 2B Chapter 23 Notes - Faraday s Law & Inductors Spring 2018

k-nearest Neighbor How to choose k Average of k points more reliable when: Large k: noise in attributes +o o noise in class labels

Accelerated Chemistry POGIL: Half-life

Introduction to Spacetime Geometry

Chapter Summary. Mathematical Induction Strong Induction Recursive Definitions Structural Induction Recursive Algorithms

ECE 5318/6352 Antenna Engineering. Spring 2006 Dr. Stuart Long. Chapter 6. Part 7 Schelkunoff s Polynomial

Wave Phenomena Physics 15c

Lead/Lag Compensator Frequency Domain Properties and Design Methods

Determining the Accuracy of Modal Parameter Estimation Methods

Biplots in Practice MICHAEL GREENACRE. Professor of Statistics at the Pompeu Fabra University. Chapter 13 Offprint

LHS Mathematics Department Honors Pre-Calculus Final Exam 2002 Answers

4th Indian Institute of Astrophysics - PennState Astrostatistics School July, 2013 Vainu Bappu Observatory, Kavalur. Correlation and Regression

**DO NOT ONLY RELY ON THIS STUDY GUIDE!!!**

Weathering. Title: Chemical and Mechanical Weathering. Grade Level: Subject/Content: Earth and Space Science

Work, Energy, and Power

How do scientists measure trees? What is DBH?

Unit 14 Thermochemistry Notes

Transcription:

Data Analysis, Statistics, Machine Learning Leland Wilkinsn Adjunct Prfessr UIC Cmputer Science Chief Scien<st H2O.ai leland.wilkinsn@gmail.cm

Time Series 10000000 8000000 Time series sta<s<cs invlve randm prcesses ver <me Spa<al sta<s<cs invlve randm prcesses ver space Bth invlve similar mathema<cal mdels When there is n tempral r spa<al influence, these bil dwn t rdinary sta<s<cal methds DO NOT USE OLS methds n tempral/spa<al data These require stchas<c mdels, nt OLS trend lines measurements at each <me/space pint are nt independent 1.0 Autcrrelatin Plt Sales 2 6000000 4000000 2000000 0 1998 2004 2010 2016 Year Quarterly US Ecmmerce Retail Sales, Seasnally Adjusted Crrelatin 0.5 0.0-0.5-1.0 0 10 20 30 40 50 60 Lag Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Up t nw, we ve been dealing with i.i.d. randm variables Independent. Iden<cally. Distributed. We assumed there was n rdering f thse randm variables Our mdels depended n randm errr plus systema<c effects Time series analy<cs deal with rdered randm variables We (usually) assume these variables are equally spaced acrss <me A variable at <me t i is predictable in part by anther variable at anther <me The simplest example f this type f behavir is called autregressive (AR) x t = φx t 1 + t 3 In this mdel each bserva<n at a given <me is a func<n f the previus bserva<n plus randm errr E[ t ]=0 E[ 2 t ]=σ 2 E[ s t ] = 0 fr all s = t Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Diagnsing a stchas<c prcess Crrelate a series with itself shi_ed backward by ne <me perid Crrelate the shi_ed series with itself shi_ed backward by ne <me perid And s n Here s an Autcrrela<n Func<n (ACF) Plt f white nise x t = t 4 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Diagnsing an autregressive prcess Crrelate a series with itself shi_ed backward by ne <me perid Crrelate the shi_ed series with itself shi_ed backward by ne <me perid And s n Here s an Autcrrela<n Func<n Plt f an AR(1) prcess x t = φx t 1 + t 5 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Mving Average (MA) prcesses In this mdel each bserva<n at a given <me is a func<n the previus errr Plus randm errr x t = θ t 1 + t Here s an Autcrrela<n Func<n Plt f an MA(1) prcess 6 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Mving Average (MA) prcesses The θ parameter can be nega<ve x t = θ t 1 + t Here s an Autcrrela<n Func<n Plt f a nega<ve MA(1) prcess Nega<ve θ enhances high frequencies Psi<ve θ enhances lw frequencies 7 Cpyright 2016 Leland Wilkinsn

ACF Plts N<ce that withut an ACF plt, diagnsis f raw series is difficult White nise MA(1) 8 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses ARMA prcesses (Bx & Jenkins) We can mix these mdels An ARMA mdel lks like this x t = p φ i x t i + i=1 q θ j t j + t j=1 In mst cases, the cefficients f the terms decay expnen<ally S we d nt have t make p and q large fr mdeling mst series All the mdels we ve seen s far can include a cnstant We can als add trend t these mdels x t = α + βx t + p φ i x t i + i=1 j=1 q θ j t j + t 9 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Seasnal prcesses Dependencies in the mdel can be acrss seasns A seasnal autregressive mdel lks like this x t = φx t s + t And a seasnal mving average mdel lks like this x t = θ t s + t Ecnmists lve this stuff They even mix stchas<c and classical mdels in the same equa<n Their gal is t accunt fr dependencies in the residuals in regressin mdels Here s an example f ne f their mdels Generalized Least Squares ˆβ =(X Σ 1 X) 1 (X Σ 1 Y) 10 Cpyright 2016 Leland Wilkinsn

11 Stchas<c prcesses Es<ma<ng ARMA mdels Are yu serius? This is a black art And usually yu want ARIMA instead f ARMA Which I haven t even tld yu abut Even a_er a semester curse in ARIMA mdels yu wn t be able t d it Yu have t learn hw t diagnse ACF plts And PACF plts, which I haven t even tld yu abut Yu have t knw when t difference yur series t achieve sta<narity Which I haven t even tld yu abut Leave this t the experts That brings us t the next tpic There s a simple mdel that des bener than fancy ARIMA fr many real frecasts It s called Expnen<al Smthing It includes seasnal effects as well Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Expnen<al Smthing We begin with the mving average smthing mdel Fr a pint at <me t (1 t n), a mving average smthed value is given by p ˆx t = 1 p i=1 x t i Sme cnsidera<ns: Our smthing es<mate is simply the average f the p previus values. The first p pints in the series are nt smthed. If each pint in the series has a randm cmpnent, we are averaging fixed and randm cmpnents f previus pints. In this case, the mdel smths nly p prir randm cmpnents (nt n). In ther wrds, the mdel ignres any randmness befre the previus p <me pints. If we presume nly randm errr gverns the prcess, we call the prcess a randm walk. If we believe the prcess is a randm walk, then we shuld set p = 1. If p = 1, the smth is just the previus bserva<n. If p = 1, we are assuming there is n mre infrma<n we can get ut f the data If p > 1, we are assuming we can eliminate the effects f the errrs by averaging them. 12 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Expnen<al Smthing Nw g n t the weighted mving average smthing mdel ˆx t = 1 p p w i x t i i=1 Let s make these weights decline expnen<ally w i = p i And let s nrmalize them t add t 1 w i = p 1 1 p p p i This makes the expnen<ally weighted smthing mdel 13 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses The Expnen<ally Weighted Mving Average Mdel (EWMA) Here is the recursive frm f the expnen<ally weighted smthing mdel N<ce the ˆx t 1 n the right We assume 0 < α < 1 s things dn t explde ˆx t = αx t 1 +(1 α)ˆx t 1 This frmula gives us a recursive es<ma<n methd N fancy p<miza<n needed What we are ding here is prjec<ng frward lcal panerns in the series We culd cnsider this a sta<s<cal es<ma<n methd Or we culd just think f it as a determinis<c frward panern duplicatr 14 Cpyright 2016 Leland Wilkinsn

Time and Space Stchas<c prcesses The Hlt- Winters methd Nw it gets pwerful Hlt and Winters added trend and seasnality t EWMA H- W fits three types f trend mdels (nne, linear, mul<plica<ve) H- W des nt fit ther types f trend func<ns (althugh it culd be mdified t d s) H- W fits three types f seasnality (nne, addi<ve, mul<plica<ve) H- W can fit mre than simple sinusidal seasnality func<ns H- W des nt fit mre than ne type f seasnality in ne mdel (but it culd) H- W addi<ve linear mdels parallel specific ARIMA mdels H- W mul<plica<ve mdels d nt have ARIMA parallels Frecas<ng 15 Fit first half f series Extraplate t secnd half t get residuals Analyze residuals fr anmalies Frecast beynd end f series Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses The Hlt- Winters methd 16 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses The Hlt- Winters methd Here is the H- W frecast fr the famus Bx- Jenkins Airline dataset hw passengers estimate / smth=.3, linear=.4,seasn=12, multiplicative=.5, frecast=10 And here is the frecast using ARIMA (0,1,0)(0,1,0) arima passengers lg difference difference / lag=12 estimate / q=1, qs = 1, seasn=12, backcast = 13,frecast=10 17 Cpyright 2016 Leland Wilkinsn

Stchas<c prcesses Seasnal decmpsi<n X11/12 (US Census), SABL (Cleveland, Bell Labs) Trend Seasn Residual 18 Cpyright 2016 Leland Wilkinsn

Crrela<ng Time Series Dn t d this I lve this site! hnp://www.tylervigen.cm/spurius- crrela<ns 19 Cpyright 2016 Leland Wilkinsn

30 Crrela<ng Time Series Series Plt Science Raw 2.5 Series Plt Science Detrended 2.0 SCIENCE 25 20 SCIENCE 1.5 1.0 0.5 15 0 4 8 12 Case 0.0 0 4 8 12 Case 10000 Series Plt Suicide Raw 1000 Series Plt Suicide Detrended SUICIDE 9000 8000 7000 6000 SUICIDE 500 0 5000 0 4 8 12 Case 20-500 0 4 8 12 Case Cpyright 2016 Leland Wilkinsn

Crrela<ng Time Series CCF f Raw series vs. CCF f detrended Crss Crrelatin Plt Crss Crrelatin Plt 1.0 1.0 Crrelatin 0.5 0.0-0.5 Crrelatin 0.5 0.0-0.5-1.0-6 -4-2 0 2 4 6 Lag -1.0-6 -4-2 0 2 4 6 Lag Detrending desn t always get yu ut f the wds There can be secnd- rder ar<facts that influence crrela<n between series 21 Cpyright 2016 Leland Wilkinsn

Mul<variate analysis f <me series The cau<ns men<ned earlier apply t any analysis f <me series e.g., Clustering r Principal Cmpnents f <me series Need t difference t achieve sta<narity befre clustering First differences f a randm walk achieves sta<narity Other mdels require mre ex<c measures First 9 lags f a randm walk 22 Cpyright 2016 Leland Wilkinsn

Wait, there s mre But if yu insist n trying this stuff, yu d bener talk t a <me- series sta<s<cian r ecnmist But dn t ask the ecnmist t predict the ecnmy! 23 Cpyright 2016 Leland Wilkinsn