Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Machine Learning for Streaming Data with Python

You're reading from   Machine Learning for Streaming Data with Python Rapidly build practical online machine learning solutions using River and other top key frameworks

Arrow left icon
Product type Paperback
Published in Jul 2022
Publisher Packt
ISBN-13 9781803248363
Length 258 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Joos Korstanje Joos Korstanje
Author Profile Icon Joos Korstanje
Joos Korstanje
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part 1: Introduction and Core Concepts of Streaming Data
2. Chapter 1: An Introduction to Streaming Data FREE CHAPTER 3. Chapter 2: Architectures for Streaming and Real-Time Machine Learning 4. Chapter 3: Data Analysis on Streaming Data 5. Part 2: Exploring Use Cases for Data Streaming
6. Chapter 4: Online Learning with River 7. Chapter 5: Online Anomaly Detection 8. Chapter 6: Online Classification 9. Chapter 7: Online Regression 10. Chapter 8: Reinforcement Learning 11. Part 3: Advanced Concepts and Best Practices around Streaming Data
12. Chapter 9: Drift and Drift Detection 13. Chapter 10: Feature Transformation and Scaling 14. Chapter 11: Catastrophic Forgetting 15. Chapter 12: Conclusion and Best Practices 16. Other Books You May Enjoy

Real-time visualizations

In this part, you will see how to set up a simple real-time visualization using Plotly's Dash. This tool is a great dashboarding tool for data scientists, as it is easy to learn and does not require much except for a Python environment.

The code is a little bit too long to show in the book, but you can find the Python file (called ch3-realtimeviz.py) in the GitHub repository.

In the code, you can see how a simple real-time graph is built. The general setup of the code is to have an app. You define the layout in the app using HTML-like building blocks. In this case, the layout contains one div (one block of content) in which there is a graph.

The main component is the use of the Interval function in this layout. Using this will make the dashboard update automatically at a given frequency. It is fast enough to consider these as real-time updates.

The callback decorates the function that is written just below it (update_graph). By decorating it...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime