Unit 3: Supervised Machine Learning - Practice Quiz

CSE252 — Introduction To Artificial Intelligence And Machine Learning 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the main purpose of linear regression?

Regression (Linear Regression) Easy
A. To predict a continuous value
B. To classify images into categories
C. To reduce the number of features
D. To group unlabeled data

2 Which type of relationship does simple linear regression usually model?

Regression (Linear Regression) Easy
A. A straight-line relationship
B. A random relationship
C. A circular relationship
D. A branching relationship

3 In linear regression, what is the target variable?

Regression (Linear Regression) Easy
A. The number of training rows
B. The name of the algorithm
C. The value being predicted
D. The learning rate

4 What is polynomial regression designed to model?

Regression (Polynomial Regression) Easy
A. Missing data values
B. Curved relationships
C. Only binary labels
D. Unlabeled groups

5 Which expression represents a second-degree polynomial model?

Regression (Polynomial Regression) Easy
A.
B.
C.
D.

6 What does a decision tree regression model predict?

Regression (Decision Tree Regression) Easy
A. A set of text documents
B. A continuous numerical value
C. A list of class names
D. A group of unrelated features

7 How does a decision tree divide the input data?

Regression (Decision Tree Regression) Easy
A. By deleting all features
B. By using feature-based rules
C. By assigning random labels
D. By sorting values alphabetically

8 What is logistic regression commonly used for?

Classification (Logistic Regression) Easy
A. Data compression
B. Binary classification
C. Image resizing
D. Database indexing

9 Which function is commonly associated with logistic regression?

Classification (Logistic Regression) Easy
A. Sorting function
B. Square-root function
C. Sigmoid function
D. Counting function

10 What does a probability near 0.9 usually indicate in binary classification?

Classification (Logistic Regression) Easy
A. Strong support for the negative class
B. Strong support for the positive class
C. A guaranteed numerical prediction
D. A missing input value

11 How does K-Nearest Neighbour classify a new observation?

Classification (K-Nearest Neighbour) Easy
A. By using only the largest feature
B. By fitting a single straight line
C. By using nearby labeled observations
D. By removing nearby observations

12 What does the value of represent in K-Nearest Neighbour?

Classification (K-Nearest Neighbour) Easy
A. The number of missing values
B. The number of neighbors considered
C. The number of model layers
D. The number of output classes

13 Which distance measure is commonly used in K-Nearest Neighbour?

Classification (K-Nearest Neighbour) Easy
A. Financial distance
B. Temporal distance
C. Alphabetical distance
D. Euclidean distance

14 What does a decision tree classifier predict?

Classification (Introduction to Decision Tree Classifier and Random Forest) Easy
A. A class label
B. A feature scale
C. A continuous curve
D. A database table

15 What is a random forest?

Classification (Introduction to Decision Tree Classifier and Random Forest) Easy
A. A collection of decision trees
B. A method for removing labels
C. A single linear equation
D. A list of random features

16 How does a random forest usually choose a class for classification?

Classification (Introduction to Decision Tree Classifier and Random Forest) Easy
A. By selecting the rarest class
B. By choosing the first tree
C. By averaging class names
D. By majority voting

17 Naïve Bayes is based mainly on which mathematical concept?

Classification (Naïve Bayes) Easy
A. Pythagoras' theorem
B. Bayes' theorem
C. The chain rule
D. The quadratic formula

18 What assumption does the naïve part of Naïve Bayes make?

Classification (Naïve Bayes) Easy
A. Labels are completely random
B. Features always have equal values
C. Features are conditionally independent
D. Classes contain no observations

19 What does high bias usually indicate?

Concepts of Bias, Variance, Underfitting and Overfitting Easy
A. The data has no features
B. The model memorizes every example
C. The model has too many trees
D. The model is too simple

20 What is overfitting?

Concepts of Bias, Variance, Underfitting and Overfitting Easy
A. Ignoring all input features
B. Using too few training examples
C. Learning training data too closely
D. Predicting only continuous values

21 A linear regression model is . What is the predicted value when and ?

Linear Regression Medium
A.
B.
C.
D.

22 A linear regression model has a coefficient of for advertising cost, measured in thousands of dollars. How should this coefficient be interpreted when other variables remain fixed?

Linear Regression Medium
A. Each increase raises the prediction by
B. Each increase reduces the prediction by
C. Each increase reduces the prediction by
D. Each increase reduces the prediction by

23 A quadratic regression model is . At which value of does the model reach its maximum predicted value?

Polynomial Regression Medium
A.
B.
C.
D.

24 A degree-10 polynomial model has very low training error but much higher validation error. Which change is most likely to improve its generalization?

Polynomial Regression Medium
A. Train on fewer observations
B. Remove the validation set
C. Reduce the polynomial degree
D. Add more polynomial terms

25 A regression-tree leaf contains target values , , , and . Assuming standard squared-error training, what prediction is made for a new sample reaching this leaf?

Decision Tree Regression Medium
A.
B.
C.
D.

26 Why can the predictions of an unpruned decision tree regressor change sharply when an input crosses a split threshold?

