QuestionQ73

VerifiedModel Development

A machine-learning engineer is migrating a decision tree from sklearn to Spark ML. Although all data and manually configured hyperparameter values are the same, they observe different results.

Which of the following explains why a single-node sklearn decision tree can differ from a Spark ML decision tree?

Explanation

Spark ML decision trees discretize continuous features into bins and evaluate representative binned values as split candidates. Because this can differ from evaluating thresholds based on the raw observed feature values, the selected split can differ even when the training data and corresponding hyperparameters are identical. Spark documents maxBins as the maximum number of bins used to discretize continuous features and choose splits at each node.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!