Unit 5: Machine learning-2 - Practice Quiz

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

1 What is the primary goal of a Support Vector Machine (SVM) classifier?

Support Vector Machine Easy
A. To reduce the dataset size
B. To minimize the number of features
C. To group data points into clusters
D. To find the hyperplane that best separates the classes with maximum margin

2 In SVM, what are 'support vectors'?

Support Vector Machine Easy
A. All the data points in the dataset
B. The features used in the model
C. The data points closest to the decision boundary
D. The centroids of each class

3 What does the 'kernel trick' allow an SVM to do?

Support Vector Machine Easy
A. Reduce the training time to zero
B. Convert regression into classification
C. Remove all outliers automatically
D. Handle non-linearly separable data by mapping it to a higher-dimensional space

4 Which of the following is a commonly used kernel function in SVM?

Support Vector Machine Easy
A. Gini kernel
B. Silhouette kernel
C. Entropy kernel
D. Radial Basis Function (RBF)

5 The distance between the hyperplane and the nearest data points in SVM is called the:

Support Vector Machine Easy
A. Margin
B. Threshold
C. Bias
D. Gradient

6 What does each internal node in a decision tree represent?

decision trees Easy
A. A cluster center
B. A final class label
C. A test or decision on a feature
D. A support vector

7 What do the leaf nodes of a decision tree represent?

decision trees Easy
A. A feature test
B. The root of the tree
C. The final output or class label
D. A splitting condition

8 Which measure is commonly used to decide the best split in a decision tree?

decision trees Easy
A. Euclidean distance
B. Silhouette score
C. Margin width
D. Information Gain

9 What is a common problem when a decision tree grows too deep?

decision trees Easy
A. Underfitting the training data
B. Losing all its leaf nodes
C. Becoming a linear model
D. Overfitting the training data

10 Which technique is used to reduce overfitting in decision trees by removing branches?

decision trees Easy
A. Encoding
B. Scaling
C. Pruning
D. Boosting

11 Clustering is an example of which type of machine learning?

clustering Easy
A. Reinforcement learning
B. Supervised learning
C. Semi-supervised learning
D. Unsupervised learning

12 In the K-Means algorithm, what does the parameter represent?

clustering Easy
A. The number of iterations
B. The number of clusters
C. The number of outliers
D. The number of features

13 What does the K-Means algorithm use to represent the center of each cluster?

clustering Easy
A. Support vector
B. Root node
C. Hyperplane
D. Centroid

14 Which of the following is a hierarchical clustering method?

clustering Easy
A. Logistic regression
B. Agglomerative clustering
C. Linear regression
D. K-Means clustering

15 What is the main objective of a clustering algorithm?

clustering Easy
A. To predict a continuous value
B. To label data using known outputs
C. To group similar data points together
D. To maximize the margin between classes

16 Which metric measures the proportion of correct predictions out of all predictions?

model evaluation Easy
A. Precision
B. Entropy
C. Recall
D. Accuracy

17 What table is commonly used to summarize the performance of a classification model?

model evaluation Easy
A. Distance matrix
B. Correlation matrix
C. Confusion matrix
D. Covariance matrix

18 The F1-score is the harmonic mean of which two metrics?

model evaluation Easy
A. Bias and Variance
B. Precision and Recall
C. Accuracy and Loss
D. Entropy and Gini

19 What technique splits data into multiple subsets to train and test a model repeatedly for reliable evaluation?

model evaluation Easy
A. Clustering
B. Pruning
C. Cross-validation
D. Normalization

20 In model evaluation, what does 'recall' measure?

model evaluation Easy
A. The total number of features used
B. The proportion of predicted positives that were correct
C. The distance between clusters
D. The proportion of actual positives that were correctly identified

21 In a linear SVM, the margin is defined as the distance between the two parallel hyperplanes that pass through the support vectors. If the weight vector is , what is the width of this margin?

Support Vector Machine Medium
A.
B.
C.
D.

22 You train an SVM with a very large value of the regularization parameter . What is the most likely effect on the model?

Support Vector Machine Medium
A. It reduces the number of support vectors to zero
B. It widens the margin and ignores misclassifications
C. It penalizes misclassifications heavily, risking overfitting
D. It forces the use of a linear kernel only

23 Which situation best justifies using the kernel trick in an SVM?

Support Vector Machine Medium
A. The dataset has too many labeled examples
B. The classes are perfectly balanced
C. The data is not linearly separable in the original feature space
D. The features are already normalized

