Book Image

Machine Learning for Time-Series with Python - Second Edition

By : Ben Auffarth
4 (4)
Book Image

Machine Learning for Time-Series with Python - Second Edition

4 (4)
By: Ben Auffarth

Overview of this book

The Python time-series ecosystem is a huge and challenging topic to tackle, especially for time series since there are so many new libraries and models. Machine Learning for Time Series, Second Edition, aims to deepen your understanding of time series by providing a comprehensive overview of popular Python time-series packages and helping you build better predictive systems. This fully updated second edition starts by re-introducing the basics of time series and then helps you get to grips with traditional autoregressive models as well as modern non-parametric models. By observing practical examples and the theory behind them, you will gain a deeper understanding of loading time-series datasets from any source and a variety of models, such as deep learning recurrent neural networks, causal convolutional network models, and gradient boosting with feature engineering. This book will also help you choose the right model for the right problem by explaining the theory behind several useful models. New updates include a chapter on forecasting and extracting signals on financial markets and case studies with relevant examples from operations management, digital marketing, and healthcare. By the end of this book, you should feel at home with effectively analyzing and applying machine learning methods to time series.
Table of Contents (3 chapters)

Which sets of techniques are there for time series?

There are many different techniques that can be used for each of these problem scenarios. In this book, we'll discuss the most popular methods for analyzing time series data, including traditional statistical methods, machine learning methods, and deep learning methods.Problems such as clustering, and classification/regression are generic to machine learning, signal processing, or statistical methods. Often, being aware of this can help establish a context for problem solving and allows one to draw from the broader set of methods within these areas.How is machine learning for time series similar or different from other ML disciplines? There are quite a few challenges specific to machine-learning with time series:

  • The main difference to - more generally - machine learning methods on tabular data is that the data is that the data are indexed by time. The temporal ordering of the data points is often important for the task at hand. This means that the data must be processed in a specific order and cannot simply be shuffled as is often done in machine learning on tabular data.
  • Time series data is often non-stationary, meaning that the statistical properties of the data change over time. This makes it difficult to build models that can generalize from the training data to the test data.

Machine learning has evolved as a powerful method for understanding hidden complexity in time series data. Recently, probabilistic models for time series such as Facebook Prophet, Markov models, or even fuzzy models, and counter-factual causal models such as Bayesian structural time series models as proposed by Google have gained in popularity. At the same time, multivariate forecasting has found practical use in multivariate multistep forecasts of energy demand with deep learning models. Finally, time series techniques such as bandit algorithms and Deep Q-Learning have found their applications in recommender systems and trading algorithms.Some models are adaptive or robust to certain kinds of drift. For example, ARIMA models are generally robust to small amounts of additive and multiplicative drift. The Random Forest algorithm, on the other hand, can be more robust under these conditions and does not require a fundamental update of the algorithm for each instance. Adaptive algorithms include effective resampling methods and adaptive operators that can cope with different types of concept drifts without complex optimizations for different data sets. Unfortunately, there are no hard and fast rules and you should experiment with both types of methods to see which works best for your data.The most prominent time series data technique is forecasting - the task to predict future values of the series. This can be done using methods such as ARIMA or many others, each coming with their own set of assumptions, drawbacks, and advantages.