Unit 4: Machine learning-1 - Practice Quiz

BTY587 — Data Analysis And Simulations 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the defining characteristic of supervised learning?

supervised Easy
A. It learns only from unlabeled data
B. It groups data into clusters automatically
C. It learns from labeled data with known outputs
D. It requires no training data at all

2 Which of the following best describes unsupervised learning?

unsupervised Easy
A. Finding patterns in data without labeled outputs
B. Mapping fixed inputs to fixed outputs
C. Learning through rewards and penalties
D. Predicting labels from labeled training data

3 Which of the following is an example of a supervised learning task?

supervised Easy
A. Finding natural clusters in raw data
B. Email spam classification using labeled emails
C. Grouping customers without any labels
D. Reducing the number of features in data

4 Clustering is most commonly associated with which type of learning?

unsupervised Easy
A. Unsupervised learning
B. Reinforcement learning
C. Semi-labeled regression
D. Supervised learning

5 Logistic regression is primarily used for which kind of problem?

logistic regression Easy
A. Clustering unlabeled data
B. Reducing data dimensions
C. Predicting continuous values
D. Classification problems

6 Which function is used by logistic regression to map values to a range between 0 and 1?

logistic regression Easy
A. Sigmoid function
B. Linear function
C. Step function
D. Polynomial function

7 In supervised learning, the known correct answer for each training example is called the:

supervised Easy
A. Cluster
B. Feature map
C. Label
D. Centroid

8 Which two categories are the main types of supervised learning problems?

supervised Easy
A. Grouping and reduction
B. Clustering and association
C. Reward and penalty
D. Classification and regression

9 Which of the following is an unsupervised learning technique?

unsupervised Easy
A. Logistic regression
B. Linear regression
C. K-means clustering
D. Decision tree classification

10 The output of logistic regression can be interpreted as a:

logistic regression Easy
A. Number of features used
B. Continuous unbounded value
C. Probability of belonging to a class
D. Distance between clusters

11 A common default threshold to convert a logistic regression probability into a class label is:

logistic regression Easy
A. 1.0
B. 0.0
C. 0.9
D. 0.5

12 Which of the following does unsupervised learning typically NOT require?

unsupervised Easy
A. Feature values
B. Labeled output data
C. Input data
D. A learning algorithm

13 Predicting house prices from features like size and location is an example of:

supervised Easy
A. Supervised regression
B. Dimensionality reduction
C. Unsupervised clustering
D. Association rule mining

14 Which task is best suited for logistic regression?

logistic regression Easy
A. Predicting whether a tumor is benign or malignant
B. Grouping songs into unnamed genres
C. Compressing image data for storage
D. Predicting the exact temperature tomorrow

15 Dimensionality reduction techniques such as PCA are considered:

unsupervised Easy
A. Supervised classification
B. Unsupervised learning
C. Reinforcement learning
D. Logistic modeling

16 In supervised learning, what is the model trained to predict?

supervised Easy
A. The clusters of unlabeled data
B. The reward from an environment
C. The output label from input features
D. The number of hidden groups

17 What is the range of the sigmoid function output in logistic regression?

logistic regression Easy
A. Between -1 and 1
B. Between -infinity and infinity
C. Between 0 and 1
D. Between 0 and infinity

18 Which statement about classification is correct?

supervised Easy
A. It predicts discrete category labels
B. It predicts continuous numeric values
C. It never uses labeled data
D. It only groups unlabeled points

19 Which scenario is an example of unsupervised learning?

unsupervised Easy
A. Predicting exam scores from study hours
B. Detecting fraud from labeled transactions
C. Segmenting customers into groups without predefined categories
D. Classifying emails using labeled examples

20 Logistic regression is often used for which of the following?

logistic regression Easy
A. Clustering data points
B. Reducing feature count
C. Binary classification
D. Predicting continuous prices

21 A bank builds a model to predict a customer's exact credit score (a continuous value between 300 and 850) based on income, age, and debt. What type of supervised learning task is this?

supervised Medium
A. Regression
B. Classification
C. Clustering
D. Dimensionality reduction

22 You are given a dataset of emails, each labeled as "spam" or "not spam". You train a model to predict the label for new emails. Which characteristic makes this a supervised learning problem?

supervised Medium
A. The model discovers hidden groups without labels
B. The data has no target variable
C. The algorithm reduces the number of features automatically
D. The training data includes labeled outputs for each input

23 A retailer wants to group customers into segments based on purchasing behavior, but has no predefined categories. Which learning approach is most appropriate?

unsupervised Medium
A. Linear regression
B. Logistic regression
C. Supervised classification
D. Unsupervised clustering

24 In logistic regression for binary classification, the model outputs a probability using the sigmoid function . If , what is the predicted probability?

logistic regression Medium
A.
B.
C.
D.

25 A logistic regression model uses a default threshold of to assign classes. For a sample it outputs a probability of . How is this sample classified?

