Databricks Machine Learning Associate Question 441
Select 3You are working on a machine learning project in Databricks and want to train a classification model using a feature store table named 'customer_features' that contains features like 'age', 'income', and 'purchase_history'. Which of the following steps are required to correctly train the model using the feature store table?
- A
Load the feature store table into a DataFrame using the
feature_store.read_tablemethod. - B
Specify the feature store table as the input directly in the
fitmethod of the ML model. - C
Split the features and labels from the DataFrame loaded from the feature store.
- D
Use the
FeatureStoreClientto log the trained model back to the feature store. - E
Directly import the feature store table as a Pandas DataFrame using the
spark.read.csvmethod.
Show answer and explanation
Correct answers: A, C, D
Explanation
To train a model using features from a feature store table in Databricks, you must first load the table into a DataFrame using the feature_store.read_table method. Then, the features and labels must be split for training. After training, the FeatureStoreClient allows you to log the trained model back to the feature store for tracking and operationalization. Direct importing using methods like spark.read.csv or directly passing the table to the fit method is not supported.
- A. Correct.
Correct: You need to load the feature store table into a DataFrame using the
feature_store.read_tablemethod to access the features stored in the feature store. - B. Incorrect.
Incorrect: You cannot directly pass the feature store table to the
fitmethod. The features must first be extracted and preprocessed into a format suitable for training. - C. Correct.
Correct: After loading the feature store table into a DataFrame, you need to split the features (input variables) and labels (target variable) before training the model.
- D. Correct.
Correct: The
FeatureStoreClientis used to log the trained model back to the feature store for tracking and reuse. - E. Incorrect.
Incorrect: The
spark.read.csvmethod is not suitable for directly importing a feature store table. Feature store tables require specialized methods provided by the Databricks Feature Store API.