Decision Tree Regression Medium
A. It standardizes each input independently
B. It produces piecewise-constant predictions
C. It averages every training target globally
D. It always fits a polynomial function

27 A logistic regression model outputs a probability of for the positive class. What class is predicted using a threshold of ?

Logistic Regression Medium
A. Both classes equally
B. No class can be assigned
C. The negative class
D. The positive class

28 In a logistic regression model, a feature has coefficient . Holding other features constant, what happens to the odds of the positive class when this feature increases by one unit?

Logistic Regression Medium
A. The odds increase by percent
B. The odds are halved
C. The odds are doubled
D. The probability is always doubled

29 A K-Nearest Neighbour classifier uses age values from to and annual income values from to . What should usually be done before computing Euclidean distances?

K-Nearest Neighbour Medium
A. Sort samples by income
B. Scale both numerical features
C. Convert both features to labels
D. Remove the age feature

30 A 5-NN classifier finds neighbor labels for a new sample. What class will it predict using majority voting?

K-Nearest Neighbour Medium
A. A tied class
B. An unknown class
C. Class
D. Class

31 Increasing from to a moderately larger value in K-Nearest Neighbour classification generally has which effect?

K-Nearest Neighbour Medium
A. Higher sensitivity to individual samples
B. Higher variance and sharper boundaries
C. Lower bias and perfect training accuracy
D. Lower variance and smoother boundaries

32 A decision tree classifier is considering two splits. Split P produces mostly pure child nodes, while Split Q leaves both classes heavily mixed. Which split is normally preferred?

Decision Tree Classifier Medium
A. Split Q because impurity remains higher
B. Split Q because it avoids class separation
C. Split P because it creates more classes
D. Split P because impurity decreases more

33 A decision tree classifier perfectly classifies its training set but performs poorly on unseen data. Which adjustment most directly addresses this problem?

Decision Tree Classifier Medium
A. Allow leaves with one sample
B. Increase the maximum tree depth
C. Remove all stopping conditions
D. Limit the maximum tree depth

34 Why does a random forest usually generalize better than a single deep decision tree?

Random Forest Medium
A. It uses one identical tree repeatedly
B. It guarantees zero classification error
C. It averages many decorrelated trees
D. It removes all randomness from training

35 In a random forest, what is the main purpose of considering only a random subset of features at each split?

Random Forest Medium
A. Ensure every feature is selected equally
B. Eliminate the need for training data
C. Force every tree to be identical
D. Reduce correlation among the trees

36 For a class , a Naïve Bayes model has , , and . What is the unnormalized posterior score for ?

Naïve Bayes Medium
A.
B.
C.
D.

37 A Gaussian Naïve Bayes classifier is most directly suited to which type of input?

Naïve Bayes Medium
A. Sequential features requiring recurrent state transitions
B. Images requiring convolutional filters before classification
C. Categorical features modeled only by decision-tree splits
D. Continuous features modeled by class-specific normal distributions

38 A model has high error on both its training set and validation set, and the two errors are similar. What is the most likely diagnosis?

Bias, Variance, Underfitting and Overfitting Medium
A. Low bias and overfitting
B. Low variance and perfect fitting
C. High variance and overfitting
D. High bias and underfitting

39 A model's training accuracy is , but its validation accuracy is . Which observation best describes this result?

Bias, Variance, Underfitting and Overfitting Medium
A. The model likely has high bias
B. The model is certainly underfitting
C. The model likely has high variance
D. The model has identical train and test behavior

40 Validation error decreases as model complexity grows, reaches a minimum, and then begins increasing while training error continues decreasing. Which model should generally be selected?

Bias, Variance, Underfitting and Overfitting Medium
A. The model at minimum training error
B. The model at minimum validation error
C. The most complex model available
D. The least complex model available

41 A linear regression model is fitted using two standardized predictors, and . Their correlation is , and both predictors have substantial marginal correlation with the target. Which outcome is most likely when ordinary least squares is used?

Linear Regression Hard
A. Zero coefficients because predictors are redundant
B. Stable coefficients with low sampling variance
C. Unstable coefficients despite accurate predictions
D. Biased predictions caused by class imbalance

42 For a regression model with an intercept, the residuals are orthogonal to every included predictor. If the model predicts the training observations exactly, which statement must hold?

Linear Regression Hard
A. The residuals must have a nonzero mean
B. Every predictor has a zero coefficient
C. The coefficient of determination is negative
D. The residual sum of squares equals zero

43 A single training observation has an unusually large predictor value and lies close to the fitted regression line. Another observation has an ordinary predictor value but a very large vertical residual. Which diagnosis is most appropriate?

Linear Regression Hard
A. Both observations necessarily have high leverage
B. Neither observation can substantially affect the fitted line
C. The first has high residual influence; the second has high leverage
D. The first has high leverage; the second has high residual influence

44 A degree-5 polynomial fits a small training set nearly perfectly but produces extreme oscillations just outside the observed range. Which intervention most directly addresses the primary failure?

Polynomial Regression Hard
A. Increase the polynomial degree further
B. Replace the response values with class labels
C. Remove the intercept from the model
D. Use regularization or reduce the polynomial degree

