Book Image

Machine Learning for Streaming Data with Python

By : Joos Korstanje
Book Image

Machine Learning for Streaming Data with Python

By: Joos Korstanje

Overview of this book

Streaming data is the new top technology to watch out for in the field of data science and machine learning. As business needs become more demanding, many use cases require real-time analysis as well as real-time machine learning. This book will help you to get up to speed with data analytics for streaming data and focus strongly on adapting machine learning and other analytics to the case of streaming data. You will first learn about the architecture for streaming and real-time machine learning. Next, you will look at the state-of-the-art frameworks for streaming data like River. Later chapters will focus on various industrial use cases for streaming data like Online Anomaly Detection and others. As you progress, you will discover various challenges and learn how to mitigate them. In addition to this, you will learn best practices that will help you use streaming data to generate real-time insights. By the end of this book, you will have gained the confidence you need to stream data in your machine learning models.
Table of Contents (17 chapters)
1
Part 1: Introduction and Core Concepts of Streaming Data
5
Part 2: Exploring Use Cases for Data Streaming
11
Part 3: Advanced Concepts and Best Practices around Streaming Data
15
Chapter 12: Conclusion and Best Practices

Measuring drift

There are two important things to consider for drift. We should first be able to measure drift, as we cannot counteract something that we are not aware of. Secondly, once we become aware of drift, we should define the right strategies for counteracting it. Let's discuss measurements for drift first.

Measuring data drift

As described earlier, data drift means that the measurements are slowly changing over time, whereas the underlying concepts stay the same. To measure this, descriptive statistics can be very useful. As you have seen a lot of descriptive statistics in earlier chapters, we will not repeat the theory behind this.

To apply descriptive statistics to measure data drift, we could simply set up a number of descriptive statistics and track them over time. For each variable, you could set up the following:

  • Measurements of centrality (mean, median, mode)
  • Measurements of variation (standard deviation, variance, interquartile range, or IQR...