Part 1: Core Concepts (2 Marks)
- Machine Learning (Tom Mitchell’s Definition): A computer program is said to learn from experience
with respect to some class of tasks and performance measure , if its performance at tasks in , as measured by , improves with experience . - Learning Paradigms:
- Supervised Learning: Learning a mapping function
from labeled training pairs to predict continuous outcomes (Regression) or discrete categories (Classification). - Unsupervised Learning: Discovering latent patterns, clusters, or distributions within unlabeled datasets
without predefined ground-truth targets. - Reinforcement Learning: An agent interacting with an environment learning an optimal policy
via trial-and-error to maximize cumulative discounted rewards over time.
- Supervised Learning: Learning a mapping function
- Inductive Bias: The set of fundamental assumptions and preferences an algorithm makes beyond the observable training data in order to generalize to unseen instances (e.g., Occam’s razor preference for simpler decision trees).
- Bias-Variance Tradeoff: A fundamental statistical tension where total expected prediction error decomposes into:
- High Bias (Underfitting): Model is too simplistic, missing underlying trends.
- High Variance (Overfitting): Model memorizes training noise, failing to generalize to validation data.
Part 2: Structural Frameworks (10 Marks)
1. The Machine Learning Engineering Lifecycle Pipeline
| DATA COLLECTION | ----> | DATA PREPROCESSING | ----> | FEATURE ENGINEERING |
|---|---|---|---|---|
| Raw Logs, APIs, | Imputation, Scaling | Encoding, Selection | ||
| Databases, Sensors | Outlier Handling | Dimensionality Red. | ||
| MLOps & MONITORING | <---- | MODEL EVALUATION | <---- | MODEL TRAINING |
| Drift Detection, | Cross-Validation, | Gradient Descent, | ||
| Continuous CI/CD | ROC-AUC, F1-Score | Hyperparameter Tune |
2. K-Fold Cross-Validation Framework ( )
- Dataset D partitioned into 5 equal folds
- Iteration 1: [ Test (F1) ] [ Train (F2) ] [ Train (F3) ] [ Train (F4) ] [ Train (F5) ] -> Score 1
- Iteration 2: [ Train (F1) ] [ Test (F2) ] [ Train (F3) ] [ Train (F4) ] [ Train (F5) ] -> Score 2
- Iteration 3: [ Train (F1) ] [ Train (F2) ] [ Test (F3) ] [ Train (F4) ] [ Train (F5) ] -> Score 3
- Iteration 4: [ Train (F1) ] [ Train (F2) ] [ Train (F3) ] [ Test (F4) ] [ Train (F5) ] -> Score 4
- Iteration 5: [ Train (F1) ] [ Train (F2) ] [ Train (F3) ] [ Train (F4) ] [ Test (F5) ] -> Score 5
- Overall CV Performance: E_CV = (1/K) * sum(Score_i)
Part 3: Distinction Tables
| Basis of Comparison | Parametric Machine Learning Models | Non-Parametric Machine Learning Models |
|---|---|---|
| Model Structure | Fixed, predetermined number of parameters regardless of data size | Number of parameters grows flexibly with the training dataset size |
| Data Assumptions | Makes strong distributional assumptions (e.g., linearity, normality) | Makes very few or no rigid assumptions about data distribution |
| Training Speed | Fast; requires optimizing fixed parameter vector | Often slow; scales with |
| Memory Footprint | Low; only stores learned weights |
High; frequently needs entire training dataset in memory (e.g., KNN) |
| Risk Profile | High bias if assumptions fail; low variance | High variance and prone to overfitting if not regularized |
| Typical Examples | Linear Regression, Logistic Regression, Linear SVM | K-Nearest Neighbors (KNN), Decision Trees, RBF-SVM |
Part 4: Worked Problems & Exam Traps
Problem Archetype: Decomposing Prediction Error and Combatting Overfitting
Question: A predictive model demonstrates
- Diagnosis:
- High performance discrepancy indicates severe Overfitting characterized by Low Bias and High Variance.
- The model has memorized idiosyncrasies, noise, and outliers of the training set rather than learning generalizable underlying patterns.
- Remediation Interventions:
- Regularization: Introduce
(Lasso) or (Ridge) penalties to shrink weights: - Data Augmentation / Acquisition: Collect additional training samples to penalize spurious correlations.
- Dimensionality Reduction: Apply PCA or SelectKBest to prune irrelevant features.
- Early Stopping / Pruning: Halt iterative training when validation loss begins to diverge, or prune decision tree depth (e.g.,
max_depth = 5).
- Regularization: Introduce
TU Exam Trap: Students often confuse data leakage during preprocessing. If you normalize data (e.g.,
StandardScaler) using the entire dataset before splitting into train/test sets, test distribution information leaks into the training pipeline! You must fit scalers strictly on the training set only (scaler.fit_transform(X_train)), and then transform test data using those exact learned parameters (scaler.transform(X_test)).