Skip to main content

Part A: Short Answer Questions

Course - Machine Learning Algorithms (21CSC555J)
Source Document - University Question Bank (Part A)
Mark Weightage - 2 Marks per Question
Structure - Aligned 1-to-1 with Part_A_Questions.pdf across Sets 1, 2, 3, and 4


Set 1 (Questions 1 to 10)​

Question 1 (2 Marks)​

info

Question Statement

Describe the independent and dependent variable with example? (2 Marks)

  • Independent Variable (XX): The input, predictor, or controlled feature manipulated or observed to evaluate its effect on the system. It is assumed to be exogenous.
  • Dependent Variable (YY): The outcome, response, or target variable whose variation is modeled and predicted as a function of XX: Y=f(X)+ϵY = f(X) + \epsilon
  • Concrete Example: In housing price prediction, the living area in square feet (XX) is the independent variable, while the final selling price in dollars (YY) is the dependent variable.

Question 2 (2 Marks)​

info

Question Statement

Define the logistic regression with mathematical notation? (2 Marks)

  • Definition: Logistic Regression is a supervised classification model that estimates the posterior probability of a binary categorical outcome via the Sigmoid function.
  • Mathematical Formulation: P(Y=1∣x)=σ(z)=11+e−z=11+e−(wTx+b)P(Y = 1 \mid \mathbf{x}) = \sigma(z) = \frac{1}{1 + e^{-z}} = \frac{1}{1 + e^{-(\mathbf{w}^T \mathbf{x} + b)}} where w∈Rd\mathbf{w} \in \mathbb{R}^d is the weight vector, b∈Rb \in \mathbb{R} is the bias, and z=wTx+b=ln⁡(p1−p)z = \mathbf{w}^T \mathbf{x} + b = \ln\left(\frac{p}{1-p}\right) is the log-odds (logit).
  • Decision Rule: y^=1\hat{y} = 1 if P(Y=1∣x)≥0.5  ⟺  z≥0P(Y = 1 \mid \mathbf{x}) \ge 0.5 \iff z \ge 0; otherwise y^=0\hat{y} = 0.

Question 3 (2 Marks)​

info

Question Statement

Define Variance and Bias? (2 Marks)

For an estimator f^(x)\hat{f}(x) predicting true target f(x)f(x) across training sets D\mathcal{D}:

  • Bias (Underfitting Error): The systematic deviation of the model's expected prediction from the ground truth: Bias⁡[f^(x)]=E[f^(x)]−f(x)\operatorname{Bias}[\hat{f}(x)] = \mathbb{E}[\hat{f}(x)] - f(x) High bias stems from overly simplistic assumptions, causing the model to miss underlying trends.
  • Variance (Overfitting Error): The variability of the model's predictions across different random training splits: Var⁡[f^(x)]=E[(f^(x)−E[f^(x)])2]\operatorname{Var}[\hat{f}(x)] = \mathbb{E}\left[ \left(\hat{f}(x) - \mathbb{E}[\hat{f}(x)]\right)^2 \right] High variance stems from excessive model complexity, causing the model to memorize localized sample noise.

Question 4 (2 Marks)​

info

Question Statement

Explain the ROC curve with neat diagram? (2 Marks)

  • Definition: The Receiver Operating Characteristic (ROC) curve evaluates classifier discrimination by plotting the True Positive Rate (TPR) against the False Positive Rate (FPR) across all decision thresholds τ∈[0,1]\tau \in [0, 1].
  • Coordinate Axes:
    • Y-Axis: TPR=Recall=TPTP+FN\text{TPR} = \text{Recall} = \frac{\text{TP}}{\text{TP} + \text{FN}}
    • X-Axis: FPR=1−Specificity=FPFP+TN\text{FPR} = 1 - \text{Specificity} = \frac{\text{FP}}{\text{FP} + \text{TN}}
  • Area Under the Curve (AUC): An AUC=1.0\text{AUC} = 1.0 indicates perfect separability; AUC=0.5\text{AUC} = 0.5 represents random guessing.

