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 fundamental difference between the target variables in classification and regression problems?
Not quite. Try another option.
Answer: Classification predicts discrete class labels, while regression predicts continuous numerical values.
Regression models are used when the target variable is continuous (e.g., price, temperature), whereas classification models are used when the target variable is categorical or discrete (e.g., spam/not spam, dog/cat).
Question 2 of 50
Which of the following scenarios is a regression problem?
Not quite. Try another option.
Answer: Predicting the price of a house based on its square footage.
House price is a continuous numerical variable, making this a regression task. The other options involve categorical classification or clustering.
Question 3 of 50
In Simple Linear Regression, the relationship between the independent variable and the dependent variable is modeled as:
Not quite. Try another option.
Answer:
Simple linear regression models the relationship as a straight line, where is the intercept, is the slope, and is the error term.
Question 4 of 50
Which statement regarding Polynomial Regression is true?
Not quite. Try another option.
Answer: It is a form of linear regression because it is linear in the parameters (coefficients).
Although polynomial regression fits a non-linear curve to the data, the model is linear with respect to its coefficients (weights), and thus is technically considered a form of linear regression.
Question 5 of 50
What happens if the degree of the polynomial in polynomial regression is chosen to be too high?
Not quite. Try another option.
Answer: The model will overfit the data (High Variance).
A high-degree polynomial tries to pass through every data point, capturing noise rather than the underlying trend, leading to overfitting and poor generalization.
Question 6 of 50
Which loss function is most commonly used for Ordinary Least Squares (OLS) regression?
Not quite. Try another option.
Answer: Mean Squared Error (MSE)
OLS regression aims to minimize the sum of squared residuals, which is directly equivalent to minimizing the Mean Squared Error (MSE).
Question 7 of 50
The Mean Squared Error (MSE) is calculated as:
Not quite. Try another option.
Answer:
MSE is the average of the squares of the errors (the difference between actual values and predicted values ).
Question 8 of 50
Which loss function is more robust to outliers in a regression problem?
Not quite. Try another option.
Answer: Mean Absolute Error (MAE)
MAE minimizes the absolute differences (L1 norm). Unlike MSE, which squares the errors and penalizes large errors (outliers) heavily, MAE treats all errors linearly, making it more robust to outliers.
Question 9 of 50
In the context of regression regularization, Lasso Regression adds which penalty term to the loss function?
Not quite. Try another option.
Answer: L1 penalty (Absolute magnitude of coefficients: )
Lasso (Least Absolute Shrinkage and Selection Operator) uses the L1 norm penalty, which can shrink some coefficients to exactly zero, effectively performing feature selection.
Question 10 of 50
What is a defining characteristic of Non-Parametric Regression?
Not quite. Try another option.
Answer: The number of parameters grows with the size of the training data.
Non-parametric methods (like KNN regression or Kernel regression) do not assume a fixed functional form. The 'parameters' are essentially the training data itself, so the complexity grows as data increases.
Question 11 of 50
In K-Nearest Neighbors (KNN) regression, how is the prediction for a new data point made?
Not quite. Try another option.
Answer: By taking the average (or weighted average) of the target values of the 'K' closest training neighbors.
For regression, KNN identifies the nearest neighbors and averages their continuous target values to predict the output for the query point.
Question 12 of 50
Which of the following is true regarding the choice of 'k' in KNN regression?
Not quite. Try another option.
Answer: A very small 'k' (e.g., k=1) leads to high variance (overfitting).
When is small, the model is very sensitive to local noise in the data (overfitting). As increases, the prediction becomes smoother (lower variance, potentially higher bias).
Question 13 of 50
What is the primary difference between Supervised Learning (Classification/Regression) and Unsupervised Learning (Clustering)?
Not quite. Try another option.
Answer: Supervised learning requires labeled data (input-output pairs), while unsupervised learning uses unlabeled data.
The key distinction is the presence of labels. Classification/Regression trains on known outcomes. Clustering finds hidden structures in data without pre-existing labels.
Question 14 of 50
The Euclidean distance between two points and is given by:
Not quite. Try another option.
Answer:
Euclidean distance is the straight-line distance between two points, derived from the Pythagorean theorem ( norm).
Question 15 of 50
Which distance measure corresponds to the norm and is calculated as the sum of absolute differences?
Not quite. Try another option.
Answer: Manhattan Distance
Manhattan distance (Taxicab geometry) measures distance along axes at right angles, calculated as .
Question 16 of 50
Cosine Similarity is particularly useful for:
Not quite. Try another option.
Answer: Measuring the similarity between text documents (represented as vectors) irrespective of magnitude.
Cosine similarity measures the cosine of the angle between two vectors. It focuses on orientation rather than magnitude, making it ideal for text analysis where document length might vary but topic composition is similar.
Question 17 of 50
The Minkowski distance is a generalization of both Euclidean and Manhattan distances defined as . If , it becomes:
Not quite. Try another option.
Answer: Manhattan Distance
When in the Minkowski formula, it results in the sum of absolute differences, which is the Manhattan distance.
Question 18 of 50
Which of the following is a Partition-based clustering algorithm?
Not quite. Try another option.
Answer: K-Means
K-Means is the classic partition-based method, where data is divided into non-overlapping groups (partitions) defined by centroids.
Question 19 of 50
What is the objective function that the K-Means algorithm tries to minimize?
Not quite. Try another option.
Answer: Within-Cluster Sum of Squares (WCSS)
K-Means aims to minimize the variance within each cluster, calculated as the sum of squared distances between data points and their respective cluster centroids.
Question 20 of 50
Which of the following is a step in the K-Means algorithm?
Not quite. Try another option.
Answer: Assigning points to the nearest cluster centroid.
The standard Lloyd's algorithm for K-Means alternates between two steps: 1) Assignment (assign points to nearest centroid) and 2) Update (recalculate centroids based on assigned points).
Question 21 of 50
A major limitation of the standard K-Means algorithm is:
Not quite. Try another option.
Answer: It requires the number of clusters to be specified in advance.
K-Means cannot automatically determine the optimal number of clusters; the user must provide as a hyperparameter.
Question 22 of 50
How does K-Medoids differ from K-Means?
Not quite. Try another option.
Answer: K-Medoids uses actual data points as centers (medoids) and is more robust to outliers.
Because K-Medoids selects an actual data point as the center rather than averaging coordinates (which can be skewed by outliers), it is more robust to noise/outliers.
Question 23 of 50
Hierarchical clustering can be divided into two main types:
Not quite. Try another option.
Answer: Agglomerative (Bottom-Up) and Divisive (Top-Down)
Agglomerative starts with clusters and merges them. Divisive starts with 1 cluster and splits it recursively.
Question 24 of 50
In Agglomerative Hierarchical Clustering, what does 'Single Linkage' measure?
Not quite. Try another option.
Answer: The minimum distance between the closest pair of points in two clusters.
Single linkage looks at the shortest distance between any single point in cluster A and any single point in cluster B. It often leads to the 'chaining' phenomenon.
Question 25 of 50
What is a Dendrogram?
Not quite. Try another option.
Answer: A diagram representing the tree structure of hierarchical clustering.
A dendrogram is a tree diagram used to illustrate the arrangement of the clusters produced by hierarchical clustering.
Question 26 of 50
In hierarchical clustering, 'Complete Linkage' uses which distance metric to merge clusters?
Not quite. Try another option.
Answer: Maximum distance between points (farthest neighbors).
Complete linkage considers the distance between the two clusters to be equal to the longest distance from any member of one cluster to any member of the other cluster.
Question 27 of 50
Which clustering method does NOT require specifying the number of clusters upfront?
Not quite. Try another option.
Answer: Hierarchical Clustering
Hierarchical clustering builds a tree (dendrogram). The number of clusters is determined by where you choose to 'cut' the tree, which can be decided after viewing the structure.
Question 28 of 50
What is the Elbow Method used for?
Not quite. Try another option.
Answer: To determine the optimal number of clusters () in K-Means.
The Elbow Method plots the WCSS against the number of clusters. The optimal is usually at the 'elbow' point where the rate of decrease in WCSS slows down significantly.
Question 29 of 50
The Silhouette Score ranges between:
Not quite. Try another option.
Answer: -1 and 1
The Silhouette Coefficient measures how similar an object is to its own cluster compared to other clusters. +1 indicates good clustering, 0 indicates overlapping, and -1 indicates wrong assignment.
Question 30 of 50
A Silhouette Score close to +1 implies:
Not quite. Try another option.
Answer: The point is well matched to its own cluster and far from neighboring clusters.
A high positive score indicates dense, well-separated clusters.
Question 31 of 50
Which metric is used for cluster validation when ground truth labels are available?
Not quite. Try another option.
Answer: Rand Index (or Adjusted Rand Index)
The Rand Index compares the clustering results with the actual class labels (external validation) to measure similarity. The others are internal validation metrics used when labels are unknown.
Question 32 of 50
In the context of Ridge Regression, as the penalty parameter approaches infinity, the regression coefficients tend towards:
Not quite. Try another option.
Answer: Zero
A very high penalty dominates the loss function, forcing the optimization to minimize the coefficients' magnitude to near zero to reduce the penalty.
Question 33 of 50
Which regression technique fits a local regression model to a subset of the data surrounding the query point?
LOESS (or LOWESS) is a non-parametric method that fits simple models (like linear regression) to localized subsets of data.
Question 34 of 50
Jaccard Similarity is defined as:
Not quite. Try another option.
Answer:
Jaccard similarity measures the similarity between finite sample sets, defined as the size of the intersection divided by the size of the union.
Question 35 of 50
K-Means++ is an algorithm used for:
Not quite. Try another option.
Answer: Initializing the cluster centers to improve convergence speed and quality.
K-Means++ is a smart initialization technique that spreads out the initial centroids to avoid poor local minima, addressing the sensitivity of standard K-Means to initialization.
Question 36 of 50
Which of the following data shapes is K-Means least likely to handle correctly?
Not quite. Try another option.
Answer: Concentric circles (e.g., a donut shape).
K-Means assumes clusters are convex and spherical (using Euclidean distance). It fails on non-convex shapes like concentric rings or elongated moons.
Question 37 of 50
The Dunn Index is an internal cluster validation metric where a higher value indicates:
Not quite. Try another option.
Answer: Compact and well-separated clusters.
The Dunn Index is the ratio of the minimum inter-cluster distance to the maximum intra-cluster diameter. We want the numerator high (separation) and denominator low (compactness), so a higher index is better.
Question 38 of 50
Which statement regarding the bias-variance trade-off in regression is correct?
Not quite. Try another option.
Answer: Complex non-linear models usually have low bias and high variance.
Complex models fit the training data very well (low bias) but fluctuate wildly with different training sets (high variance), leading to overfitting.
Question 39 of 50
What is Ward's Method in hierarchical clustering?
Not quite. Try another option.
Answer: An agglomerative method that minimizes the increase in total within-cluster variance when merging.
Ward's method is a variance-minimizing approach. At each step, it merges the pair of clusters that leads to the minimum increase in total within-cluster variance.
Question 40 of 50
Hamming distance is primarily used for:
Not quite. Try another option.
Answer: Categorical data or strings of equal length.
Hamming distance measures the number of positions at which corresponding symbols are different between two strings of equal length (e.g., '101' vs '111' distance is 1).
Question 41 of 50
In kernel regression (e.g., Nadaraya-Watson), the 'bandwidth' parameter controls:
Not quite. Try another option.
Answer: The smoothness of the fit (width of the kernel window).
The bandwidth determines how much influence neighbors have. A large bandwidth results in a smoother curve (high bias), while a small bandwidth results in a wiggly curve (high variance).
Question 42 of 50
Which of the following is NOT a metric for calculating the distance between two clusters in hierarchical clustering?
Not quite. Try another option.
Answer: Gradient Descent
Gradient Descent is an optimization algorithm used to minimize loss functions, not a linkage criterion for measuring distance between clusters.
Question 43 of 50
For a dataset with points, what is the time complexity of one iteration of K-Means with clusters and dimensions?
Not quite. Try another option.
Answer:
For every point (), we calculate the distance to every centroid () across all dimensions (). Hence linear in .
Question 44 of 50
What is the main advantage of Hierarchical Clustering over K-Means?
Not quite. Try another option.
Answer: It provides a taxonomy/hierarchy of clusters and doesn't require pre-specifying .
The resulting dendrogram provides rich structural information and allows the user to choose the granularity of clustering after the fact.
Question 45 of 50
If a regression model has an (Coefficient of Determination) score of 1.0, it means:
Not quite. Try another option.
Answer: The model perfectly fits the data.
represents the proportion of variance in the dependent variable explained by the model. A score of 1.0 implies perfect prediction of the training data.
Question 46 of 50
Which of these is a 'lazy learning' algorithm often used for regression?
Not quite. Try another option.
Answer: K-Nearest Neighbors (KNN)
KNN is a lazy learner because it does not learn a discriminative function from the training data but memorizes the training dataset instead. Computation happens only during prediction.
Question 47 of 50
In the context of clustering, what is 'inter-cluster distance'?
Not quite. Try another option.
Answer: The distance between different clusters.
Good clustering aims to maximize inter-cluster distance (separation) and minimize intra-cluster distance (compactness).
Question 48 of 50
When using the Manhattan distance, the set of points at a constant distance from the origin forms a:
Not quite. Try another option.
Answer: Square (rotated 45 degrees)
In 2D, describes a square tilted by 45 degrees (a diamond shape).
Question 49 of 50
Which statement regarding outlier sensitivity is correct?
Not quite. Try another option.
Answer: K-Means is sensitive to outliers because the mean is influenced by extreme values.
Since K-Means calculates the arithmetic mean of points to find the centroid, a distant outlier can significantly shift the centroid, distorting the cluster.
Question 50 of 50
What is the 'Kernel Trick' in the context of non-linear regression (e.g., Support Vector Regression)?
Not quite. Try another option.
Answer: Mapping data to a higher-dimensional space to make it linearly separable/fittable without explicitly calculating coordinates.
The kernel trick computes the inner products in a high-dimensional feature space, allowing algorithms to fit non-linear relationships efficiently.
That's unit 4
Answer a few questions and your score shows up here.
Nearly through. Did unit 4 of INT394 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 4 of INT394 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.