Databricks Machine Learning Professional Question 175
Single answerA retail company wants to build a machine learning solution to predict fraud in real-time transactions. They have a large volume of incoming transaction data streaming into their Databricks environment. Which approach should they use to implement continuous inference for fraud detection?
- A
Use Databricks Structured Streaming to apply the trained model on incoming data streams, generating predictions in real-time.
- B
Schedule a batch job to process incoming transaction data every hour and apply the trained model on the aggregated data.
- C
Deploy the trained model as a REST API and process incoming transaction data in real-time using a custom application.
- D
Use Databricks Delta Live Tables (DLT) to periodically process and store transaction data, then apply the trained model to the stored data.
Show answer and explanation
Correct answer: A
Explanation
Databricks Structured Streaming provides a highly scalable, fault-tolerant solution for processing real-time data streams. By integrating a trained machine learning model with Structured Streaming, predictions can be continuously generated on incoming data, making it an ideal solution for real-time fraud detection. Other options either introduce latency or are not directly relevant to Structured Streaming.
- A. Correct.
This is the correct approach. Databricks Structured Streaming allows for continuous processing of real-time data streams and can be integrated with machine learning models for real-time inference.
- B. Incorrect.
This approach introduces latency as it processes data in batches rather than continuously. It is not suitable for real-time inference.
- C. Incorrect.
Deploying a trained model as a REST API can enable real-time inference, but it requires additional infrastructure and is not specific to Databricks Structured Streaming, which is the focus of the question.
- D. Incorrect.
Delta Live Tables (DLT) is optimized for batch processing and periodic updates, which is not ideal for continuous real-time inference.