1What is the primary goal of a Support Vector Machine (SVM) classifier?
Support Vector Machine
Easy
A.To find the hyperplane that best separates the classes with maximum margin
B.To reduce the dataset size
C.To minimize the number of features
D.To group data points into clusters
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.The centroids of each class
B.The data points closest to the decision boundary
C.The features used in the model
D.All the data points in the dataset
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.Handle non-linearly separable data by mapping it to a higher-dimensional space
B.Reduce the training time to zero
C.Convert regression into classification
D.Remove all outliers automatically
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.Entropy kernel
B.Radial Basis Function (RBF)
C.Silhouette kernel
D.Gini kernel
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.Gradient
B.Margin
C.Bias
D.Threshold
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 test or decision on a feature
C.A support vector
D.A final class label
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 splitting condition
B.The root of the tree
C.The final output or class label
D.A feature test
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.Margin width
B.Euclidean distance
C.Information Gain
D.Silhouette score
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.Becoming a linear model
B.Losing all its leaf nodes
C.Underfitting the training data
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.Scaling
B.Pruning
C.Boosting
D.Encoding
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.Unsupervised learning
D.Semi-supervised 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 clusters
B.The number of outliers
C.The number of iterations
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.Hyperplane
B.Support vector
C.Root node
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.K-Means clustering
B.Linear regression
C.Logistic regression
D.Agglomerative 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 maximize the margin between classes
B.To group similar data points together
C.To label data using known outputs
D.To predict a continuous value
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.Recall
B.Precision
C.Entropy
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.Correlation matrix
B.Confusion matrix
C.Distance 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.Entropy and Gini
B.Accuracy and Loss
C.Bias and Variance
D.Precision and Recall
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 proportion of predicted positives that were correct
B.The total number of features used
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 data is not linearly separable in the original feature space
C.The features are already normalized
D.The classes are perfectly balanced
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.A guaranteed wider margin
B.Removal of all support vectors
C.Underfitting, as the boundary becomes nearly linear
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 set the number of support vectors
B.They allow certain points to violate the margin or be misclassified
C.They convert the problem into a regression task
D.They scale the input features before training
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.Splitting on features with the most unique values
B.Pruning branches that add little predictive value
C.Removing the stopping criteria entirely
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 depth added to the tree by the split
B.The reduction in entropy achieved by the split
C.The total number of leaves created
D.The increase in entropy after the split
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.Silhouette score
B.Gain ratio
C.Euclidean distance
D.Mean squared error
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 within-cluster sum of squared distances to centroids
B.The between-cluster variance only
C.The silhouette score of the worst point
D.The number of clusters
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.Choose a suitable number of clusters
B.Initialize the centroids optimally
C.Detect outliers in the data
D.Measure feature correlation
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-means
C.K-medoids
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.A noise point with no cluster
B.On the boundary between two clusters
C.Assigned to the wrong 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 guarantees a global optimum
B.It reduces the number of clusters needed
C.Distance calculations become dominated by large-range features otherwise
D.It converts the algorithm into hierarchical clustering
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 ignores true negatives
C.Accuracy cannot be computed on imbalanced data
D.A model predicting only the majority class scores high accuracy
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 is overfitting the training data
B.The classifier performs no better than random guessing
C.The classifier has zero false positives
D.The classifier is perfect
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 support vectors become independent of the training data
D.The regularization dominates, shrinking toward zero
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.
B.
C. exactly
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.All points map to the same feature-space location
B.The boundary becomes smoother and more linear
C.The model tends to memorize training points, risking severe overfitting
D.The kernel degenerates into a linear kernel
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 computes inner products in feature space without explicitly mapping the data
B.It eliminates the need for support vectors entirely
C.It reduces the feature space dimensionality before training
D.It replaces the quadratic optimization with a linear one
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 becomes zero
B.It is halved
C.It doubles
D.It stays the same
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.Small changes in training data can produce very different tree structures
B.They cannot represent non-linear boundaries
C.They use axis-aligned splits that ignore feature correlations
D.They always underfit due to greedy splitting
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 penalizes tree size, encouraging smaller trees as it increases
B.It controls the minimum samples per split
C.It scales the training error of each leaf
D.It weights misclassified samples during boosting
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 overweights numeric features; gain ratio converts them to categorical
B.Information gain ignores class balance; gain ratio adds Laplace smoothing
C.Information gain double-counts entropy; gain ratio subtracts it once
D.High-cardinality features can create many pure partitions; gain ratio normalizes by split information
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.The objective is non-convex, so it may settle in a local minimum depending on initialization
B.It requires labeled data that may be noisy
C.It uses Manhattan distance instead of Euclidean
D.It always merges the two nearest clusters
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.Data where the number of clusters is known in advance
B.Arbitrarily shaped clusters with noise and varying cluster counts
C.Spherical clusters of equal size and density
D.High-dimensional data with no density variation
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 lies near the boundary between two clusters
B.The point is definitely misclassified
C.The point is deep inside its cluster
D.The point is a noise outlier
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.Ward's linkage
C.Complete linkage
D.Single 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 only works for balanced classes by definition
B.The large number of true negatives keeps the false positive rate low, inflating ROC-AUC
C.ROC-AUC cannot be computed without a fixed threshold
D.Precision-recall AUC ignores the positive class entirely
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.The estimate becomes independent of the data
C.Both bias and variance decrease monotonically
D.Lower variance and higher bias in the estimate
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.High bias; increase model complexity
B.High variance; add regularization or more training data
C.Data leakage; shuffle the labels
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 →