Câu 80: Databricks Certified Data Engineer Professional
The data science team has created and logged a production model using MLflow. The model accepts a list of column names and returns a new column of type DOUBLE. The following code correctly imports the production model, loads the customers table containing the customer_id key column into a DataFrame, and defines the fe…
Nội dung câu hỏi
The data science team has created and logged a production model using MLflow. The model accepts a list of column names and returns a new column of type DOUBLE. The following code correctly imports the production model, loads the customers table containing the customer_id key column into a DataFrame, and defines the feature columns needed for the model. Which code block will output a DataFrame with the schema "customer_id LONG, predictions DOUBLE"?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. df.map(lambda x:model(x[columns])).select("customer_id, predictions")
- B. df.select("customer_id", model(*columns).alias("predictions")) — đáp án hiện tại
- C. model.predict(df, columns)
- D. df.select("customer_id", pandas_udf(model, columns).alias("predictions"))
- E. df.apply(model, columns).select("customer_id, predictions")
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.