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
Databricks ML in Action

You're reading from   Databricks ML in Action Learn how Databricks supports the entire ML lifecycle end to end from data ingestion to the model deployment

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781800564893
Length 280 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (4):
Arrow left icon
Hayley Horn Hayley Horn
Author Profile Icon Hayley Horn
Hayley Horn
Amanda Baker Amanda Baker
Author Profile Icon Amanda Baker
Amanda Baker
Anastasia Prokaieva Anastasia Prokaieva
Author Profile Icon Anastasia Prokaieva
Anastasia Prokaieva
Stephanie Rivera Stephanie Rivera
Author Profile Icon Stephanie Rivera
Stephanie Rivera
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Part 1: Overview of the Databricks Unified Data Intelligence Platform FREE CHAPTER
2. Chapter 1: Getting Started and Lakehouse Concepts 3. Chapter 2: Designing Databricks: Day One 4. Chapter 3: Building the Bronze Layer 5. Part 2: Heavily Project Focused
6. Chapter 4: Getting to Know Your Data 7. Chapter 5: Feature Engineering on Databricks 8. Chapter 6: Tools for Model Training and Experimenting 9. Chapter 7: Productionizing ML on Databricks 10. Chapter 8: Monitoring, Evaluating, and More 11. Index 12. Other Books You May Enjoy

Computing on-demand features

Calculating the number of transactions per customer in a brief time window works in a streaming fashion because we only need to use historical data. When we want to use a feature that requires data available only at inference time, we use on-demand features, with unknown values until inference time. In Databricks, you can create on-demand features with Python user-defined functions (UDFs). These Python UDFs can then be invoked via training_set configurations to create training datasets, as you will see in Chapter 6.

Let’s consider the Streaming Transactions project again. We want to add a feature for the amount a product sold at, compared to its historical maximum price, and use this as part of the training data to predict the generated classification label. In this scenario, we don’t know the purchase price until the transaction has been received. We’ll cover how to build a Python UDF for calculating an on-demand feature for the...

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