logistic regression Medium
A. It is placed in a separate cluster
B. Positive class (1)
C. Negative class (0)
D. It is discarded as uncertain

26 Which of the following is a key difference between regression and classification in supervised learning?

supervised Medium
A. Classification predicts continuous values, regression predicts categories
B. Regression predicts continuous values, classification predicts discrete categories
C. Regression uses labels, classification does not
D. Both predict only binary outputs

27 Which of the following tasks is an example of unsupervised learning?

unsupervised Medium
A. Grouping news articles into topics without predefined categories
B. Forecasting tomorrow's temperature from historical labels
C. Predicting house prices from labeled sales data
D. Classifying tumors as benign or malignant using labeled scans

28 Why is linear regression generally unsuitable for a binary classification problem where logistic regression is preferred?

logistic regression Medium
A. It always overfits binary data
B. It requires the output to be continuous only
C. Its predictions are unbounded and can fall outside the probability range
D. It cannot handle more than one input feature

29 In logistic regression, the term is called the log-odds or logit. If increases, what happens to the predicted probability?

logistic regression Medium
A. It oscillates unpredictably
B. It stays constant at 0.5
C. It decreases toward 0
D. It increases toward 1

30 A model is trained on 1000 labeled images of cats and dogs, then tested on new unlabeled images. Which phase uses the labels directly?

supervised Medium
A. Neither phase
B. Both phases equally
C. The testing phase
D. The training phase

31 A data scientist reduces a dataset from 50 features to 2 features to visualize it, without using any target variable. This is an example of which unsupervised task?

unsupervised Medium
A. Binary classification
B. Dimensionality reduction
C. Supervised feature selection
D. Regression

32 Logistic regression is typically trained by minimizing which loss function?

logistic regression Medium
A. Binary cross-entropy (log loss)
B. Absolute error
C. Mean squared error
D. Hinge loss

33 A logistic regression coefficient for feature is . What does a positive coefficient indicate?

logistic regression Medium
A. The feature has no effect on the prediction
B. The feature is perfectly correlated with the output
C. Increasing raises the probability of the positive class
D. Increasing lowers the probability of the positive class

34 Which pair of algorithm and problem type is correctly matched in supervised learning?

supervised Medium
A. Logistic regression — clustering
B. Linear regression — clustering
C. K-means — classification
D. Logistic regression — classification

35 What is a common challenge when evaluating unsupervised clustering results compared to supervised models?

unsupervised Medium
A. It is impossible to visualize the clusters
B. The models always require more data
C. Clustering cannot be applied to numeric data
D. There are no ground-truth labels to directly measure accuracy

36 If a logistic regression model predicts probability for the positive class, what is the odds ratio for that prediction?

logistic regression Medium
A.
B.
C.
D.

37 A model performs very well on training data but poorly on new test data. In supervised learning, this problem is known as:

supervised Medium
A. Regularization
B. Underfitting
C. Clustering
D. Overfitting

38 Which scenario best fits an unsupervised anomaly detection use case?

unsupervised Medium
A. Classifying labeled emails as spam
B. Flagging unusual credit card transactions with no prior fraud labels
C. Estimating labeled house prices from area
D. Predicting exam scores from labeled study hours

39 To extend logistic regression to a problem with three or more mutually exclusive classes, which approach is commonly used?

logistic regression Medium
A. Softmax (multinomial) logistic regression
B. Applying K-means to the outputs
C. Switching to linear regression
D. Increasing the sigmoid threshold to 0.9

40 In a logistic regression model, the decision boundary separating the two classes (at threshold 0.5) corresponds to which condition on the logit ?

logistic regression Medium
A.
B.
C.
D.

41 In logistic regression, the log-likelihood is maximized instead of minimizing squared error. Why is the mean squared error (MSE) loss avoided when the model outputs ?

logistic regression Hard
A. MSE forces the weights to be non-negative, violating the model assumptions
B. MSE with the sigmoid yields a non-convex loss surface, causing gradient descent to get stuck in local minima
C. MSE always produces larger gradients than cross-entropy, causing overflow
D. MSE cannot be differentiated when the sigmoid is applied to the linear predictor

42 A logistic regression model gives coefficient for feature . Holding all else constant, a one-unit increase in changes the odds of the positive class by approximately what factor?

logistic regression Hard
A. Reduces the odds by
B. Multiplies the probability by
C. Multiplies the odds by
D. Adds to the probability

43 During training on perfectly linearly separable data, the unregularized logistic regression weights tend to do what?

logistic regression Hard
A. Grow without bound as the log-loss keeps decreasing toward zero
B. Collapse to exactly zero due to the sigmoid saturating
C. Converge quickly to small finite values near zero
D. Oscillate indefinitely without any trend

44 You train a model with very low training error but high validation error. Adding more training examples barely helps. What is the most likely diagnosis and fix?

supervised Hard
A. High bias (underfitting); add more features or increase model complexity
B. Label noise only; relabel the validation set
C. Data leakage; the validation error should be lower than training error
D. High variance (overfitting); reduce model complexity or add regularization

