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 from labeled data with known outputs
B. It groups data into clusters automatically
C. It learns only from unlabeled data
D. It requires no training data at all

2 Which of the following best describes unsupervised learning?

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

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. Supervised learning
B. Unsupervised learning
C. Semi-labeled regression
D. Reinforcement learning

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

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

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

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

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

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

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

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

9 Which of the following is an unsupervised learning technique?

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

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

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

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

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

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

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

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

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

14 Which task is best suited for logistic regression?

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

15 Dimensionality reduction techniques such as PCA are considered:

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

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

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

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

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

18 Which statement about classification is correct?

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

19 Which scenario is an example of unsupervised learning?

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

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

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

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. Classification
B. Clustering
C. Dimensionality reduction
D. Regression

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 data has no target variable
B. The training data includes labeled outputs for each input
C. The algorithm reduces the number of features automatically
D. The model discovers hidden groups without labels

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. Unsupervised clustering
B. Supervised classification
C. Logistic regression
D. Linear regression

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. It is discarded as uncertain
D. Negative class (0)

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

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

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

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

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

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

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 increases toward 1
B. It stays constant at 0.5
C. It oscillates unpredictably
D. It decreases toward 0

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 training phase
D. The testing 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. Supervised feature selection
B. Regression
C. Dimensionality reduction
D. Binary classification

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

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

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

logistic regression Medium
A. Increasing raises the probability of the positive class
B. The feature is perfectly correlated with the output
C. The feature has no effect on the prediction
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. Logistic regression — classification
C. Linear regression — clustering
D. K-means — 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. There are no ground-truth labels to directly measure accuracy
D. Clustering cannot be applied to numeric data

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. Overfitting
B. Clustering
C. Underfitting
D. Regularization

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

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

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

logistic regression Medium
A. Applying K-means to the outputs
B. Softmax (multinomial) logistic regression
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 always produces larger gradients than cross-entropy, causing overflow
B. MSE with the sigmoid yields a non-convex loss surface, causing gradient descent to get stuck in local minima
C. MSE forces the weights to be non-negative, violating the model assumptions
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. Multiplies the probability by
B. Multiplies the odds by
C. Reduces 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. Converge quickly to small finite values near zero
C. Collapse to exactly zero due to the sigmoid saturating
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 variance (overfitting); reduce model complexity or add regularization
B. High bias (underfitting); add more features or increase model complexity
C. Data leakage; the validation error should be lower than training error
D. Label noise only; relabel the validation set

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 assumes isotropic, equally-sized spherical clusters via Euclidean distance to centroids
B. It cannot handle more than two clusters at once
C. It requires the number of clusters to equal the number of features
D. It always converges to the global optimum, ignoring shape

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

logistic regression Hard
A. Makes the loss non-convex and unstable
B. Increases the coefficient magnitudes to fit outliers
C. Drives some coefficients exactly to zero, performing feature selection
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. F1-score, since it balances precision and recall
B. Recall, since it ignores true negatives
C. Precision, since it ignores false negatives
D. Accuracy, since predicting all-negative already scores

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

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

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

unsupervised Hard
A. It requires labeled data to compute the elbow
B. It always selects equal to the number of samples
C. It only works when clusters are perfectly Gaussian
D. The within-cluster sum of squares often decreases smoothly with no clear 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. Nothing, standardization must always use the full dataset
B. It biases the model toward the training set only
C. Data leakage: test-set information influences the scaling applied to training
D. It makes the features non-Gaussian and unusable

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. Adding a constant vector to all class weight vectors leaves predictions unchanged
D. The bias terms must sum to one across classes

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. Both recall and precision increase
B. Recall decreases while precision increases
C. Neither changes, since the threshold only affects probabilities
D. Recall increases while precision typically decreases

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 and higher variance
C. Higher bias but lower variance
D. Lower bias and lower variance

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

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

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 becomes undefined due to division by zero
B. The error term approaches its maximum, producing a large update
C. The update flips the sign of every feature permanently
D. The gradient vanishes, so no learning occurs

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

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

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

unsupervised Hard
A. Clustering is excellent with well-separated, dense clusters
B. Points lie near the boundary between two clusters, so cluster separation is weak
C. The number of clusters equals the number of samples
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 requires the data to be perfectly balanced across classes
B. It can only operate on numeric, never categorical, targets
C. It learns a mapping from inputs to known outputs, which requires labeled targets to fit
D. It needs the features to be statistically independent

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 sigmoid output exceeds for that feature
B. The log-loss becomes negative and unbounded below
C. Perfect multicollinearity makes the coefficient estimates unstable and non-unique
D. The model's predictions become perfectly accurate