Databricks Certified Machine Learning - Associate

Databricks Certified Machine Learning - Associate

Get started today

Ultimate access to all questions.


A data scientist has developed a three-class decision tree classifier using Spark ML and stored the predictions in a Spark DataFrame named preds_dt. The DataFrame has the schema: prediction DOUBLE, actual DOUBLE. Which code segment correctly calculates the model's accuracy from preds_dt and assigns it to the accuracy variable? Choose the best answer.