45 K-means is applied to data with two clusters of very different densities and non-spherical shapes. Why does it often fail?

unsupervised Hard
A. It always converges to the global optimum, ignoring shape
B. It assumes isotropic, equally-sized spherical clusters via Euclidean distance to centroids
C. It cannot handle more than two clusters at once
D. It requires the number of clusters to equal the number of features

46 In L1-regularized logistic regression, increasing the regularization strength tends to produce what effect distinct from L2?

logistic regression Hard
A. Drives some coefficients exactly to zero, performing feature selection
B. Increases the coefficient magnitudes to fit outliers
C. Makes the loss non-convex and unstable
D. Shrinks all coefficients proportionally but never to exactly zero

47 For a highly imbalanced classification task (1% positives), which single metric is most misleading if used alone?

supervised Hard
A. Recall, since it ignores true negatives
B. Accuracy, since predicting all-negative already scores
C. Precision, since it ignores false negatives
D. F1-score, since it balances precision and recall

48 The decision boundary of standard logistic regression in feature space is what geometric object?

logistic regression Hard
A. A curved surface following the sigmoid shape
B. A piecewise-linear region defined by nearest neighbors
C. A set of concentric spheres around the origin
D. A hyperplane defined by

49 When using the elbow method to choose in K-means, why can it be unreliable?

unsupervised Hard
A. It always selects equal to the number of samples
B. The within-cluster sum of squares often decreases smoothly with no clear elbow
C. It only works when clusters are perfectly Gaussian
D. It requires labeled data to compute the elbow

50 A colleague standardizes features using statistics computed over the entire dataset before splitting into train and test. What is the primary problem?

supervised Hard
A. It makes the features non-Gaussian and unusable
B. It biases the model toward the training set only
C. Nothing, standardization must always use the full dataset
D. Data leakage: test-set information influences the scaling applied to training

51 Softmax (multinomial logistic) regression with classes has a redundancy in its parameters. What is it?

logistic regression Hard
A. Each class requires exactly one feature to be identifiable
B. Doubling all weights doubles every predicted probability
C. The bias terms must sum to one across classes
D. Adding a constant vector to all class weight vectors leaves predictions unchanged

52 PCA is applied for dimensionality reduction but the features have wildly different units and variances. What must be done first, and why?

unsupervised Hard
A. Remove all correlated features, since PCA cannot handle correlation
B. Center features only, since PCA is scale-invariant
C. Standardize features, else high-variance features dominate the principal components
D. Convert to categorical values before applying PCA

53 You lower the classification threshold of a logistic regression model from to . What is the expected effect on recall and precision for the positive class?

logistic regression Hard
A. Recall increases while precision typically decreases
B. Both recall and precision increase
C. Neither changes, since the threshold only affects probabilities
D. Recall decreases while precision increases

54 In k-fold cross-validation, increasing toward leave-one-out (LOOCV) generally has what effect on the bias and variance of the performance estimate?

supervised Hard
A. Lower bias but higher variance of the estimate
B. Higher bias but lower variance
C. Lower bias and lower variance
D. Higher bias and higher variance

55 DBSCAN is often preferred over K-means when the data has what characteristic?

unsupervised Hard
A. Purely categorical, non-metric features
B. Arbitrary-shaped clusters and noise/outliers to be flagged
C. A known, fixed number of clusters
D. Exactly spherical, equally-sized clusters

56 The gradient of the logistic regression log-loss with respect to weights for one example is . What practical consequence follows when the model is very confident and wrong?

logistic regression Hard
A. The gradient vanishes, so no learning occurs
B. The update flips the sign of every feature permanently
C. The gradient becomes undefined due to division by zero
D. The error term approaches its maximum, producing a large update

57 Two models have identical accuracy but different ROC-AUC values. What does the higher-AUC model do better?

supervised Hard
A. Ranks positive instances above negatives more consistently across all thresholds
B. Produces perfectly calibrated probabilities
C. Achieves higher accuracy at the default threshold only
D. Uses fewer features to reach the same accuracy

58 A silhouette score close to for most points indicates what about the clustering?

unsupervised Hard
A. The number of clusters equals the number of samples
B. Clustering is excellent with well-separated, dense clusters
C. Points lie near the boundary between two clusters, so cluster separation is weak
D. The data has no features with variance

59 Why is supervised learning fundamentally unable to solve a task where no labeled examples of the target exist, even with abundant data?

supervised Hard
A. It can only operate on numeric, never categorical, targets
B. It learns a mapping from inputs to known outputs, which requires labeled targets to fit
C. It needs the features to be statistically independent
D. It requires the data to be perfectly balanced across classes

60 You add a feature that is an exact linear combination of two existing features to a logistic regression model. What issue arises?

logistic regression Hard
A. The model's predictions become perfectly accurate
B. The log-loss becomes negative and unbounded below
C. Perfect multicollinearity makes the coefficient estimates unstable and non-unique
D. The sigmoid output exceeds for that feature