MACHINE LEARNING
106403Module 1: Introduction
Q1a. Which of the following is correct use of cross validation? (i) Selecting variables to include in a model (ii) Comparing predictors (iii) Electing parameters in prediction function (iv) All of the above20222m
Module 1: Introduction
View this question on its own page →Which of the following is correct use of cross validation?
(i) Selecting variables to include in a model
(ii) Comparing predictors
(iii) Electing parameters in prediction function
(iv) All of the aboveWorked SolutionAnswer: (iv) All of the above
Correct uses of Cross Validation (CV):
Cross validation (k-fold, LOOCV, stratified) estimates generalization performance by partitioning data into train/validation folds repeatedly.
- (i) Selecting variables / feature selection: CV error is used to compare subsets of features and choose set with lowest validation error, avoiding overfitting.
- (ii) Comparing predictors / model selection: Compare different model families (e.g., linear vs tree vs SVM) on CV score.
- (iii) Electing / selecting parameters in prediction function (hyperparameter tuning): e.g., choosing in KNN, in ridge, , in SVM via grid search with CV. Also called hyperparameter optimization.
Since all three are standard applications, (iv) All of the above is correct.
Additional note: CV does not train final model; after selection, model is retrained on full training data and evaluated on held-out test set.
Q1a. (a) Who is called the father of Machine Learning? (i) Geoffrey Hill (ii) Geoffrey Chaucer (iii) Geoffrey Everest Hinton (iv) Tom Mitchell20232m
Module 1: Introduction
View this question on its own page →(a) Who is called the father of Machine Learning?
(i) Geoffrey Hill
(ii) Geoffrey Chaucer
(iii) Geoffrey Everest Hinton
(iv) Tom MitchellWorked SolutionAnswer: (iv) Tom Mitchell
Explanation:
- Tom Mitchell is widely cited as the father of Machine Learning in academic curricula (author of Machine Learning, McGraw-Hill, 1997) who gave the formal definition: "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E."
- Arthur Samuel (1959) coined the term Machine Learning and is historically the true pioneer, but he is not listed in options.
- Geoffrey Everest Hinton is the Godfather of Deep Learning, not general ML.
- Options (i) Geoffrey Hill and (ii) Geoffrey Chaucer are distractors (poets).
In the context of this MCQ, expected answer is Tom Mitchell. If strictly historical, Arthur Samuel would be correct.
Q1b. Which of the following statement(s) is/are true for Gradient Decent (GD) and Stochastic Gradient Decent (SGD)? (1) In GD and SGD, you update a set of parameters in an iterative manner to function. minimize the error (2) In SGD, you have to run through all the samples in your training set for a single update of a parameter in each iteration. (3) In GD, you either use the entire data or a subset of training data to update a parameter in each iteration. (i) Only (1) (ii) (1) and (2) only (iii) (3) and (2) only (iv) (1), (2) and (3)20222m
Module 1: Introduction
View this question on its own page →Which of the following statement(s) is/are true for Gradient Decent (GD) and Stochastic Gradient Decent (SGD)?
(1) In GD and SGD, you update a set of parameters in an iterative manner to function. minimize the error
(2) In SGD, you have to run through all the samples in your training set for a single update of a parameter in each iteration.
(3) In GD, you either use the entire data or a subset of training data to update a parameter in each iteration.(i) Only (1)
(ii) (1) and (2) only
(iii) (3) and (2) only
(iv) (1), (2) and (3)Worked SolutionAnswer: (i) Only (1) — as per correct ML theory. Note many exam keys incorrectly mark (ii) due to typo; clarified below.
Statement analysis:
(1) In GD and SGD, you update a set of parameters iteratively to minimize the error — TRUE. Both are iterative optimization algorithms: $w := w - \eta
abla J(w)$.(2) In SGD you have to run through all samples for a single update — FALSE. SGD uses one randomly chosen sample (or one mini-batch) per update. Statement describes Batch GD, not SGD. This is a common textbook error in the question.
(3) In GD you either use entire data or subset to update — FALSE. Standard GD uses entire training set per update. Using a subset is Mini-batch GD or SGD, not vanilla GD.
Strictly: only (1) is true → (i) Only (1). If exam expects (ii) or (iii), it has swapped definitions. Conceptual correct behavior:
- GD: one update per epoch using all examples — expensive but stable.
- SGD: one update per example — noisy but fast, frequent updates.
- Mini-batch: compromise (e.g., 32/64 samples).
Q1c. \(c\) In what type of learning labelled training data is used : (i) unsupervised learning (ii) supervised learning (iii) reinforcement learning (iv) active learning20232m
Module 1: Introduction
View this question on its own page →(c) In what type of learning labelled training data is used :
(i) unsupervised learning
(ii) supervised learning
(iii) reinforcement learning
(iv) active learningWorked SolutionAnswer: (ii) supervised learning
Explanation:
- Supervised learning uses labelled training data i.e. each input is paired with correct output . The algorithm learns a mapping to predict labels for unseen data. Examples: classification (spam detection), regression (house price prediction).
- Unsupervised learning uses unlabelled data to find hidden structure (clustering, dimensionality reduction, association).
- Reinforcement learning uses reward/feedback from environment through trial-and-error, not explicit correct labels.
- Active learning is a special case of semi-supervised where learner queries an oracle for labels of selected instances — it uses labels but the base definition asked is supervised.
Therefore labelled training data is the defining characteristic of supervised learning.
Q2a. Give the three computer applications for which machine learning approaches seem appropriate and three for which they seem inappropriate.20227m
Module 1: Introduction
View this question on its own page →Give the three computer applications for which machine learning approaches seem appropriate and three for which they seem inappropriate.
Worked SolutionThree Applications Where ML is Appropriate (pattern-based, large data, no explicit rule):
- Handwritten Digit/ Face Recognition: Too many variations to code rules; learn from examples (MNIST, CNN). Data abundant, pattern statistical.
- Spam Email Filtering / Recommendation Systems: User preferences shift, need adaptation from labeled feedback; probabilistic text features ideal for Naive Bayes / collaborative filtering.
- Speech Recognition / Machine Translation / Medical Diagnosis from images: No exact algorithmic solution, benefits from deep learning on large datasets (e.g., tumor detection from X-rays).
Three Where ML is Inappropriate (deterministic, exact, safety-critical, small data):
- Simple Arithmetic / Payroll Calculation / Sorting: Exact algorithmic solution exists, 100% accuracy required; ML would approximate and err.
- Real-time Safety-Critical Control with Formal Guarantees (e.g., Aircraft flight control certification, Nuclear reactor shutdown): Need provable correctness, interpretability; ML black-box unreliable, hard to verify.
- Problems with No Data / No Pattern (e.g., determining a cryptographic hash inverse, generating truly random numbers, or one-off legal reasoning requiring causal explanation): ML needs historical data; if data absent or task requires deductive reasoning/common sense not statistical correlation, ML fails.
Criteria: ML appropriate when: large data, pattern exists but not analytically describable, tolerance for probabilistic error, adaptation needed. Inappropriate when: exact solution exists, need guarantee, no data, or solution requires reasoning beyond correlation.
Q2a. Q.2 (a) What are the important objectives of machine learning?20237m
Module 1: Introduction
View this question on its own page →Q.2 (a) What are the important objectives of machine learning?
Worked SolutionImportant Objectives of Machine Learning:
As per ML theory (combines CS, stats, optimization), main objectives:
Prediction / Generalization: Learn model that generalizes to unseen data, minimizing expected risk , not just training error. Overcome overfitting via bias-variance trade-off.
Knowledge Discovery / Pattern Recognition: Extract hidden patterns, associations, trends from large data (data mining).
Automation & Decision Making: Automate tasks requiring human intelligence (classification, recommendation, control) with minimal human intervention.
Handling Uncertainty & Noise: Deal with incomplete, noisy, high-dimensional data via probabilistic modeling.
Adaptation: Continuously improve with more experience (online learning, concept drift).
Optimization: Find efficiently (GD, SGD).
Efficiency & Scalability: Handle big data with feasible computation/memory.
Interpretability vs Performance: Balance accurate black-box (deep nets) vs explainable models.
Specific statistical goals: Minimize empirical risk + regularization:
In short: build systems that learn from data to make accurate, robust, scalable predictions/decisions and discover useful knowledge.
Q2b. Q.2 (b) Explain the inductive biased hypothesis space.20237m
Module 1: Introduction
View this question on its own page →Q.2 (b) Explain the inductive biased hypothesis space.
Worked SolutionInductive Bias and Hypothesis Space:
Hypothesis Space : Set of all hypotheses / functions learner can represent. e.g., for Boolean concepts with attributes, (general-to-specific). For linear regression, .
Inductive Bias: Set of assumptions that learner uses to generalize beyond training data and choose one hypothesis among many consistent ones. Without bias, learner cannot generalize (cannot classify unseen instances).
Mitchell definition: Any basis for choosing one generalization over another beyond consistency with data.
Types:
- Language / Restriction Bias: Restrict (e.g., only conjunctive hypotheses, only linear separators). If true concept not in , cannot learn.
- Preference / Search Bias: Prefer certain hypotheses (e.g., Occam's razor — prefer simpler, smaller trees, smaller weights; regularization prefers low norm). may still contain all, but search ordered.
Example — Candidate Elimination: = conjunctions of attributes. Bias: is conjunctive — cannot learn disjunction .
Example — Decision Tree: Bias: prefers shorter trees (information gain heuristic) that fit data.
Why needed: No Free Lunch — without bias, all hypotheses consistent with data are equally valid, no prediction on unseen point. Bias makes learning possible but limits learnability; incorrect bias → underfitting.
Relation to Occam's Razor: "Prefer simplest hypothesis fitting data" — implemented via MDL, regularization, pruning.
Q6a. Explain the model of over-fitting and under-fitting. Give the example of over-fitting and under-fitting in two-dimensional data.20227m
Module 1: Introduction
View this question on its own page →Explain the model of over-fitting and under-fitting. Give the example of over-fitting and under-fitting in two-dimensional data.
Worked SolutionOverfitting and Underfitting:
Overfitting: Model learns training data too well, including noise/outliers; high variance, low bias. Memorization. . Example: Degree-10 polynomial fitting 10 points with wiggling curve passing through all points.
Underfitting: Model too simple to capture underlying pattern; high bias, low variance. but both high. Example: Linear line fitting parabolic data.
Model complexity view: Train vs Validation error vs capacity (U-shaped test error). Optimal is intermediate capacity (sweet spot) where bias-variance balanced.
2D Example:
Data: Parabolic trend , points near U-shape.
Underfit (linear, degree 1): Straight line cutting through U, misses curvature → large error on both train and test.
y * * \ / data * . linear ___ (misses curve) / \ * *Good fit (degree 2): Parabola captures trend smoothly, generalizes.
Overfit (degree 9+): Wiggly curve passing exactly through every noisy point, oscillates wildly between points — zero train error but huge test error.
Remedies:
- Underfit: increase complexity, add features, reduce regularization, longer training.
- Overfit: more data, regularization (L1/L2), pruning, dropout, early stopping, cross-validation, feature selection, reduce degree.
Visual: Plot vs , noisy quadratic data; underfit = straight line under, overfit = wiggly interpolating, good = smooth quadratic.