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 reduce the number of features
C. To group unlabeled data
D. To classify images into categories

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

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

3 In linear regression, what is the target variable?

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

4 What is polynomial regression designed to model?

Regression (Polynomial Regression) Easy
A. Missing data values
B. Only binary labels
C. Curved relationships
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 list of class names
C. A group of unrelated features
D. A continuous numerical value

7 How does a decision tree divide the input data?

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

8 What is logistic regression commonly used for?

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

9 Which function is commonly associated with logistic regression?

Classification (Logistic Regression) Easy
A. Sigmoid function
B. Counting function
C. Sorting function
D. Square-root 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 removing nearby observations
B. By using only the largest feature
C. By fitting a single straight line
D. By using nearby labeled observations

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

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

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

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

14 What does a decision tree classifier predict?

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

15 What is a random forest?

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

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

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

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

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

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

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

19 What does high bias usually indicate?

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

20 What is overfitting?

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

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 reduces the prediction by
B. Each increase reduces the prediction by
C. Each increase reduces the prediction by
D. Each increase raises 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. Add more polynomial terms
B. Train on fewer observations
C. Remove the validation set
D. Reduce the polynomial degree

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 averages every training target globally
C. It always fits a polynomial function
D. It produces piecewise-constant predictions

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. The negative class
B. The positive class
C. No class can be assigned
D. Both classes equally

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 probability is always doubled
B. The odds are halved
C. The odds increase by percent
D. The odds are 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. Scale both numerical features
B. Convert both features to labels
C. Sort samples by income
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. Class
B. A tied class
C. An unknown 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. Lower variance and smoother boundaries
B. Lower bias and perfect training accuracy
C. Higher variance and sharper boundaries
D. Higher sensitivity to individual samples

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 P because it creates more classes
B. Split Q because impurity remains higher
C. Split P because impurity decreases more
D. Split Q because it avoids class separation

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. Increase the maximum tree depth
B. Remove all stopping conditions
C. Limit the maximum tree depth
D. Allow leaves with one sample

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. Eliminate the need for training data
B. Force every tree to be identical
C. Reduce correlation among the trees
D. Ensure every feature is selected equally

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. Categorical features modeled only by decision-tree splits
B. Sequential features requiring recurrent state transitions
C. Images requiring convolutional filters before classification
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. High variance and overfitting
B. Low bias and overfitting
C. Low variance and perfect fitting
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 has identical train and test behavior
C. The model likely has high variance
D. The model is certainly underfitting

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 most complex model available
B. The model at minimum validation error
C. The model at minimum training error
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. Biased predictions caused by class imbalance
B. Zero coefficients because predictors are redundant
C. Stable coefficients with low sampling variance
D. Unstable coefficients despite accurate predictions

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. Every predictor has a zero coefficient
B. The residuals must have a nonzero mean
C. The residual sum of squares equals zero
D. The coefficient of determination is negative

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. The first has high residual influence; the second has high leverage
B. Neither observation can substantially affect the fitted line
C. The first has high leverage; the second has high residual influence
D. Both observations necessarily have high leverage

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. Use regularization or reduce the polynomial degree
C. Remove the intercept from the model
D. Replace the response values with class labels

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 fitted slope must equal exactly
C. The training error must be larger than the test error
D. The linear model is guaranteed to have zero variance

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. Bias is maximized because the tree is too simple
B. Variance is likely high because predictions depend on individual samples
C. The model becomes equivalent to ordinary least squares
D. Both training and test error must be zero

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. Increase the threshold to improve positive-class recall
B. Always use a probability threshold of
C. Choose a threshold based on the relative misclassification costs
D. Discard probability outputs and choose randomly

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. Add a random feature to break distance ties
B. Standardize or otherwise scale the features
C. Convert the target labels into continuous values
D. Apply one-hot encoding to the numeric income feature

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. Higher bias and lower variance
B. Lower bias and higher variance
C. No change in either bias or 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 forces every tree to have zero training error
B. It guarantees that every feature is used equally
C. It reduces correlation among tree errors
D. It removes the need for bootstrap samples

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. Apply smoothing to the likelihood estimates
B. Remove the target class from the training set
C. Set the class prior to zero
D. Replace all feature values with their global means

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. All posterior probabilities become exactly uniform
B. The model may double-count related evidence
C. The features can no longer be represented numerically
D. The class priors become mathematically undefined

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. Data leakage from the validation set
B. High variance from memorizing the training set
C. Perfect calibration with poor class balance
D. High bias from an overly restrictive model

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. The training data contain no irreducible noise
B. Further degree increases must improve generalization
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. Cross-validation requires every feature to be categorical
D. Unlabeled features cannot be used in preprocessing

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. Random splitting always produces larger training error
C. The model necessarily has high bias on every distribution
D. The target became continuous during the later evaluation