24 For an RBF kernel , increasing to a very large value tends to cause what?

Support Vector Machine Medium
A. Removal of all support vectors
B. Underfitting, as the boundary becomes nearly linear
C. A guaranteed wider margin
D. Overfitting, as each point's influence becomes very local

25 In a soft-margin SVM, what role do the slack variables play?

Support Vector Machine Medium
A. They scale the input features before training
B. They set the number of support vectors
C. They convert the problem into a regression task
D. They allow certain points to violate the margin or be misclassified

26 A node contains 8 positive and 8 negative samples. What is the Gini impurity of this node?

decision trees Medium
A.
B.
C.
D.

27 Which strategy most directly reduces overfitting in a fully grown decision tree?

decision trees Medium
A. Removing the stopping criteria entirely
B. Pruning branches that add little predictive value
C. Splitting on features with the most unique values
D. Increasing the maximum depth further

28 Information gain when selecting a split in a decision tree is best described as:

decision trees Medium
A. The reduction in entropy achieved by the split
B. The depth added to the tree by the split
C. The increase in entropy after the split
D. The total number of leaves created

29 A decision tree tends to prefer splitting on features with many distinct values when using plain information gain. Which metric was designed to correct this bias?

decision trees Medium
A. Mean squared error
B. Gain ratio
C. Silhouette score
D. Euclidean distance

30 For a node with class proportions and , what is the entropy (in bits, base 2)?

decision trees Medium
A.
B.
C.
D.

31 In k-means clustering, what does the algorithm minimize at each iteration?

clustering Medium
A. The silhouette score of the worst point
B. The number of clusters
C. The within-cluster sum of squared distances to centroids
D. The between-cluster variance only

32 The 'elbow method' in k-means is primarily used to:

clustering Medium
A. Initialize the centroids optimally
B. Choose a suitable number of clusters
C. Measure feature correlation
D. Detect outliers in the data

33 Which clustering algorithm can find arbitrarily shaped clusters and automatically identify noise points?

clustering Medium
A. DBSCAN
B. K-medoids
C. K-means
D. Agglomerative with Ward linkage

34 A silhouette score close to for a data point indicates that the point is:

clustering Medium
A. On the boundary between two clusters
B. Assigned to the wrong cluster
C. A noise point with no cluster
D. Well matched to its own cluster and far from others

35 Why is feature scaling generally important before applying k-means clustering?

clustering Medium
A. It reduces the number of clusters needed
B. It converts the algorithm into hierarchical clustering
C. Distance calculations become dominated by large-range features otherwise
D. It guarantees a global optimum

36 A classifier has 40 true positives, 10 false positives, 30 false negatives, and 20 true negatives. What is its precision?

model evaluation Medium
A.
B.
C.
D.

37 Using the same confusion matrix (TP=40, FP=10, FN=30, TN=20), what is the recall?

model evaluation Medium
A.
B.
C.
D.

38 For a highly imbalanced dataset (95% negative, 5% positive), why can accuracy be misleading?

model evaluation Medium
A. Accuracy always equals the minority class rate
B. Accuracy cannot be computed on imbalanced data
C. A model predicting only the majority class scores high accuracy
D. Accuracy ignores true negatives

39 The F1-score is the harmonic mean of precision and recall. Given precision and recall , what is the F1-score?

model evaluation Medium
A.
B.
C.
D.

40 What does an ROC AUC value of indicate about a binary classifier?

model evaluation Medium
A. The classifier has zero false positives
B. The classifier is perfect
C. The classifier is overfitting the training data
D. The classifier performs no better than random guessing

41 For a soft-margin SVM with primal objective , what is the effect of taking ?

Support Vector Machine Hard
A. The margin becomes wider and more slack is tolerated
B. The classifier approaches a hard-margin SVM that penalizes any misclassification heavily
C. The regularization dominates, shrinking toward zero
D. The support vectors become independent of the training data

42 In the dual formulation of the SVM, a training point is a support vector if and only if its Lagrange multiplier satisfies which condition?

Support Vector Machine Hard
A. exactly
B.
C.
D.

43 The RBF kernel is . What happens to the decision boundary as ?

Support Vector Machine Hard
A. The model tends to memorize training points, risking severe overfitting
B. The boundary becomes smoother and more linear
C. The kernel degenerates into a linear kernel
D. All points map to the same feature-space location

44 Why does the kernel trick allow SVMs to operate in high-dimensional feature spaces efficiently?

