Databricks Machine Learning Associate Question 450
Select 3A data science team is building a fraud detection model using Databricks. They need to calculate real-time features, such as the number of transactions for a user in the last 5 minutes, to make predictions instantly after a transaction occurs. However, they also need to generate training datasets with historical features for model training. Which of the following statements correctly describe the differences between online and offline feature tables in this scenario?
- A
Online feature tables are optimized for low-latency feature lookups, while offline feature tables are optimized for batch processing and model training.
- B
Offline feature tables are suitable for storing historical feature data, while online feature tables are designed for real-time feature serving.
- C
Online feature tables store features at a higher resolution than offline feature tables to support real-time inference.
- D
Offline feature tables are used during model inference, while online feature tables are used only during training.
- E
Both online and offline feature tables are required for a complete machine learning workflow involving training and inference.
Show answer and explanation
Correct answers: A, B, E
Explanation
Online and offline feature tables serve distinct purposes in a machine learning workflow. Online feature tables are optimized for real-time, low-latency feature lookups, which are critical for serving features during inference. Offline feature tables, on the other hand, are used during model training to store and retrieve historical feature data in large batches. A fully functional ML pipeline typically requires both types of tables to support both training and inference phases effectively.
- A. Correct.
Correct: Online feature tables are specifically designed for real-time, low-latency lookups, making them ideal for serving features in real-time scenarios. Offline feature tables, on the other hand, are optimized for batch processing and creating training datasets.
- B. Correct.
Correct: Offline feature tables store historical data that is often used for training machine learning models. Online feature tables, however, are designed to serve features in real-time for inference.
- C. Incorrect.
Incorrect: The resolution of features (e.g., granularity) is not directly tied to whether a feature table is online or offline. Both types of feature tables can store features at varying resolutions depending on the use case.
- D. Incorrect.
Incorrect: This is the opposite of the correct usage. Offline feature tables are used during training to provide historical features, while online feature tables are used during inference to serve features in real-time.
- E. Correct.
Correct: Both types of feature tables play complementary roles in the machine learning workflow. Offline feature tables are used for training, and online feature tables are used for inference.