Decision Trees, Naive Bayes and k-Nearest Neighbors Previous Year Questions (PYQs) for GATE DA: 3+ Solved Questions with Step-by-Step Solutions

    Solve 3+ Decision Trees, Naive Bayes and k-Nearest Neighbors previous year questions for GATE DA with answers and detailed solutions. Free sample questions below.

    k-Nearest Neighbors Classification

    k-Nearest Neighbors Classification

    "Tell me who your neighbors are, and I will tell you who you are."

    Supervised Learning → Decision Trees, Naive Bayes & k-NN

    What you will learn here

    • The core intuition behind instance-based, lazy learning.
    • Step-by-step distance calculation and majority voting.
    • Critical exam traps: choice of k, feature scaling, and decision boundaries.

    The Core Intuition: Lazy Learning

    The Core Intuition: Lazy Learning

    k-Nearest Neighbors (k-NN) is an instance-based or lazy learning algorithm.

    • No explicit training phase: The algorithm does not learn a generalized function or estimate parameters. It merely stores the entire training dataset in memory.
    • Prediction is the real work: All computation is deferred until a prediction is required for a new, unseen query point.
    • The fundamental assumption: Data points that are close to each other in the feature space are likely to belong to the same class.

    Decision Trees, Naive Bayes and k-Nearest Neighbors: Solved Questions with Step-by-Step Explanations (3 Problems)

    Question 1 · Machine Learning NAT
    Given the two-dimensional dataset consisting of 5 data points from two classes
    (circles and squares) and assume that the Euclidean distance is used to measure the
    distance between two points. The minimum odd value of in -nearest neighbor
    algorithm for which the diamond (⋄) shaped data point is assigned the label square
    is ______.
    12341234
    Question 2 · Machine Learning MCQ
    Given a dataset with binary-valued attributes (where ) for a two-class
    classification task, the number of parameters to be estimated for learning a naïve
    Bayes classifier is
    1. A.

    2. B.

    3. C.

    4. D.

    Question 3 · Machine Learning NAT
    Details of ten international cricket games between two teams “Green” and “Blue”
    are given in Table C. This table consists of matches played on different pitches,
    across formats along with their winners. The attribute Pitch can take one of two
    values: spin-friendly (represented as ) or pace-friendly (represented as ). The
    attribute Format can take one of two values: one-day match (represented as ) or
    test match (represented as .
    A cricket organization would like to use the information given in Table C to develop
    a decision-tree model to predict outcomes of future games between these two teams.
    To develop such a model, the computed InformationGain(C, Pitch) with respect to
    the Target is ______ (rounded off to two decimal places).

    Match NumberPitchFormatWinner (Target)
    1Green
    2Blue
    3Blue
    4Blue
    5Green
    6Blue
    7Green
    8Blue
    9Blue
    10Green

    More previous year questions (pyqs) in this unit

    chapter
    Decision Trees, Naive Bayes and k-Nearest Neighbors Previous Year Questions (PYQs) for GATE DA: 3+ Solved Questions with Step-by-Step Solutions

    Solve 3+ Decision Trees, Naive Bayes and k-Nearest Neighbors previous year questions for GATE DA with answers and detailed solutions. Free sample questions be

    A question from this chapter

    Question 1
    Given the two-dimensional dataset consisting of 5 data points from two classes
    (circles and squares) and assume that the Euclidean distance is used to measure the
    distance between two points. The minimum odd value of in -nearest neighbor
    algorithm for which the diamond (⋄) shaped data point is assigned the label square
    is ______.
    12341234
    Question 2
    Given a dataset with binary-valued attributes (where ) for a two-class
    classification task, the number of parameters to be estimated for learning a naïve
    Bayes classifier is
    Question 3
    Details of ten international cricket games between two teams “Green” and “Blue”
    are given in Table C. This table consists of matches played on different pitches,
    across formats along with their winners. The attribute Pitch can take one of two
    values: spin-friendly (represented as ) or pace-friendly (represented as ). The
    attribute Format can take one of two values: one-day match (represented as ) or
    test match (represented as .
    A cricket organization would like to use the information given in Table C to develop
    a decision-tree model to predict outcomes of future games between these two teams.
    To develop such a model, the computed InformationGain(C, Pitch) with respect to
    the Target is ______ (rounded off to two decimal places).

    Match NumberPitchFormatWinner (Target)
    1Green
    2Blue
    3Blue
    4Blue
    5Green
    6Blue
    7Green
    8Blue
    9Blue
    10Green
    Free preview ends here

    Login to view the complete previous-year questions and solutions

    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.