Databricks-Machine-Learning-Associate: Databricks Certified Machine Learning Associate Spark Practice Questions
The free Databricks-Machine-Learning-Associate: Databricks Certified Machine Learning Associate questions that deal with spark, with answers and explanations. The full bank and the timed practice test cover every topic the exam asks about.
Question #2
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 DataFrametrain_dfto train the model. The Spark DataFrametrain_dfhas 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?


Correct answer: B
Explanation
In Spark ML, the linear regression model expects the feature column to be a vector type. However, if thefeaturescolumn in the DataFrametrain_dfis not already in this format (such as being a column of type UDT or a non-vectorized type), the engineerneeds to convert it to a vector column using a transformer likeVectorAssembler. This is a critical step in preparing the data for modeling as Spark ML models require input features to be combined into a single vector column. References • Spark MLlib documentation forLinearRegression:https://spark.apache.org/docs/latest/ml-classification- regression.html#linear-regression
Question #9
Which statement describes a Spark ML transformer?
Correct answer: A
Explanation
In Spark ML, a transformer is an algorithm that can transform one DataFrame into another DataFrame. It takes a DataFrame as input and produces a new DataFrame as output. This transformation can involve adding new columns, modifying existing ones, or applying feature transformations. Examples of transformers in Spark MLlib include feature transformers likeStringIndexer,VectorAssembler, andStandardScaler. References: • Databricks documentation on transformers: Transformers in Spark ML
Continue with Databricks-Machine-Learning-Associate: Databricks Certified Machine Learning Associate Exam
Unlock the full question bank
You have read the first 10 questions. A subscription opens every question in Databricks-Machine-Learning-Associate: Databricks Certified Machine Learning Associate Exam, the full timed practice test, and your progress and weak-topic reporting.
Single exam
$19.99for 30 days
Full question bank and practice test for one exam, for 30 days.
Single exam
$49.99for 1 year
One exam for a full year. Nothing renews and nothing to cancel.
Full access
$39.99/mo
Every exam in the catalogue, month to month.
Full access
$199.99/yr
Every exam in the catalogue for a year.
Already subscribed? Sign in to pick up where you left off.