Question 5 (2 Marks)​

info

Question Statement

How to find the Optimised threshold for output probability? (2 Marks)

The default threshold τ=0.5\tau = 0.5 is often suboptimal under class imbalance or asymmetric misclassification costs. Optimal thresholds are located via:

  1. Youden's JJ Statistic (ROC-Based): Maximizes the vertical distance from the random chance line: J(τ)=Sensitivity(τ)+Specificity(τ)−1  ⟹  τ∗=arg⁡max⁡τJ(τ)J(\tau) = \text{Sensitivity}(\tau) + \text{Specificity}(\tau) - 1 \implies \tau^* = \arg\max_\tau J(\tau)
  2. Precision-Recall F1F_1 Optimization: Maximizes the harmonic mean: τ∗=arg⁡max⁡τF1(τ)\tau^* = \arg\max_\tau F_1(\tau).
  3. Cost-Utility Minimization: Minimizes total monetary penalty: τ∗=arg⁡min⁡τ[CFP⋅FP(τ)+CFN⋅FN(τ)]\tau^* = \arg\min_\tau \left[ C_{\text{FP}} \cdot \text{FP}(\tau) + C_{\text{FN}} \cdot \text{FN}(\tau) \right]

Question 6 (2 Marks)​

info

Question Statement

Define Gini Index with mathematical notation? (2 Marks)

  • Definition: The Gini Impurity (Index) measures the probability that a randomly chosen element from a dataset would be incorrectly labelled if labelled randomly according to the class distribution.
  • Mathematical Formula: IG(S)=1−∑i=1Cpi2I_G(S) = 1 - \sum_{i=1}^C p_i^2 where CC is the number of classes and pip_i is the relative proportion of class ii in set SS.
  • Bounds: For binary classification, IG∈[0,0.5]I_G \in [0, 0.5]. A pure node has IG=0I_G = 0; a balanced 50/5050/50 node has maximum impurity IG=1−(0.52+0.52)=0.50I_G = 1 - (0.5^2 + 0.5^2) = 0.50.

Question 7 (2 Marks)​

info

Question Statement

Signify the importance of non-linear machine learning models used in supervised classification. (2 Marks)

  • Overcoming Linear Inseparability: Real-world datasets (e.g., XOR patterns, concentric circles, complex fraud topologies) cannot be separated by an affine hyperplane (wTx+b=0\mathbf{w}^T \mathbf{x} + b = 0). Linear models suffer from severe high bias (underfitting) on such tasks.
  • Automated Feature Interactions: Non-linear models (Decision Trees, Kernel SVMs, Neural Networks, Ensembles) learn curved, multi-modal boundaries without requiring manual polynomial feature engineering.

Question 8 (2 Marks)​

info

Question Statement

Differentiate bagging and boosting technique in machine learning model. (2 Marks)

FeatureBagging (Bootstrap Aggregating)Boosting
Model BuildingBase learners train in parallel and independently.Base learners train sequentially and adaptively.
Primary GoalVariance Reduction (stabilizes complex trees).Bias Reduction (converts weak learners to strong).
Sample WeightsUniform random bootstrap sampling (1/N1/N).Adaptive: misclassified points receive higher weights.
Canonical ExampleRandom Forest, Bagged CARTAdaBoost, Gradient Boosting, XGBoost

Question 9 (2 Marks)​

info

Question Statement

Write the assumptions of Naïve Bayes classifier? (2 Marks)

  1. Class-Conditional Feature Independence (Core Assumption): Features X1,X2,…,XdX_1, X_2, \dots, X_d are assumed mutually independent given the class label YY: P(X1,X2,…,Xd∣Y)=∏j=1dP(Xj∣Y)P(X_1, X_2, \dots, X_d \mid Y) = \prod_{j=1}^d P(X_j \mid Y)
  2. Equal Feature Weighting: All predictors contribute equally and independently to the final posterior decision in log-odds space.

