Courseiva
Data Analysis →hardMultiple Choice

DA0-002 Data Analysis Practice Question

A data analyst is building a decision tree to classify whether customers will churn. The analyst wants to prevent the tree from overfitting the training data. Which technique should the analyst use?

⚠ Common exam trap

The trap here is thinking that a fully grown tree is always best, but without pruning it will overfit and perform poorly on new data.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Pruning the tree after full growth

Pruning is a standard technique to reduce decision tree overfitting by removing branches that do not improve predictive accuracy on validation data. It simplifies the model and enhances generalization. Increasing depth, using all features, or allowing single-sample leaves all increase complexity and overfitting risk, making them incorrect choices for this scenario.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Increasing the maximum depth of the tree

    Why it's wrong here

    Increasing maximum depth allows the tree to grow deeper, fitting training data more closely and exacerbating overfitting. A deeper tree can memorize noise and outliers, reducing performance on unseen data. This is the opposite of what the analyst needs to prevent overfitting in churn prediction.

  • ✗

    Setting the minimum samples per leaf to 1

    Why it's wrong here

    Setting minimum samples per leaf to 1 allows the tree to create leaves with single observations, which perfectly fits training data and causes severe overfitting. A larger minimum leaf size constrains the tree, promoting generalization. For churn prediction, a value greater than 1 is typically used to avoid overfitting.

  • ✓

    Pruning the tree after full growth

    Why this is correct

    Pruning involves growing a full tree and then removing branches that provide little predictive power, reducing complexity and overfitting. This technique, such as cost-complexity pruning, balances bias and variance, improving generalization. For churn classification, pruning helps avoid capturing noise in the training data, leading to more robust predictions on new customers.

  • ✗

    Using all available features without selection

    Why it's wrong here

    Including all features, especially irrelevant ones, can lead to a more complex tree that overfits. Feature selection or dimensionality reduction helps simplify the model. Without selection, the tree may split on noise, harming generalization. This approach does not address overfitting and could worsen it.

About these practice questions

Courseiva writes every DA0-002 question from scratch — 1,004 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This DA0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DA0-002 exam.