QuestionQ107

VerifiedModel Development

A machine learning engineer is migrating a decision tree from sklearn to Spark ML.

During training after this migration, they receive an error stating that the maxBins parameter must be set to at least 515 (or that the feature must be removed):

Question Image

Which of the following causes Spark ML to require the maxBins parameter to be at least as large as the number of values in every categorical feature?

Explanation

Spark ML uses maxBins to provide bins for discretizing continuous features and for choosing splits. It requires maxBins to be at least the number of categories in any categorical feature, so each category must have a bin; a categorical feature with 515 values requires maxBins of at least 515. Spark DecisionTreeParams API

Learn more

Community Discussion

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