Question 10 (2 Marks)​

info

Question Statement

List the distance measures used in machine learning model. (2 Marks)

For vectors u,v∈Rd\mathbf{u}, \mathbf{v} \in \mathbb{R}^d:

  • Euclidean Distance (L2L_2 Norm): Straight-line geometric distance: d2(u,v)=∑i=1d(ui−vi)2d_2(\mathbf{u}, \mathbf{v}) = \sqrt{\sum_{i=1}^d (u_i - v_i)^2}
  • Manhattan Distance (L1L_1 Norm): City-block / taxicab distance (robust to outliers): d1(u,v)=∑i=1d∣ui−vi∣d_1(\mathbf{u}, \mathbf{v}) = \sum_{i=1}^d \lvert u_i - v_i \rvert
  • Minkowski Distance (LpL_p Norm): Generalization parameter pp: dp(u,v)=(∑i=1d∣ui−vi∣p)1/pd_p(\mathbf{u}, \mathbf{v}) = \left(\sum_{i=1}^d \lvert u_i - v_i \rvert^p\right)^{1/p}
  • Cosine Distance: Measures angular orientation (invariant to document length): dcos⁡(u,v)=1−u⋅v∥u∥2∥v∥2d_{\cos}(\mathbf{u}, \mathbf{v}) = 1 - \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\|_2 \|\mathbf{v}\|_2}

Set 2 (Questions 1 to 10)​

Question 1 (2 Marks)​

info

Question Statement

Write the short notes on classification with example? (2 Marks)

  • Definition: Classification is a supervised learning task where an algorithm learns a mapping function f:X→Yf: \mathcal{X} \to \mathcal{Y} from continuous or discrete feature vectors x∈Rd\mathbf{x} \in \mathbb{R}^d to discrete categorical target labels y∈{C1,…,CK}y \in \{C_1, \dots, C_K\}.
  • Categories:
    • Binary: Two mutually exclusive classes (e.g., Default vs. Non-Default).
    • Multi-Class: More than two classes (e.g., Digit recognition 0−90-9).
  • Concrete Example: Email spam filtering, where an incoming email vector is classified into discrete categories: Spam (1)\text{Spam } (1) or Ham (0)\text{Ham } (0).

Question 2 (2 Marks)​

info

Question Statement

What cost function is used for evaluating the loss of the logistic regression model? (2 Marks)

  • Cost Function: The Binary Cross-Entropy Loss (Log Loss), derived via Maximum Likelihood Estimation (MLE): J(w,b)=−1N∑i=1N[yiln⁡(p^i)+(1−yi)ln⁡(1−p^i)]J(\mathbf{w}, b) = -\frac{1}{N} \sum_{i=1}^N \left[ y_i \ln(\hat{p}_i) + (1 - y_i) \ln(1 - \hat{p}_i) \right] where p^i=σ(wTxi+b)\hat{p}_i = \sigma(\mathbf{w}^T \mathbf{x}_i + b) and yi∈{0,1}y_i \in \{0, 1\}.
  • Why Not MSE? Combining Mean Squared Error with the non-linear sigmoid generates a non-convex surface with local minima. Cross-Entropy guarantees a strictly convex surface with a unique global minimum.

Question 3 (2 Marks)​

info

Question Statement

What is Overfitting and Underfitting? (2 Marks)

  • Underfitting (High Bias, Low Variance):
    • Symptom: High training error and high test error (Etrain≫0,Etest≫0E_{\text{train}} \gg 0, E_{\text{test}} \gg 0).
    • Cause: Model is too simple to capture the underlying pattern (e.g., fitting a straight line to quadratic data).
  • Overfitting (Low Bias, High Variance):
    • Symptom: Near-zero training error but high test error (Etrain≈0,Etest≫0E_{\text{train}} \approx 0, E_{\text{test}} \gg 0).
    • Cause: Model is overly complex and memorizes localized noise and outliers instead of generalizable trends.

Question 4 (2 Marks)​

info

Question Statement

