Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
What is the primary goal of a Support Vector Machine (SVM) classifier?
Not quite. Try another option.
Answer: To find the hyperplane that best separates the classes with maximum margin
An SVM aims to find the optimal separating hyperplane that maximizes the margin between different classes.
Question 2 of 60 · Support Vector Machine · Easy
In SVM, what are 'support vectors'?
Not quite. Try another option.
Answer: The data points closest to the decision boundary
Support vectors are the data points nearest to the hyperplane; they define the position and orientation of the decision boundary.
Question 3 of 60 · Support Vector Machine · Easy
What does the 'kernel trick' allow an SVM to do?
Not quite. Try another option.
Answer: Handle non-linearly separable data by mapping it to a higher-dimensional space
Kernels transform data into a higher-dimensional space where a linear separator can be found, enabling non-linear classification.
Question 4 of 60 · Support Vector Machine · Easy
Which of the following is a commonly used kernel function in SVM?
Not quite. Try another option.
Answer: Radial Basis Function (RBF)
The RBF (Gaussian) kernel is one of the most widely used kernels in SVM for handling non-linear data.
Question 5 of 60 · Support Vector Machine · Easy
The distance between the hyperplane and the nearest data points in SVM is called the:
Not quite. Try another option.
Answer: Margin
The margin is the distance between the separating hyperplane and the closest support vectors from each class.
Question 6 of 60 · decision trees · Easy
What does each internal node in a decision tree represent?
Not quite. Try another option.
Answer: A test or decision on a feature
In a decision tree, internal nodes represent tests on features, branches represent outcomes, and leaf nodes represent class labels.
Question 7 of 60 · decision trees · Easy
What do the leaf nodes of a decision tree represent?
Not quite. Try another option.
Answer: The final output or class label
Leaf (terminal) nodes hold the final prediction, either a class label for classification or a value for regression.
Question 8 of 60 · decision trees · Easy
Which measure is commonly used to decide the best split in a decision tree?
Not quite. Try another option.
Answer: Information Gain
Information Gain (based on entropy) and the Gini index are common criteria used to choose the best feature to split on.
Question 9 of 60 · decision trees · Easy
What is a common problem when a decision tree grows too deep?
Not quite. Try another option.
Answer: Overfitting the training data
Very deep trees can memorize training data, capturing noise and leading to overfitting and poor generalization.
Question 10 of 60 · decision trees · Easy
Which technique is used to reduce overfitting in decision trees by removing branches?
Not quite. Try another option.
Answer: Pruning
Pruning removes branches that add little predictive power, simplifying the tree and improving generalization.
Question 11 of 60 · clustering · Easy
Clustering is an example of which type of machine learning?
Not quite. Try another option.
Answer: Unsupervised learning
Clustering groups data without using labeled outputs, making it a form of unsupervised learning.
Question 12 of 60 · clustering · Easy
In the K-Means algorithm, what does the parameter represent?
Not quite. Try another option.
Answer: The number of clusters
In K-Means, specifies the number of clusters the algorithm should partition the data into.
Question 13 of 60 · clustering · Easy
What does the K-Means algorithm use to represent the center of each cluster?
Not quite. Try another option.
Answer: Centroid
Each K-Means cluster is represented by its centroid, the mean position of all points assigned to that cluster.
Question 14 of 60 · clustering · Easy
Which of the following is a hierarchical clustering method?
Not quite. Try another option.
Answer: Agglomerative clustering
Agglomerative clustering is a hierarchical method that repeatedly merges the closest clusters into larger ones.
Question 15 of 60 · clustering · Easy
What is the main objective of a clustering algorithm?
Not quite. Try another option.
Answer: To group similar data points together
Clustering aims to organize data so that points within a group are similar to each other and different from points in other groups.
Question 16 of 60 · model evaluation · Easy
Which metric measures the proportion of correct predictions out of all predictions?
Not quite. Try another option.
Answer: Accuracy
Accuracy is the ratio of correctly predicted instances to the total number of instances.
Question 17 of 60 · model evaluation · Easy
What table is commonly used to summarize the performance of a classification model?
Not quite. Try another option.
Answer: Confusion matrix
A confusion matrix summarizes true positives, true negatives, false positives, and false negatives for a classifier.
Question 18 of 60 · model evaluation · Easy
The F1-score is the harmonic mean of which two metrics?
Not quite. Try another option.
Answer: Precision and Recall
The F1-score combines precision and recall into a single metric using their harmonic mean, balancing both concerns.
Question 19 of 60 · model evaluation · Easy
What technique splits data into multiple subsets to train and test a model repeatedly for reliable evaluation?
Not quite. Try another option.
Answer: Cross-validation
Cross-validation partitions data into folds, training and testing across them to give a more robust estimate of model performance.
Question 20 of 60 · model evaluation · Easy
In model evaluation, what does 'recall' measure?
Not quite. Try another option.
Answer: The proportion of actual positives that were correctly identified
Recall (sensitivity) is the fraction of true positive cases that the model successfully detected out of all actual positives.
Question 21 of 60 · Support Vector Machine · Medium
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?
Not quite. Try another option.
Answer:
The two supporting hyperplanes are . The perpendicular distance between them is , which SVM maximizes by minimizing .
Question 22 of 60 · Support Vector Machine · Medium
You train an SVM with a very large value of the regularization parameter . What is the most likely effect on the model?
Not quite. Try another option.
Answer: It penalizes misclassifications heavily, risking overfitting
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.
Question 23 of 60 · Support Vector Machine · Medium
Which situation best justifies using the kernel trick in an SVM?
Not quite. Try another option.
Answer: The data is not linearly separable in the original feature space
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.
Question 24 of 60 · Support Vector Machine · Medium
For an RBF kernel , increasing to a very large value tends to cause what?
Not quite. Try another option.
Answer: Overfitting, as each point's influence becomes very local
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.
Question 25 of 60 · Support Vector Machine · Medium
In a soft-margin SVM, what role do the slack variables play?
Not quite. Try another option.
Answer: They allow certain points to violate the margin or be misclassified
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.
Question 26 of 60 · decision trees · Medium
A node contains 8 positive and 8 negative samples. What is the Gini impurity of this node?
Not quite. Try another option.
Answer:
Gini . A perfectly mixed binary node has maximum Gini impurity of .
Question 27 of 60 · decision trees · Medium
Which strategy most directly reduces overfitting in a fully grown decision tree?
Not quite. Try another option.
Answer: Pruning branches that add little predictive value
Pruning removes branches that do not improve generalization, simplifying the tree and reducing overfitting. Deeper trees and unrestricted splits typically increase overfitting.
Question 28 of 60 · decision trees · Medium
Information gain when selecting a split in a decision tree is best described as:
Not quite. Try another option.
Answer: The reduction in entropy achieved by the split
Information gain entropy(parent) weighted entropy(children). The split maximizing this reduction in impurity is chosen at each node.
Question 29 of 60 · decision trees · Medium
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?
Not quite. Try another option.
Answer: Gain ratio
Gain ratio normalizes information gain by the split's intrinsic information, penalizing features with many values (like IDs) that would otherwise be unfairly favored.
Question 30 of 60 · decision trees · Medium
For a node with class proportions and , what is the entropy (in bits, base 2)?
Not quite. Try another option.
Answer:
Entropy bits.
Question 31 of 60 · clustering · Medium
In k-means clustering, what does the algorithm minimize at each iteration?
Not quite. Try another option.
Answer: The within-cluster sum of squared distances to centroids
K-means iteratively assigns points to the nearest centroid and updates centroids to minimize the total within-cluster sum of squares (inertia).
Question 32 of 60 · clustering · Medium
The 'elbow method' in k-means is primarily used to:
Not quite. Try another option.
Answer: Choose a suitable number of clusters
The elbow method plots inertia against and looks for the point where adding more clusters yields diminishing returns, indicating a reasonable .
Question 33 of 60 · clustering · Medium
Which clustering algorithm can find arbitrarily shaped clusters and automatically identify noise points?
Not quite. Try another option.
Answer: DBSCAN
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.
Question 34 of 60 · clustering · Medium
A silhouette score close to for a data point indicates that the point is:
Not quite. Try another option.
Answer: Well matched to its own cluster and far from others
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.
Question 35 of 60 · clustering · Medium
Why is feature scaling generally important before applying k-means clustering?
Not quite. Try another option.
Answer: Distance calculations become dominated by large-range features otherwise
K-means uses Euclidean distance, so features with larger numeric ranges disproportionately influence cluster assignments. Scaling ensures each feature contributes fairly.
Question 36 of 60 · model evaluation · Medium
A classifier has 40 true positives, 10 false positives, 30 false negatives, and 20 true negatives. What is its precision?
Not quite. Try another option.
Answer:
Precision .
Question 37 of 60 · model evaluation · Medium
Using the same confusion matrix (TP=40, FP=10, FN=30, TN=20), what is the recall?
Not quite. Try another option.
Answer:
Recall .
Question 38 of 60 · model evaluation · Medium
For a highly imbalanced dataset (95% negative, 5% positive), why can accuracy be misleading?
Not quite. Try another option.
Answer: A model predicting only the majority class scores high accuracy
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.
Question 39 of 60 · model evaluation · Medium
The F1-score is the harmonic mean of precision and recall. Given precision and recall , what is the F1-score?
Not quite. Try another option.
Answer:
.
Question 40 of 60 · model evaluation · Medium
What does an ROC AUC value of indicate about a binary classifier?
Not quite. Try another option.
Answer: The classifier performs no better than random guessing
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.
Question 41 of 60 · Support Vector Machine · Hard
For a soft-margin SVM with primal objective , what is the effect of taking ?
Not quite. Try another option.
Answer: The classifier approaches a hard-margin SVM that penalizes any misclassification heavily
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.
Question 42 of 60 · Support Vector Machine · Hard
In the dual formulation of the SVM, a training point is a support vector if and only if its Lagrange multiplier satisfies which condition?
Not quite. Try another option.
Answer:
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.
Question 43 of 60 · Support Vector Machine · Hard
The RBF kernel is . What happens to the decision boundary as ?
Not quite. Try another option.
Answer: The model tends to memorize training points, risking severe overfitting
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.
Question 44 of 60 · Support Vector Machine · Hard
Why does the kernel trick allow SVMs to operate in high-dimensional feature spaces efficiently?
Not quite. Try another option.
Answer: It computes inner products in feature space without explicitly mapping the data
The dual SVM depends only on inner products . A kernel computes these directly, avoiding the explicit and possibly infinite-dimensional mapping .
Question 45 of 60 · Support Vector Machine · Hard
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?
Not quite. Try another option.
Answer: It is halved
The geometric margin equals . If doubles, the margin is divided by two, i.e., halved.
Question 46 of 60 · decision trees · Hard
A node contains 40 positive and 40 negative samples. What is its Gini impurity?
Not quite. Try another option.
Answer:
Gini , the maximum impurity for a two-class node.
Question 47 of 60 · decision trees · Hard
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 .)
Not quite. Try another option.
Answer:
Weighted child entropy . Information gain .
Question 48 of 60 · decision trees · Hard
Which statement best explains why fully grown decision trees typically have high variance?
Not quite. Try another option.
Answer: Small changes in training data can produce very different tree structures
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.
Question 49 of 60 · decision trees · Hard
In cost-complexity pruning, the criterion is , where is the number of leaves. What is the role of ?
Not quite. Try another option.
Answer: It penalizes tree size, encouraging smaller trees as it increases
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.
Question 50 of 60 · decision trees · Hard
Why is information gain biased toward features with many distinct values, and how does gain ratio address this?
Not quite. Try another option.
Answer: High-cardinality features can create many pure partitions; gain ratio normalizes by split information
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.
Question 51 of 60 · clustering · Hard
K-means minimizes within-cluster sum of squares. Why can it converge to a suboptimal solution?
Not quite. Try another option.
Answer: The objective is non-convex, so it may settle in a local minimum depending on initialization
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++).
Question 52 of 60 · clustering · Hard
Which scenario is DBSCAN most likely to handle better than K-means?
Not quite. Try another option.
Answer: Arbitrarily shaped clusters with noise and varying cluster counts
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.
Question 53 of 60 · clustering · Hard
The silhouette coefficient for a point is . What does a value close to indicate?
Not quite. Try another option.
Answer: The point lies near the boundary between two clusters
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.
Question 54 of 60 · clustering · Hard
In hierarchical agglomerative clustering, which linkage criterion is most sensitive to outliers and tends to produce elongated 'chained' clusters?
Not quite. Try another option.
Answer: Single linkage
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.
Question 55 of 60 · clustering · Hard
Why does K-means tend to perform poorly on clusters with very different sizes or densities even when they are spherical?
Not quite. Try another option.
Answer: It assumes clusters have equal variance and roughly equal population, biasing boundaries
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.
Question 56 of 60 · model evaluation · Hard
A classifier on an imbalanced dataset (5% positives) predicts all samples as negative. What are its accuracy and recall?
Not quite. Try another option.
Answer: Accuracy , recall
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.
Question 57 of 60 · model evaluation · Hard
A model has precision and recall . What is its score?
Not quite. Try another option.
Answer:
.
Question 58 of 60 · model evaluation · Hard
Why can the ROC-AUC be misleading compared to the precision-recall AUC on a highly imbalanced dataset?
Not quite. Try another option.
Answer: The large number of true negatives keeps the false positive rate low, inflating ROC-AUC
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.
Question 59 of 60 · model evaluation · Hard
In k-fold cross-validation, what is the main consequence of increasing toward leave-one-out (LOO)?
Not quite. Try another option.
Answer: Higher variance and lower bias, at greater computational cost
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.
Question 60 of 60 · model evaluation · Hard
A model shows low training error but high validation error. Which combined diagnosis and remedy is most appropriate?
Not quite. Try another option.
Answer: High variance; add regularization or more training data
A large gap between low training error and high validation error signals overfitting (high variance). Remedies include regularization, more data, or reducing model complexity.
That's unit 5
Answer a few questions and your score shows up here.
Nearly through. Did unit 5 of BTY587 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 5 of BTY587 save you a night before the exam?
Then you can help keep it free for the next batch. 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.