Valid Databricks-Machine-Learning-Associate Dumps shared by ExamDiscuss.com for Helping Passing Databricks-Machine-Learning-Associate Exam! ExamDiscuss.com now offer the newest Databricks-Machine-Learning-Associate exam dumps, the ExamDiscuss.com Databricks-Machine-Learning-Associate exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com Databricks-Machine-Learning-Associate dumps with Test Engine here:
A data scientist has developed a machine learning pipeline with a static input data set using Spark ML, but the pipeline is taking too long to process. They increase the number of workers in the cluster to get the pipeline to run more efficiently. They notice that the number of rows in the training set after reconfiguring the cluster is different from the number of rows in the training set prior to reconfiguring the cluster. Which of the following approaches will guarantee a reproducible training and test set for each model?
Correct Answer: B
To ensure reproducible training and test sets, writing the split data sets to persistent storage is a reliable approach. This allows you to consistently load the same training and test data for each model run, regardless of cluster reconfiguration or other changes in the environment. Correct approach: Split the data. Write the split data to persistent storage (e.g., HDFS, S3). Load the data from storage for each model training session. train_df, test_df = spark_df.randomSplit([0.8, 0.2], seed=42) train_df.write.parquet("path/to/train_df.parquet") test_df.write.parquet("path/to/test_df.parquet") # Later, load the data train_df = spark.read.parquet("path/to/train_df.parquet") test_df = spark.read.parquet("path/to/test_df.parquet") Reference: Spark DataFrameWriter Documentation