State the Kappa Statistics to measure the model performance. (2 Marks)

  • Definition: Cohen's Kappa (κ\kappa) measures classification agreement between predictions and ground truth while explicitly adjusting for agreement occurring purely by chance: κ=po−pe1−pe\kappa = \frac{p_o - p_e}{1 - p_e}
  • Parameters:
    • pop_o: Observed agreement proportion (TP+TNN\frac{\text{TP} + \text{TN}}{N}).
    • pep_e: Expected chance agreement calculated from marginal totals.
  • Interpretation: κ=1.0\kappa = 1.0 (perfect agreement), κ=0\kappa = 0 (pure random chance). It is far more reliable than raw accuracy on imbalanced datasets.

Question 5 (2 Marks)​

info

Question Statement

Define Up Sampling and Down Sampling? (2 Marks)

Data-level resampling techniques used to resolve class imbalance:

  • Up-Sampling (Over-sampling): Increases the minority class count to match the majority class. Modern approaches use SMOTE (Synthetic Minority Over-sampling Technique) to interpolate synthetic feature vectors between kk-nearest minority neighbors.
  • Down-Sampling (Under-sampling): Decreases majority class instances to match minority frequency by randomly removing or strategically filtering majority samples (e.g., NearMiss, Tomek Links).

Question 6 (2 Marks)​

info

Question Statement

Define KNN model with example? (2 Marks)

  • Definition: K-Nearest Neighbors (KNN) is an instance-based, non-parametric lazy learner. It retains all training instances in memory and classifies a query point by taking the majority vote among its kk closest neighbors: y^=arg⁡max⁡c∑i∈Nk(x∗)I(yi=c)\hat{y} = \arg\max_c \sum_{i \in \mathcal{N}_k(\mathbf{x}^*)} \mathbb{I}(y_i = c)
  • Concrete Example: Classifying a loan applicant by Income (₹50,000) and Credit Score (720720). If the k=3k = 3 closest historical applicants are [Approve,Approve,Reject][\text{Approve}, \text{Approve}, \text{Reject}], the model predicts Approve.

Question 7 (2 Marks)​

info

Question Statement

How decision tree handles the overfitting? (2 Marks)

Decision trees control overfitting through two primary mechanisms:

  1. Pre-Pruning (Early Stopping): Stops tree expansion during construction if stopping constraints are reached:
    • Setting max_depth, min_samples_split, min_samples_leaf, or max_leaf_nodes.
  2. Post-Pruning (Cost-Complexity Pruning): Grows the tree to maximum depth, then collapses non-critical subtrees bottom-up using a complexity penalty: Rα(T)=R(T)+α∣T∣R_\alpha(T) = R(T) + \alpha \lvert T \rvert where R(T)R(T) is classification error and ∣T∣\lvert T \rvert is leaf count.

Question 8 (2 Marks)​

info

Question Statement

Signify the advantages of random forest technique. (2 Marks)

  1. Variance Reduction Without Overfitting: Adding more trees monotonically stabilizes variance without increasing test error.
  2. Tree Decorrelation: Random feature subspacing (m=pm = \sqrt{p}) prevents dominant features from dictating every tree split, driving pairwise correlation ρ→0\rho \to 0.
  3. Built-in Out-of-Bag (OOB) Validation: Provides an unbiased error estimate during training without requiring a separate holdout set.
  4. Native Feature Importance: Computes feature contributions automatically via Mean Decrease in Impurity (MDI).

Question 9 (2 Marks)​

info

Question Statement

Define Bayes Theorem (2 Marks)

  • Definition: Bayes' Theorem calculates the posterior probability of a hypothesis HH given observed evidence EE by inverting likelihood probabilities.
  • Mathematical Formula: P(H∣E)=P(E∣H)P(H)P(E)P(H \mid E) = \frac{P(E \mid H) P(H)}{P(E)}
  • Component Terms:
    • P(H∣E)P(H \mid E): Posterior Probability (updated belief after observing evidence).
    • P(E∣H)P(E \mid H): Likelihood of evidence given hypothesis is true.
    • P(H)P(H): Prior Probability (initial baseline belief).
    • P(E)P(E): Marginal Evidence (normalization factor: ∑iP(E∣Hi)P(Hi)\sum_i P(E \mid H_i)P(H_i)).

