Databricks Certified Machine Learning Associate · Free Practice Question Easy
Question 10
- A To increase model complexity
- B To add irrelevant features to the dataset
- C To reduce the number of input features
- D To speed up data preprocessing
Reveal correct answer
Correct answer: C
Explanation
Correct Answer:
To reduce the number of input features
Explanation:
Why This Is Correct?
Dimensionality reduction (e.g., PCA, Feature Selection) in Spark ML aims to:
Eliminate redundant/irrelevant features: Focus on the most informative ones.
Reduce computational cost: Fewer features speed up training and inference.
Improve model performance: Mitigates the "curse of dimensionality" (noise from irrelevant features).
Example (PCA in Spark ML):
- from pyspark.ml.feature import PCA
- pca = PCA(k=10, inputCol="features", outputCol="pca_features")
- model = pca.fit(scaled_df) # Reduces 100D features → 10D
Key Benefits:
Faster training: Less data to process.
Better generalization: Removes noise.
Why Other Options Are Incorrect?
"Increase model complexity":
Dimensionality reduction simplifies models.
"Add irrelevant features":
Counterproductive—reduction removes irrelevance.
"Speed up preprocessing":
A side effect, not the primary goal.
Key Takeaway:
For efficient Spark ML workflows:
Use
PCAfor linear dependencies.Use
ChiSqSelectorfor categorical features.Validate with cross-validation to choose optimal dimensions.
Pro Tip: Pair with VectorSlicer to manually drop low-importance features.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
