Preface |
|
ix | |
1 Time Series: An Overview and a Quick History |
|
1 | (16) |
|
The History of Time Series in Diverse Applications |
|
|
2 | (8) |
|
Medicine as a Time Series Problem |
|
|
2 | (4) |
|
|
6 | (1) |
|
Forecasting Economic Growth |
|
|
7 | (2) |
|
|
9 | (1) |
|
Time Series Analysis Takes Off |
|
|
10 | (2) |
|
The Origins of Statistical Time Series Analysis |
|
|
12 | (1) |
|
The Origins of Machine Learning Time Series Analysis |
|
|
13 | (1) |
|
|
13 | (4) |
2 Finding and Wrangling Time Series Data |
|
17 | (56) |
|
Where to Find Time Series Data |
|
|
18 | (8) |
|
|
18 | (7) |
|
|
25 | (1) |
|
Retrofitting a Time Series Data Collection from a Collection of Tables |
|
|
26 | (9) |
|
A Worked Example: Assembling a Time Series Data Collection |
|
|
27 | (6) |
|
Constructing a Found Time Series |
|
|
33 | (2) |
|
|
35 | (5) |
|
|
35 | (1) |
|
Guesstimating Timestamps to Make Sense of Data |
|
|
36 | (3) |
|
What's a Meaningful Time Scale? |
|
|
39 | (1) |
|
|
40 | (20) |
|
|
40 | (12) |
|
Upsampling and Downsampling |
|
|
52 | (3) |
|
|
55 | (5) |
|
|
60 | (3) |
|
|
63 | (4) |
|
|
67 | (2) |
|
|
69 | (4) |
3 Exploratory Data Analysis for Time Series |
|
73 | (46) |
|
|
73 | (8) |
|
|
74 | (3) |
|
|
77 | (1) |
|
|
78 | (3) |
|
Time Series-Specific Exploratory Methods |
|
|
81 | (23) |
|
Understanding Stationarity |
|
|
82 | (4) |
|
Applying Window Functions |
|
|
86 | (5) |
|
Understanding and Identifying Self-Correlation |
|
|
91 | (11) |
|
|
102 | (2) |
|
Some Useful Visualizations |
|
|
104 | (13) |
|
|
104 | (1) |
|
|
105 | (8) |
|
|
113 | (4) |
|
|
117 | (2) |
4 Simulating Time Series Data |
|
119 | (24) |
|
What's Special About Simulating Time Series? |
|
|
120 | (1) |
|
Simulation Versus Forecasting |
|
|
121 | (1) |
|
|
121 | (19) |
|
|
122 | (6) |
|
Building a Simulation Universe That Runs Itself |
|
|
128 | (6) |
|
|
134 | (6) |
|
Final Notes on Simulations |
|
|
140 | (2) |
|
|
141 | (1) |
|
Deep Learning Simulations |
|
|
141 | (1) |
|
|
142 | (1) |
5 Storing Temporal Data |
|
143 | (20) |
|
|
145 | (3) |
|
Live Data Versus Stored Data |
|
|
146 | (2) |
|
|
148 | (9) |
|
|
149 | (3) |
|
Popular Time Series Database and File Solutions |
|
|
152 | (5) |
|
|
157 | (3) |
|
|
158 | (1) |
|
|
158 | (1) |
|
|
158 | (1) |
|
|
159 | (1) |
|
|
160 | (3) |
6 Statistical Models for Time Series |
|
163 | (44) |
|
Why Not Use a Linear Regression? |
|
|
163 | (3) |
|
Statistical Methods Developed for Time Series |
|
|
166 | (37) |
|
|
166 | (15) |
|
|
181 | (5) |
|
Autoregressive Integrated Moving Average Models |
|
|
186 | (10) |
|
|
196 | (5) |
|
Variations on Statistical Models |
|
|
201 | (2) |
|
Advantages and Disadvantages of Statistical Methods for Time Series |
|
|
203 | (1) |
|
|
204 | (3) |
7 State Space Models for Time Series |
|
207 | (32) |
|
State Space Models: Pluses and Minuses |
|
|
209 | (1) |
|
|
210 | (8) |
|
|
210 | (2) |
|
Code for the Kalman Filter |
|
|
212 | (6) |
|
|
218 | (11) |
|
|
218 | (2) |
|
|
220 | (4) |
|
|
224 | (5) |
|
Bayesian Structural Time Series |
|
|
229 | (6) |
|
|
230 | (5) |
|
|
235 | (4) |
8 Generating and Selecting Features for a Time Series |
|
239 | (20) |
|
|
240 | (1) |
|
General Considerations When Computing Features |
|
|
241 | (2) |
|
The Nature of the Time Series |
|
|
242 | (1) |
|
|
242 | (1) |
|
|
243 | (1) |
|
A Catalog of Places to Find Features for Inspiration |
|
|
243 | (9) |
|
Open Source Time Series Feature Generation Libraries |
|
|
244 | (5) |
|
Domain-Specific Feature Examples |
|
|
249 | (3) |
|
How to Select Features Once You Have Generated Them |
|
|
252 | (3) |
|
|
255 | (1) |
|
|
256 | (3) |
9 Machine Learning for Time Series |
|
259 | (30) |
|
Time Series Classification |
|
|
260 | (12) |
|
Selecting and Generating Features |
|
|
260 | (4) |
|
|
264 | (8) |
|
|
272 | (15) |
|
Generating Features from the Data |
|
|
273 | (7) |
|
Temporally Aware Distance Metrics |
|
|
280 | (5) |
|
|
285 | (2) |
|
|
287 | (2) |
10 Deep Learning for Time Series |
|
289 | (54) |
|
|
292 | (2) |
|
Programming a Neural Network |
|
|
294 | (4) |
|
Data, Symbols, Operations, Layers, and Graphs |
|
|
294 | (4) |
|
Building a Training Pipeline |
|
|
298 | (20) |
|
|
299 | (3) |
|
Steps of a Training Pipeline |
|
|
302 | (16) |
|
|
318 | (6) |
|
|
318 | (3) |
|
Using an Attention Mechanism to Make Feed Forward Networks More Time-Aware |
|
|
321 | (3) |
|
|
324 | (6) |
|
A Simple Convolutional Model |
|
|
325 | (2) |
|
Alternative Convolutional Models |
|
|
327 | (3) |
|
|
330 | (5) |
|
Continuing Our Electric Example |
|
|
332 | (2) |
|
The Autoencoder Innovation |
|
|
334 | (1) |
|
Combination Architectures |
|
|
335 | (5) |
|
|
340 | (1) |
|
|
341 | (2) |
11 Measuring Error |
|
343 | (14) |
|
The Basics: How to Test Forecasts |
|
|
344 | (4) |
|
Model-Specific Considerations for Backtesting |
|
|
347 | (1) |
|
When Is Your Forecast Good Enough? |
|
|
348 | (2) |
|
Estimating Uncertainty in Your Model with a Simulation |
|
|
350 | (3) |
|
Predicting Multiple Steps Ahead |
|
|
353 | (2) |
|
Fit Directly to the Horizon of Interest |
|
|
353 | (1) |
|
Recursive Approach to Distant Temporal Horizons |
|
|
354 | (1) |
|
Multitask Learning Applied to Time Series |
|
|
354 | (1) |
|
|
355 | (1) |
|
|
355 | (2) |
12 Performance Considerations in Fitting and Serving Time Series Models |
|
357 | (10) |
|
Working with Tools Built for More General Use Cases |
|
|
358 | (3) |
|
Models Built for Cross-Sectional Data Don't "Share" Data Across Samples |
|
|
358 | (2) |
|
Models That Don't Precompute Create Unnecessary Lag Between Measuring Data and Making a Forecast |
|
|
360 | (1) |
|
Data Storage Formats: Pluses and Minuses |
|
|
361 | (1) |
|
Store Your Data in a Binary Format |
|
|
361 | (1) |
|
Preprocess Your Data in a Way That Allows You to "Slide" Over It |
|
|
362 | (1) |
|
Modifying Your Analysis to Suit Performance Considerations |
|
|
362 | (3) |
|
Using All Your Data Is Not Necessarily Better |
|
|
363 | (1) |
|
Complicated Models Don't Always Do Better Enough |
|
|
363 | (1) |
|
A Brief Mention of Alternative High-Performance Tools |
|
|
364 | (1) |
|
|
365 | (2) |
13 Healthcare Applications |
|
367 | (36) |
|
|
367 | (17) |
|
A Case Study of Flu in One Metropolitan Area |
|
|
367 | (16) |
|
What Is State of the Art in Flu Forecasting? |
|
|
383 | (1) |
|
Predicting Blood Glucose Levels |
|
|
384 | (17) |
|
Data Cleaning and Exploration |
|
|
385 | (5) |
|
|
390 | (6) |
|
|
396 | (5) |
|
|
401 | (2) |
14 Financial Applications |
|
403 | (22) |
|
Obtaining and Exploring Financial Data |
|
|
404 | (6) |
|
Preprocessing Financial Data for Deep Learning |
|
|
410 | (13) |
|
Adding Quantities of Interest to Our Raw Values |
|
|
410 | (1) |
|
Scaling Quantities of Interest Without a Lookahead |
|
|
411 | (2) |
|
Formatting Our Data for a Neural Network |
|
|
413 | (3) |
|
Building and Training an RNN |
|
|
416 | (7) |
|
|
423 | (2) |
15 Time Series for Government |
|
425 | (24) |
|
Obtaining Governmental Data |
|
|
426 | (2) |
|
Exploring Big Time Series Data |
|
|
428 | (8) |
|
Upsample and Aggregate the Data as We Iterate Through It |
|
|
431 | (1) |
|
|
432 | (4) |
|
Online Statistical Analysis of Time Series Data |
|
|
436 | (11) |
|
|
446 | (1) |
|
|
446 | (1) |
|
|
447 | (2) |
16 Time Series Packages |
|
449 | (14) |
|
|
449 | (8) |
|
Google's Industrial In-house Forecasting |
|
|
450 | (2) |
|
Facebook's Open Source Prophet Package |
|
|
452 | (5) |
|
|
457 | (3) |
|
Twitter's Open Source AnomalyDetection Package |
|
|
457 | (3) |
|
Other Time Series Packages |
|
|
460 | (1) |
|
|
461 | (2) |
17 Forecasts About Forecasting |
|
463 | (6) |
|
|
463 | (1) |
|
Deep Learning Enhances Probabilistic Possibilities |
|
|
464 | (1) |
|
Increasing Importance of Machine Learning Rather Than Statistics |
|
|
465 | (1) |
|
Increasing Combination of Statistical and Machine Learning Methodologies |
|
|
466 | (1) |
|
More Forecasts for Everyday Life |
|
|
466 | (3) |
Index |
|
469 | |