Question 10 (2 Marks)​

info

Question Statement

What are the various steps involved in building a machine learning model? (2 Marks)

  1. Problem Definition: Specify the business target, problem type (classification/regression), and evaluation metric.
  2. Data Collection & Cleaning: Ingest raw data; resolve missing values, corrupt records, and outliers.
  3. Exploratory Data Analysis (EDA): Assess feature distributions, skewness, correlations, and class balance.
  4. Feature Engineering & Preprocessing: Encode categorical variables, scale numerical features, split into train/val/test sets.
  5. Model Training: Fit candidate baseline and ensemble algorithms.
  6. Hyperparameter Tuning: Optimize model parameters via stratified cross-validation.
  7. Evaluation & Deployment: Audit performance on held-out test data; deploy via REST API with performance drift monitoring.

Set 3 (Questions 11 to 20)​

Question 11 (2 Marks)​

info

Question Statement

Write the short notes on classification with example? (2 Marks)

  • Definition: Classification is a supervised learning task where an algorithm learns a mapping function f:X→Yf: \mathcal{X} \to \mathcal{Y} from continuous or discrete feature vectors x∈Rd\mathbf{x} \in \mathbb{R}^d to discrete categorical target labels y∈{C1,…,CK}y \in \{C_1, \dots, C_K\}.
  • Categories: Binary (e.g., Pass/Fail) and Multi-Class (e.g., Disease categories).
  • Example: Predicting whether a transaction is Legitimate (00) or Fraudulent (11).

Question 12 (2 Marks)​

info

Question Statement

Define the logistic regression with mathematical notation? (2 Marks)

  • Definition: A linear model for binary classification that outputs probabilities using the logistic sigmoid function: P(Y=1∣x)=σ(wTx+b)=11+e−(wTx+b)P(Y = 1 \mid \mathbf{x}) = \sigma(\mathbf{w}^T \mathbf{x} + b) = \frac{1}{1 + e^{-(\mathbf{w}^T \mathbf{x} + b)}}
  • Logit Form: ln⁡(p1−p)=wTx+b\ln\left(\frac{p}{1-p}\right) = \mathbf{w}^T \mathbf{x} + b.

Question 13 (2 Marks)​

info

Question Statement

What is Overfitting and Underfitting? (2 Marks)

  • Underfitting: High bias, low capacity; model fails to capture training patterns (Etrain≫0E_{\text{train}} \gg 0).
  • Overfitting: High variance, excessive capacity; model fits training noise and generalizes poorly (Etrain≈0,Etest≫0E_{\text{train}} \approx 0, E_{\text{test}} \gg 0).

Question 14 (2 Marks)​

info

Question Statement

Explain the ROC curve with neat diagram? (2 Marks)

  • Axes: True Positive Rate (Recall=TPTP+FN\text{Recall} = \frac{\text{TP}}{\text{TP}+\text{FN}}) on Y-axis vs. False Positive Rate (1−Specificity=FPFP+TN1 - \text{Specificity} = \frac{\text{FP}}{\text{FP}+\text{TN}}) on X-axis across all thresholds τ∈[0,1]\tau \in [0, 1].
  • AUC: Measures ranking quality (AUC=1.0\text{AUC}=1.0 is ideal; AUC=0.5\text{AUC}=0.5 is random chance).

Question 15 (2 Marks)​

info

Question Statement

Define Up Sampling and Down Sampling? (2 Marks)

  • Up-Sampling: Increasing minority class representation by duplicating or synthetically interpolating new instances (e.g., SMOTE).
  • Down-Sampling: Decreasing majority class representation by randomly or strategically removing instances (e.g., NearMiss).

