Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Machine Learning Associate All Questions

View all questions & answers for the Certified Machine Learning Associate exam

Exam Certified Machine Learning Associate topic 1 question 24 discussion

Actual exam question from Databricks's Certified Machine Learning Associate
Question #: 24
Topic #: 1
[All Certified Machine Learning Associate Questions]

A machine learning engineer would like to develop a linear regression model with Spark ML to predict the price of a hotel room. They are using the Spark DataFrame train_df to train the model.
The Spark DataFrame train_df has the following schema:

The machine learning engineer shares the following code block:

Which of the following changes does the machine learning engineer need to make to complete the task?

  • A. They need to call the transform method on train_df
  • B. They need to convert the features column to be a vector
  • C. They do not need to make any changes
  • D. They need to utilize a Pipeline to fit the model
  • E. They need to split the features column out into one column for each feature
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
nizare
2 months, 1 week ago
Correct Answer: B The features column in Spark ML should be a vector type for the linear regression model to work. If the features column is not already a vector, it needs to be converted. This can be done using a VectorAssembler to combine the feature columns into a single vector column, which can then be used as input to the model.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...