45 Suppose the true relationship is , but a degree-1 model is fitted over a narrow interval centered at . What is the main consequence of omitting the quadratic term?

Polynomial Regression Hard
A. The omitted curvature creates systematic approximation bias
B. The training error must be larger than the test error
C. The linear model is guaranteed to have zero variance
D. The fitted slope must equal exactly

46 A decision tree regressor considers a split that creates two leaves. The left leaf contains values , and the right leaf contains . What prediction does the tree make for a new point assigned to the right leaf, assuming squared-error loss?

Decision Tree Regression Hard
A.
B.
C.
D.

47 A regression tree is expanded until every training sample occupies its own leaf. Training mean squared error becomes zero. Which statement best describes the expected generalization behavior?

Decision Tree Regression Hard
A. Both training and test error must be zero
B. Variance is likely high because predictions depend on individual samples
C. Bias is maximized because the tree is too simple
D. The model becomes equivalent to ordinary least squares

48 In logistic regression, a coefficient for feature is . Holding all other variables fixed, which change in the odds of the positive class results from increasing by one unit?

Logistic Regression Hard
A. The probability increases by exactly
B. The odds are multiplied by
C. The odds are multiplied by
D. The log-odds are multiplied by

49 A classifier outputs well-calibrated probabilities, but the positive class is rare and the cost of false negatives is much higher than the cost of false positives. What is the most defensible decision rule?

Logistic Regression Hard
A. Choose a threshold based on the relative misclassification costs
B. Always use a probability threshold of
C. Discard probability outputs and choose randomly
D. Increase the threshold to improve positive-class recall

50 A K-nearest neighbour classifier uses Euclidean distance on two features: annual income measured in dollars and age measured in years. Which preprocessing is most important before fitting the classifier?

K-Nearest Neighbour Hard
A. Convert the target labels into continuous values
B. Standardize or otherwise scale the features
C. Apply one-hot encoding to the numeric income feature
D. Add a random feature to break distance ties

51 As increases substantially in a K-nearest neighbour classifier, which bias-variance change is generally expected, assuming the distance metric remains fixed?

K-Nearest Neighbour Hard
A. No change in either bias or variance
B. Higher bias and lower variance
C. Lower bias and higher variance
D. Higher bias and higher variance

52 For a binary classification node containing equal numbers of both classes, a candidate split creates two pure child nodes of equal size. What is the weighted Gini impurity after the split?

Introduction to Decision Tree Classifier and Random Forest Hard
A.
B.
C.
D.

53 Why does randomly selecting a subset of features at each split typically improve a random forest compared with averaging fully correlated decision trees?

Introduction to Decision Tree Classifier and Random Forest Hard
A. It removes the need for bootstrap samples
B. It reduces correlation among tree errors
C. It guarantees that every feature is used equally
D. It forces every tree to have zero training error

54 A Naïve Bayes classifier assigns class to an instance using . One feature value has zero estimated likelihood in every observed training instance of class . What is the standard remedy?

Naïve Bayes Hard
A. Set the class prior to zero
B. Replace all feature values with their global means
C. Remove the target class from the training set
D. Apply smoothing to the likelihood estimates

55 Naïve Bayes assumes conditional independence of features given the class. If two highly correlated features are both included, which issue can arise even when classification accuracy remains reasonable?

Naïve Bayes Hard
A. The class priors become mathematically undefined
B. The features can no longer be represented numerically
C. The model may double-count related evidence
D. All posterior probabilities become exactly uniform

56 A model has nearly identical training and validation errors, and both errors are large relative to a more flexible benchmark. Which diagnosis is most consistent with this evidence?

Bias Hard
A. High variance from memorizing the training set
B. High bias from an overly restrictive model
C. Perfect calibration with poor class balance
D. Data leakage from the validation set

57 Two models have the same average validation error across many splits. Model A's error varies widely between splits, while Model B's error is stable. Which model has greater estimation variance?

Variance Hard
A. Model B, because stable errors indicate memorization
B. Model A, because its performance is more sensitive to the sample
C. Both models, because equal means imply equal variance
D. Neither model, because validation error measures only bias

58 A polynomial model's training error decreases monotonically as degree increases, while validation error decreases initially and then rises. At the degree where validation error is smallest, what is the best interpretation?

Underfitting and Overfitting Hard
A. Further degree increases must improve generalization
B. The training data contain no irreducible noise
C. The model balances approximation bias and estimation variance
D. The model has maximized both bias and variance

59 A preprocessing step computes the mean and standard deviation using the entire dataset before cross-validation. The step does not use target labels. Why can this still lead to optimistic validation estimates?

Underfitting and Overfitting Hard
A. Validation observations influence transformations applied to training data
B. Standardization always increases model variance
C. Unlabeled features cannot be used in preprocessing
D. Cross-validation requires every feature to be categorical

60 A model performs extremely well on randomly shuffled test data but poorly when evaluated on a later time period. Which explanation is most plausible?

Underfitting and Overfitting Hard
A. Random splitting allowed future distribution information into training
B. The model necessarily has high bias on every distribution
C. Random splitting always produces larger training error
D. The target became continuous during the later evaluation