Question 16 (2 Marks)​

info

Question Statement

How decision tree handles the overfitting? (2 Marks)

  • Pre-Pruning: Early stopping based on max_depth, min_samples_split, or min_impurity_decrease.
  • Post-Pruning: Growing the full tree and pruning subtrees using Cost-Complexity penalty Rα(T)=R(T)+α∣T∣R_\alpha(T) = R(T) + \alpha \lvert T \rvert.

Question 17 (2 Marks)​

info

Question Statement

What is ensemble learning and write the types? (2 Marks)

  • Definition: Combining multiple diverse base models to improve predictive performance and robustness.
  • Types: Bagging (Bootstrap Aggregation), Boosting (Adaptive Sequential), Stacking (Meta-Learner), and Voting (Hard/Soft).

Question 18 (2 Marks)​

info

Question Statement

Signify the advantages of random forest technique. (2 Marks)

  • Variance Reduction: Aggregating decorrelated trees eliminates variance without increasing bias.
  • Feature Subspacing: Choosing random subsets of features (m=pm = \sqrt{p}) at each split prevents dominant features from dictating all trees.
  • Built-in OOB Error: Unbiased internal validation from the ≈36.8%\approx 36.8\% unselected bootstrap instances.

Question 19 (2 Marks)​

info

Question Statement

Define KNN model with example? (2 Marks)

  • Definition: An instance-based non-parametric classifier that assigns a query point the majority label among its kk nearest neighbors: y^=arg⁡max⁡c∑i∈Nk(x∗)I(yi=c)\hat{y} = \arg\max_c \sum_{i \in \mathcal{N}_k(\mathbf{x}^*)} \mathbb{I}(y_i = c)
  • Example: In customer segmentation, classifying a new shopper by Euclidean proximity to the k=5k = 5 closest historical profiles.

Question 20 (2 Marks)​

info

Question Statement

What are the types of naïve bayes classifier? (2 Marks)

  1. Gaussian Naïve Bayes: Continuous real-valued features modeled with normal distribution N(μ,σ2)\mathcal{N}(\mu, \sigma^2).
  2. Multinomial Naïve Bayes: Discrete integer count/frequency features (standard for Bag-of-Words text).
  3. Bernoulli Naïve Bayes: Binary boolean features (xi∈{0,1}x_i \in \{0, 1\}) indicating word presence or absence.

Set 4 (Questions 1 to 10)​

Question 1 (2 Marks)​

info

Question Statement

Difference between Supervised and Unsupervised Learning with examples? (2 Marks)

FeatureSupervised LearningUnsupervised Learning
DataLabelled pairs {(xi,yi)}\{(\mathbf{x}_i, y_i)\}Unlabelled feature vectors {xi}\{\mathbf{x}_i\}
GoalPredict target for unseen inputsDiscover natural clusters or latent representations
ExamplesLinear Regression, Logistic Regression, SVMK-Means, PCA, DBSCAN, Autoencoders

Question 2 (2 Marks)​

info

Question Statement

What cost function is used for evaluating the loss of the logistic regression model? (2 Marks)

  • Function: Binary Cross-Entropy (Log Loss): J(w,b)=−1N∑i=1N[yiln⁡(p^i)+(1−yi)ln⁡(1−p^i)]J(\mathbf{w}, b) = -\frac{1}{N} \sum_{i=1}^N \left[ y_i \ln(\hat{p}_i) + (1 - y_i) \ln(1 - \hat{p}_i) \right]
  • Property: Strictly convex with respect to w\mathbf{w}, avoiding the local minima of Mean Squared Error.

Question 3 (2 Marks)​

info

Question Statement

Define Variance and Bias? (2 Marks)

  • Bias: Error from erroneous assumptions; difference between expected model prediction and ground truth (E[f^]−f\mathbb{E}[\hat{f}] - f).
  • Variance: Error from sensitivity to training data fluctuations; spread of predictions around the mean (E[(f^−E[f^])2]\mathbb{E}[(\hat{f} - \mathbb{E}[\hat{f}])^2]).

