Decision Trees, Naive Bayes and k-Nearest Neighbors Short Notes for GATE DA: Concepts, Formulas, Worked Examples & Practice

    Decision Trees, Naive Bayes and k-Nearest Neighbors short notes for GATE DA: 6 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    k-NN Quick Revision Checklist

    k-NN Quick Revision Checklist

    • Type: Instance-based, lazy, non-parametric learning.
    • Mechanism: Store data Calculate distances to query Sort Majority vote of nearest.
    • Distance: Euclidean is standard. Compare squared distances to save calculation time.
    • Hyperparameter :
      • Small High variance, overfitting, jagged boundary.
      • Large High bias, underfitting, smooth boundary.
      • Use odd for binary classification to prevent ties.
    • Critical Preprocessing: Feature scaling (Standardization/Normalization) is mandatory due to scale sensitivity.
    • Complexity: Training is , Prediction is where is samples and is dimensions.

    Summary: k-NN Quick Recall

    k-NN Quick Recall

    Core Idea
    Lazy, non-parametric. Predicts via majority vote of nearest points.
    Formula
    Metrics
    Euclidean (), Manhattan (). Always scale features.
    Effect of k
    Small : noisy. Large : smooth. Use odd for binary.
    Main Traps to Avoid
    • Voting ties (use odd or distance weighting).
    • High dimensionality (use feature selection/PCA).
    • Unscaled features (standardize before computing distance).

    Quick Revision Checklist

    Quick Revision Checklist

    • Priors:
    • Likelihoods (Discrete):
    • Independence: Multiply individual feature likelihoods.
    • Parameter Count:
      • Shortcut: For 2 classes and binary features .
    • Zero Frequency: Ruins prediction. Fix with Laplace smoothing.
    • Laplace Formula: Add to numerator, add to denominator.

    Quick Revision: Parameter Estimation

    Quick Revision: Parameter Estimation

    • Discrete MLE: Count frequencies, divide by total.
    • Parameter Count: .
    • Continuous: Assume Gaussian, estimate mean and variance per class.
    • Zero Probability: Use Laplace smoothing. Add to numerator, add to denominator.
    • Missing Data: Ignore instance only for the specific missing feature's conditional probability.

    More short notes in this unit

    chapter
    Decision Trees, Naive Bayes and k-Nearest Neighbors Short Notes for GATE DA: Concepts, Formulas, Worked Examples & Practice

    Decision Trees, Naive Bayes and k-Nearest Neighbors short notes for GATE DA: 6 study cards covering concepts, formulas, shortcuts and exam traps, plus solved

    Free preview ends here

    Login to view the complete short notes

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.