Support Vector Machine Hard
A. It reduces the feature space dimensionality before training
B. It replaces the quadratic optimization with a linear one
C. It eliminates the need for support vectors entirely
D. It computes inner products in feature space without explicitly mapping the data

45 A linear SVM is trained and the geometric margin is . If a scaling of the feature vectors doubles at the optimum, what happens to the margin?

Support Vector Machine Hard
A. It stays the same
B. It is halved
C. It becomes zero
D. It doubles

46 A node contains 40 positive and 40 negative samples. What is its Gini impurity?

decision trees Hard
A.
B.
C.
D.

47 A parent node with entropy (100 samples, balanced) is split into a pure left child (40 positives) and a right child (60 samples: 10 positives, 50 negatives). What is the information gain? (Use ; right child entropy .)

decision trees Hard
A.
B.
C.
D.

48 Which statement best explains why fully grown decision trees typically have high variance?

decision trees Hard
A. They always underfit due to greedy splitting
B. They use axis-aligned splits that ignore feature correlations
C. They cannot represent non-linear boundaries
D. Small changes in training data can produce very different tree structures

49 In cost-complexity pruning, the criterion is , where is the number of leaves. What is the role of ?

decision trees Hard
A. It weights misclassified samples during boosting
B. It scales the training error of each leaf
C. It controls the minimum samples per split
D. It penalizes tree size, encouraging smaller trees as it increases

50 Why is information gain biased toward features with many distinct values, and how does gain ratio address this?

decision trees Hard
A. Information gain double-counts entropy; gain ratio subtracts it once
B. High-cardinality features can create many pure partitions; gain ratio normalizes by split information
C. Information gain ignores class balance; gain ratio adds Laplace smoothing
D. Information gain overweights numeric features; gain ratio converts them to categorical

51 K-means minimizes within-cluster sum of squares. Why can it converge to a suboptimal solution?

clustering Hard
A. It requires labeled data that may be noisy
B. It uses Manhattan distance instead of Euclidean
C. It always merges the two nearest clusters
D. The objective is non-convex, so it may settle in a local minimum depending on initialization

52 Which scenario is DBSCAN most likely to handle better than K-means?

clustering Hard
A. High-dimensional data with no density variation
B. Spherical clusters of equal size and density
C. Arbitrarily shaped clusters with noise and varying cluster counts
D. Data where the number of clusters is known in advance

53 The silhouette coefficient for a point is . What does a value close to indicate?

clustering Hard
A. The point is a noise outlier
B. The point is definitely misclassified
C. The point lies near the boundary between two clusters
D. The point is deep inside its cluster

54 In hierarchical agglomerative clustering, which linkage criterion is most sensitive to outliers and tends to produce elongated 'chained' clusters?

clustering Hard
A. Average linkage
B. Complete linkage
C. Single linkage
D. Ward's linkage

55 Why does K-means tend to perform poorly on clusters with very different sizes or densities even when they are spherical?

clustering Hard
A. It requires clusters to be linearly separable
B. It assumes clusters have equal variance and roughly equal population, biasing boundaries
C. It cannot compute centroids for large clusters
D. It uses cosine distance which ignores magnitude

56 A classifier on an imbalanced dataset (5% positives) predicts all samples as negative. What are its accuracy and recall?

model evaluation Hard
A. Accuracy , recall
B. Accuracy , recall
C. Accuracy , recall
D. Accuracy , recall

57 A model has precision and recall . What is its score?

model evaluation Hard
A.
B.
C.
D.

58 Why can the ROC-AUC be misleading compared to the precision-recall AUC on a highly imbalanced dataset?

model evaluation Hard
A. ROC-AUC cannot be computed without a fixed threshold
B. Precision-recall AUC ignores the positive class entirely
C. ROC-AUC only works for balanced classes by definition
D. The large number of true negatives keeps the false positive rate low, inflating ROC-AUC

59 In k-fold cross-validation, what is the main consequence of increasing toward leave-one-out (LOO)?

model evaluation Hard
A. Higher variance and lower bias, at greater computational cost
B. Lower variance and higher bias in the estimate
C. Both bias and variance decrease monotonically
D. The estimate becomes independent of the data

60 A model shows low training error but high validation error. Which combined diagnosis and remedy is most appropriate?

model evaluation Hard
A. Data leakage; shuffle the labels
B. High bias; increase model complexity
C. High variance; add regularization or more training data
D. Underfitting; remove regularization entirely