Question 4 (2 Marks)​

info

Question Statement

Define Recall and Precision (2 Marks)

  • Precision: Proportion of positive alerts that are true: Precision=TPTP+FP\text{Precision} = \frac{\text{TP}}{\text{TP} + \text{FP}}
  • Recall: Proportion of actual positives successfully detected: Recall=TPTP+FN\text{Recall} = \frac{\text{TP}}{\text{TP} + \text{FN}}

Question 5 (2 Marks)​

info

Question Statement

What is Data imbalance and how it affects the model performance? (2 Marks)

  • Definition: Severe disproportion between classes (e.g., 99.5%99.5\% negative, 0.5%0.5\% positive).
  • Impact: Generates the Accuracy Paradox (predicting the majority class yields deceptively high accuracy while missing all critical minority events) and shifts decision boundaries away from the minority class.

Question 6 (2 Marks)​

info

Question Statement

Define Gini Index with mathematical notation? (2 Marks)

  • Formula: IG(S)=1−∑i=1Cpi2I_G(S) = 1 - \sum_{i=1}^C p_i^2
  • Meaning: Measures node impurity. IG=0I_G = 0 for a pure node; IG=0.5I_G = 0.5 for an equally balanced two-class split.

Question 7 (2 Marks)​

info

Question Statement

Difference between the adaboost and gradient boosting (2 Marks)

DimensionAdaBoostGradient Boosting
Adaptive MechanismUpdates sample weights based on classification error.Fits base trees directly to pseudo-residuals (loss gradients).
Loss SupportRestricted primarily to Exponential Loss.Optimizes arbitrary differentiable losses (MSE, Log-Loss, Huber).
Base LearnerDecision stumps (depth 1).Shallow regression trees (depth 3 to 6).

Question 8 (2 Marks)​

info

Question Statement

Define Random forest with its hyper parameters? (2 Marks)

  • Definition: An ensemble of decision trees trained on bootstrap samples with random feature subspacing at each node split.
  • Key Hyperparameters:
    • n_estimators: Number of trees in the forest.
    • max_features: Number of randomly sampled candidate features at each split (m=pm = \sqrt{p}).
    • max_depth: Maximum allowed tree depth to constrain tree complexity.
    • min_samples_split: Minimum samples required to split an internal node.

Question 9 (2 Marks)​

info

Question Statement

Define Bayes Theorem (2 Marks)

  • Formula: P(A∣B)=P(B∣A)P(A)P(B)P(A \mid B) = \frac{P(B \mid A) P(A)}{P(B)}
  • Terms: P(A∣B)P(A \mid B) is the posterior, P(B∣A)P(B \mid A) is the likelihood, P(A)P(A) is the prior, and P(B)P(B) is the marginal evidence.

Question 10 (2 Marks)​

info

Question Statement

What are the Distance measures are used in the KNN model? (2 Marks)

  1. Euclidean Distance (L2L_2): d(u,v)=∑(ui−vi)2d(\mathbf{u}, \mathbf{v}) = \sqrt{\sum (u_i - v_i)^2} (straight line).
  2. Manhattan Distance (L1L_1): d(u,v)=∑∣ui−vi∣d(\mathbf{u}, \mathbf{v}) = \sum \lvert u_i - v_i \rvert (grid based).
  3. Minkowski Distance (LpL_p): d(u,v)=(∑∣ui−vi∣p)1/pd(\mathbf{u}, \mathbf{v}) = \left(\sum \lvert u_i - v_i \rvert^p\right)^{1/p}.
  4. Cosine Distance: 1−u⋅v∥u∥2∥v∥21 - \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\|_2 \|\mathbf{v}\|_2} (angular orientation).
tip

Examiner's Note

This page mirrors the exact 4 sets from Part_A_Questions.pdf. Structuring every 2-mark question with bold definitions, explicit equations, and clear examples guarantees maximum rubric hit rates during university evaluations.