IITP · Semester ISummaries · Quizzes · Assignments

EAI 6103 — Advanced Machine Learning

Assignment 2 — Regression & Classification Basics

Source: IITP\Sem-1\AML\assignments\assignment-2.md

Topic: Regularisation · scatter plots · confusion matrix · loss functions · supervised vs unsupervised · hold-out Questions: 10 MCQ Source: class WhatsApp group (Chats/WhatsApp-Cheat-code/chat.md), set "EAI 6103 / EAS 6103 — Advanced Machine Learning — Assignment-2".

Fidelity note: the export posted only the correct option text, not the other options.

Verification: ✅ all 10 marked answers checked — all correct.


Quick answer key

Q Answer Q Answer
1 a — moderation term works with both polynomial and linear regression 6 d — K-means clustering
2 b — Scatter plot 7 d — Squared-error
3 b — Maximise true positives and true negatives 8 a — Data splitting method
4 a — Can't say; depends on the application 9 b — Strongly increases the probability of success
5 b — Binary cross-entropy 10 b — Predicts negative when actually positive

Q1. Which statement is correct (about the moderation / regularisation term)?

✅ Answer: a — Adding the moderation term works with both polynomial and linear regression

A penalty added to the objective — ridge/L2, lasso/L1, or a "moderation" shrinkage term on the coefficients — is a property of the estimator, not of the degree of the basis. It therefore applies to linear regression and equally to polynomial regression (which is still linear in its parameters). Related: regularisation shrinks coefficients to trade bias for variance; it does not make a model nonlinear. Watch out: "regularisation only helps high-degree models" is the usual wrong option.


Q2. To test linear relationship of y (dependent) and x (independent) continuous variables, which plot is best suited?

✅ Answer: b — Scatter plot

A scatter plot puts one continuous variable per axis, so the shape of the relationship (linear, curved, clustered, heteroscedastic) is directly visible. Related: a correlation coefficient gives a single number but hides curvature and outliers; a residual-vs-fitted plot checks the same assumption after fitting.


Q3. Select correct statement — always try to maximise:

✅ Answer: b — True Positive and True Negative

TP and TN are the correct decisions, so maximising both maximises accuracy. Related: TP and TN together matter — maximising TP alone (recall) is trivial (predict everything positive). Precision/recall/F1 are the right tools when the classes are imbalanced.


Q4. Select correct statement (which metric/model is better):

✅ Answer: a — Can't say; it depends on the application

Metric choice is driven by the cost of errors in the domain: a cancer screen tolerates false positives to avoid false negatives, a spam filter does the reverse. Related: never compare models on a single metric without stating the error costs — this is why precision/recall/F1/ROC-AUC all exist.


Q5. Which of these is a commonly used loss function for binary classification?

✅ Answer: b — Binary cross-entropy

BCE = −[y log ŷ + (1−y) log(1−ŷ)] is the standard (negative log-likelihood) loss for a Bernoulli target, and its gradient with a sigmoid is exactly (ŷ−y). Related: squared error is for regression; hinge loss is for SVM; categorical cross-entropy generalises BCE to >2 classes.


Q6. Which type of machine learning algorithm falls under "unsupervised learning"?

✅ Answer: d — K-means clustering

K-means needs no labels; it partitions points by distance to centroids. Related: logistic and linear regression are supervised. PCA and DBSCAN are the other canonical unsupervised members.


Q7. Which evaluation metric can be used while modelling a continuous/numerical output variable?

✅ Answer: d — Squared-error

Squared error (MSE/RMSE/SSE) measures the distance between predicted and actual real values. Related: accuracy, AUC-ROC and recall all require discrete class labels and are undefined for a continuous target.


Q8. Hold out method is a type of:

✅ Answer: a — Data splitting method

Same concept as Assignment 1 Q1 (options reshuffled there — the answer was letter c). Related: hold-out vs k-fold vs LOOCV; use stratification for imbalanced classes.


Q9. In logistic regression, a very large positive coefficient for a predictor indicates:

✅ Answer: b — The predictor strongly increases the probability of success

The log-odds are linear in w; a large positive w means each unit of that feature raises the log-odds substantially, i.e. pushes the predicted probability toward 1. Related: the coefficient is on the log-odds scale, so "large" is relative to the feature's units — standardise features before comparing magnitudes.


Q10. In a binary classification confusion matrix, what does "False Negative (FN)" represent?

✅ Answer: b — Model predicts negative when it's actually positive

The prediction is negative; the truth is positive. A miss. Related: FN drives recall (TP/(TP+FN)); FP drives precision. In medical screening an FN is usually the expensive error.