1What 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
Correct Answer: To find the hyperplane that best separates the classes with maximum margin
Explanation:
An SVM aims to find the optimal separating hyperplane that maximizes the margin between different classes.
Incorrect! Try again.
2In 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
Correct Answer: The data points closest to the decision boundary
Explanation:
Support vectors are the data points nearest to the hyperplane; they define the position and orientation of the decision boundary.
Incorrect! Try again.
3What 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
Correct Answer: Handle non-linearly separable data by mapping it to a higher-dimensional space
Explanation:
Kernels transform data into a higher-dimensional space where a linear separator can be found, enabling non-linear classification.
Incorrect! Try again.
4Which 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)
Correct Answer: Radial Basis Function (RBF)
Explanation:
The RBF (Gaussian) kernel is one of the most widely used kernels in SVM for handling non-linear data.
Incorrect! Try again.
5The 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
Correct Answer: Margin
Explanation:
The margin is the distance between the separating hyperplane and the closest support vectors from each class.
Incorrect! Try again.
6What 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
Correct Answer: A test or decision on a feature
Explanation:
In a decision tree, internal nodes represent tests on features, branches represent outcomes, and leaf nodes represent class labels.
Incorrect! Try again.
7What 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
Correct Answer: The final output or class label
Explanation:
Leaf (terminal) nodes hold the final prediction, either a class label for classification or a value for regression.
Incorrect! Try again.
8Which 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
Correct Answer: Information Gain
Explanation:
Information Gain (based on entropy) and the Gini index are common criteria used to choose the best feature to split on.
Incorrect! Try again.
9What 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
Correct Answer: Overfitting the training data
Explanation:
Very deep trees can memorize training data, capturing noise and leading to overfitting and poor generalization.
Incorrect! Try again.
10Which technique is used to reduce overfitting in decision trees by removing branches?
decision trees
Easy
A.Encoding
B.Scaling
C.Pruning
D.Boosting
Correct Answer: Pruning
Explanation:
Pruning removes branches that add little predictive power, simplifying the tree and improving generalization.
Incorrect! Try again.
11Clustering is an example of which type of machine learning?
clustering
Easy
A.Reinforcement learning
B.Supervised learning
C.Semi-supervised learning
D.Unsupervised learning
Correct Answer: Unsupervised learning
Explanation:
Clustering groups data without using labeled outputs, making it a form of unsupervised learning.
Incorrect! Try again.
12In 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
Correct Answer: The number of clusters
Explanation:
In K-Means, specifies the number of clusters the algorithm should partition the data into.
Incorrect! Try again.
13What 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
Correct Answer: Centroid
Explanation:
Each K-Means cluster is represented by its centroid, the mean position of all points assigned to that cluster.
Incorrect! Try again.
14Which of the following is a hierarchical clustering method?
clustering
Easy
A.Logistic regression
B.Agglomerative clustering
C.Linear regression
D.K-Means clustering
Correct Answer: Agglomerative clustering
Explanation:
Agglomerative clustering is a hierarchical method that repeatedly merges the closest clusters into larger ones.
Incorrect! Try again.
15What 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
Correct Answer: To group similar data points together
Explanation:
Clustering aims to organize data so that points within a group are similar to each other and different from points in other groups.
Incorrect! Try again.
16Which metric measures the proportion of correct predictions out of all predictions?
model evaluation
Easy
A.Precision
B.Entropy
C.Recall
D.Accuracy
Correct Answer: Accuracy
Explanation:
Accuracy is the ratio of correctly predicted instances to the total number of instances.
Incorrect! Try again.
17What 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
Correct Answer: Confusion matrix
Explanation:
A confusion matrix summarizes true positives, true negatives, false positives, and false negatives for a classifier.
Incorrect! Try again.
18The 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
Correct Answer: Precision and Recall
Explanation:
The F1-score combines precision and recall into a single metric using their harmonic mean, balancing both concerns.
Incorrect! Try again.
19What 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
Correct Answer: Cross-validation
Explanation:
Cross-validation partitions data into folds, training and testing across them to give a more robust estimate of model performance.
Incorrect! Try again.
20In 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
Correct Answer: The proportion of actual positives that were correctly identified
Explanation:
Recall (sensitivity) is the fraction of true positive cases that the model successfully detected out of all actual positives.
Incorrect! Try again.
21In 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.
Correct Answer:
Explanation:
The two supporting hyperplanes are . The perpendicular distance between them is , which SVM maximizes by minimizing .
Incorrect! Try again.
22You 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
Correct Answer: It penalizes misclassifications heavily, risking overfitting
Explanation:
A large places high cost on margin violations, so the model fits training points closely with a narrow margin, increasing overfitting risk. Small allows more violations for a wider margin.
Incorrect! Try again.
23Which 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
Correct Answer: The data is not linearly separable in the original feature space
Explanation:
The kernel trick maps data into a higher-dimensional space where a linear separator may exist, without explicitly computing the transformation. It is used when data is not linearly separable originally.
Incorrect! Try again.
24For 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
Correct Answer: Overfitting, as each point's influence becomes very local
Explanation:
A large shrinks the radius of influence of each training point, producing a highly wiggly boundary that fits noise. Small gives smoother, more general boundaries.
Incorrect! Try again.
25In 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
Correct Answer: They allow certain points to violate the margin or be misclassified
Explanation:
Slack variables measure how much a point violates its margin constraint, letting the soft-margin SVM tolerate some errors when data is noisy or non-separable.
Incorrect! Try again.
26A node contains 8 positive and 8 negative samples. What is the Gini impurity of this node?
decision trees
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Gini . A perfectly mixed binary node has maximum Gini impurity of .
Incorrect! Try again.
27Which 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
Correct Answer: Pruning branches that add little predictive value
Explanation:
Pruning removes branches that do not improve generalization, simplifying the tree and reducing overfitting. Deeper trees and unrestricted splits typically increase overfitting.
Incorrect! Try again.
28Information 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
Correct Answer: The reduction in entropy achieved by the split
Explanation:
Information gain entropy(parent) weighted entropy(children). The split maximizing this reduction in impurity is chosen at each node.
Incorrect! Try again.
29A 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
Correct Answer: Gain ratio
Explanation:
Gain ratio normalizes information gain by the split's intrinsic information, penalizing features with many values (like IDs) that would otherwise be unfairly favored.
Incorrect! Try again.
30For a node with class proportions and , what is the entropy (in bits, base 2)?
decision trees
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Entropy bits.
Incorrect! Try again.
31In 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
Correct Answer: The within-cluster sum of squared distances to centroids
Explanation:
K-means iteratively assigns points to the nearest centroid and updates centroids to minimize the total within-cluster sum of squares (inertia).
Incorrect! Try again.
32The '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
Correct Answer: Choose a suitable number of clusters
Explanation:
The elbow method plots inertia against and looks for the point where adding more clusters yields diminishing returns, indicating a reasonable .
Incorrect! Try again.
33Which 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
Correct Answer: DBSCAN
Explanation:
DBSCAN groups densely connected points and labels low-density points as noise, allowing it to detect non-spherical clusters without predefining the number of clusters.
Incorrect! Try again.
34A 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
Correct Answer: Well matched to its own cluster and far from others
Explanation:
The silhouette value compares intra-cluster cohesion with nearest-cluster separation. Values near mean the point fits its cluster tightly and is distant from neighboring clusters.
Incorrect! Try again.
35Why 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
Correct Answer: Distance calculations become dominated by large-range features otherwise
Explanation:
K-means uses Euclidean distance, so features with larger numeric ranges disproportionately influence cluster assignments. Scaling ensures each feature contributes fairly.
Incorrect! Try again.
36A 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.
Correct Answer:
Explanation:
Precision .
Incorrect! Try again.
37Using the same confusion matrix (TP=40, FP=10, FN=30, TN=20), what is the recall?
model evaluation
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Recall .
Incorrect! Try again.
38For 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
Correct Answer: A model predicting only the majority class scores high accuracy
Explanation:
Always predicting the majority class yields 95% accuracy while completely failing on the minority class. Metrics like precision, recall, or F1 give a truer picture.
Incorrect! Try again.
39The 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.
Correct Answer:
Explanation:
.
Incorrect! Try again.
40What 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
Correct Answer: The classifier performs no better than random guessing
Explanation:
An AUC of corresponds to the diagonal of the ROC curve, meaning the model cannot distinguish classes better than chance. An AUC of is perfect.
Incorrect! Try again.
41For 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
Correct Answer: The classifier approaches a hard-margin SVM that penalizes any misclassification heavily
Explanation:
As , the penalty on slack variables becomes so large that virtually no margin violations are allowed, reducing the soft-margin SVM to a hard-margin classifier prone to overfitting.
Incorrect! Try again.
42In 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.
Correct Answer:
Explanation:
By the KKT conditions, points with lie outside the margin and do not influence the decision boundary. Only points with (on or inside the margin) are support vectors.
Incorrect! Try again.
43The 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
Correct Answer: The model tends to memorize training points, risking severe overfitting
Explanation:
Large makes the kernel very peaked, so each point's influence is highly local. The boundary wraps tightly around individual training points, producing high variance and overfitting.
Incorrect! Try again.
44Why 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
Correct Answer: It computes inner products in feature space without explicitly mapping the data
Explanation:
The dual SVM depends only on inner products . A kernel computes these directly, avoiding the explicit and possibly infinite-dimensional mapping .
Incorrect! Try again.
45A 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
Correct Answer: It is halved
Explanation:
The geometric margin equals . If doubles, the margin is divided by two, i.e., halved.
Incorrect! Try again.
46A node contains 40 positive and 40 negative samples. What is its Gini impurity?
decision trees
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Gini , the maximum impurity for a two-class node.
Incorrect! Try again.
47A 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.
Correct Answer:
Explanation:
Weighted child entropy . Information gain .
Incorrect! Try again.
48Which 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
Correct Answer: Small changes in training data can produce very different tree structures
Explanation:
Because splits are chosen greedily and recursively, a minor change near the root can cascade into an entirely different tree, making unpruned trees unstable and high-variance.
Incorrect! Try again.
49In 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
Correct Answer: It penalizes tree size, encouraging smaller trees as it increases
Explanation:
The term adds a cost proportional to the number of leaves. Larger favors simpler trees by pruning subtrees whose error reduction does not justify their added complexity.
Incorrect! Try again.
50Why 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
Correct Answer: High-cardinality features can create many pure partitions; gain ratio normalizes by split information
Explanation:
A feature with many values can trivially split data into small pure groups, inflating information gain. Gain ratio divides by the split information (intrinsic entropy of the split), penalizing highly branching features.
Incorrect! Try again.
51K-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
Correct Answer: The objective is non-convex, so it may settle in a local minimum depending on initialization
Explanation:
The WCSS objective is non-convex over cluster assignments and centroids. Lloyd's algorithm guarantees convergence to a local, not global, minimum, so results depend heavily on initial centroids (mitigated by k-means++).
Incorrect! Try again.
52Which 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
Correct Answer: Arbitrarily shaped clusters with noise and varying cluster counts
Explanation:
DBSCAN groups points by density connectivity, so it can find non-convex, arbitrarily shaped clusters and label low-density points as noise, without requiring to be specified.
Incorrect! Try again.
53The 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
Correct Answer: The point lies near the boundary between two clusters
Explanation:
is the mean intra-cluster distance and the mean nearest-cluster distance. When , , indicating the point is roughly equidistant from its own and a neighboring cluster.
Incorrect! Try again.
54In 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
Correct Answer: Single linkage
Explanation:
Single linkage merges clusters based on the closest pair of points, so a chain of nearby points can link distant clusters (the chaining effect), and it is sensitive to noise between clusters.
Incorrect! Try again.
55Why 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
Correct Answer: It assumes clusters have equal variance and roughly equal population, biasing boundaries
Explanation:
K-means implicitly favors equal-sized, equal-variance clusters because it assigns points to the nearest centroid using Euclidean distance. Large or dense clusters can 'steal' boundary points from smaller ones.
Incorrect! Try again.
56A 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
Correct Answer: Accuracy , recall
Explanation:
Predicting all negatives gets 95% of labels right (accuracy ) but detects no positives, so recall (TP/(TP+FN)) . This shows why accuracy misleads on imbalanced data.
Incorrect! Try again.
57A model has precision and recall . What is its score?
model evaluation
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
.
Incorrect! Try again.
58Why 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
Correct Answer: The large number of true negatives keeps the false positive rate low, inflating ROC-AUC
Explanation:
With many negatives, even numerous false positives barely raise the FPR, so ROC curves look optimistic. Precision-recall curves reflect performance on the rare positive class more faithfully.
Incorrect! Try again.
59In 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
Correct Answer: Higher variance and lower bias, at greater computational cost
Explanation:
As grows, each training set is nearly the full dataset (low bias), but the highly correlated, overlapping training sets make the averaged estimate higher-variance, and computation grows to fits.
Incorrect! Try again.
60A 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
Correct Answer: High variance; add regularization or more training data
Explanation:
A large gap between low training error and high validation error signals overfitting (high variance). Remedies include regularization, more data, or reducing model complexity.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →