1What is the primary purpose of the Variance Threshold method in feature selection?
variance threshold Feature Selection
Easy
A.To remove features that have low or zero variance.
B.To create new features from existing ones.
C.To select features based on their importance in a tree-based model.
D.To remove features that are highly correlated with each other.
Correct Answer: To remove features that have low or zero variance.
Explanation:
Variance Threshold is a simple baseline approach to feature selection. It removes all features whose variance doesn’t meet a certain threshold. A feature with zero variance has the same value for all samples and thus provides no predictive information.
Incorrect! Try again.
2A feature in your dataset has a variance of 0. What does this imply?
variance threshold Feature Selection
Easy
A.All values in that feature are identical.
B.The feature has a perfect linear relationship with the target variable.
C.The feature contains only missing values.
D.The feature is the most important predictor.
Correct Answer: All values in that feature are identical.
Explanation:
Variance measures how much the values in a feature spread out from their average. A variance of 0 means there is no spread at all, indicating that every sample has the exact same value for that feature, making it a constant.
Incorrect! Try again.
3When is it appropriate to use correlation-based feature removal?
correlation-based removal Feature Selection
Easy
A.When two or more independent features are highly correlated with each other.
B.When the target variable is categorical.
C.When a feature has a very low variance.
D.When you want to transform features into a lower-dimensional space.
Correct Answer: When two or more independent features are highly correlated with each other.
Explanation:
This method is used to identify and remove features that are highly correlated with one another (multicollinearity). Keeping both features can make models less interpretable and stable, so one of them is often dropped.
Incorrect! Try again.
4Removing highly correlated features helps to mitigate which common statistical issue in linear models?
correlation-based removal Feature Selection
Easy
A.Autocorrelation
B.Multicollinearity
C.Underfitting
D.Heteroscedasticity
Correct Answer: Multicollinearity
Explanation:
Multicollinearity occurs when independent variables in a regression model are highly correlated. This can inflate the variance of the coefficient estimates and make the model unstable. Removing one of the correlated features is a common way to address this.
Incorrect! Try again.
5How does the Forward Selection algorithm build a set of features for a model?
forward selection
Easy
A.It randomly selects a subset of features.
B.It starts with all features and removes the least significant feature at each step.
C.It creates new features by combining existing ones.
D.It starts with an empty model and adds the most significant feature at each step.
Correct Answer: It starts with an empty model and adds the most significant feature at each step.
Explanation:
Forward Selection is an iterative method that begins with no features in the model. In each iteration, it adds the feature that provides the greatest improvement to the model's performance, until no further significant improvement can be made.
Incorrect! Try again.
6What is the starting point for the Backward Elimination feature selection method?
backward elimination
Easy
A.A model that includes all available features.
B.A model with a random subset of features.
C.A model with no features.
D.A model with only the single best feature.
Correct Answer: A model that includes all available features.
Explanation:
Backward Elimination starts with a model containing all candidate features. It then iteratively removes the least useful feature, one at a time, until a stopping criterion is met, such as all remaining features having a certain level of statistical significance.
Incorrect! Try again.
7In a Random Forest model, how is a feature's importance generally determined?
tree-based feature importance
Easy
A.By the variance of the feature's values.
B.By its p-value in a statistical test.
C.By its correlation coefficient with the target variable.
D.By measuring its average contribution to decreasing impurity across all trees.
Correct Answer: By measuring its average contribution to decreasing impurity across all trees.
Explanation:
Tree-based models like Random Forest calculate feature importance by looking at how much each feature contributes to reducing impurity (e.g., Gini impurity or entropy) at the nodes where it is used for splitting. The average decrease across all trees gives its overall importance score.
Incorrect! Try again.
8Which of the following best defines Feature Extraction?
Feature Extraction
Easy
A.Removing features with zero or low variance.
B.Creating a new set of features from the original set, often of a lower dimension.
C.Selecting a subset of the most relevant features from the original set.
D.Scaling numerical features to be within a specific range.
Correct Answer: Creating a new set of features from the original set, often of a lower dimension.
Explanation:
Feature Extraction involves transforming the original features into a new, smaller set of features (e.g., principal components). This is different from Feature Selection, which only selects a subset of the original features.
Incorrect! Try again.
9Given a 'date' column in a dataset, which of the following is an example of creating a new feature?
creating new features
Easy
A.Deleting the 'date' column because it's not a number.
B.Converting the 'date' column to a Unix timestamp.
C.Extracting the 'month' or 'day of the week' from the date.
D.Sorting the dataset by the 'date' column.
Correct Answer: Extracting the 'month' or 'day of the week' from the date.
Explanation:
Creating new features (also known as feature engineering) involves deriving new information from existing data. Extracting components like the month, year, or day of the week from a date can reveal cyclical patterns that a model can use.
Incorrect! Try again.
10Combining 'total_bedrooms' and 'total_rooms' in a housing dataset to create a 'bedrooms_per_room' ratio is an example of what?
creating new features
Easy
A.Feature selection
B.Data normalization
C.Dimensionality reduction
D.Creating a new feature
Correct Answer: Creating a new feature
Explanation:
This is a classic example of feature engineering, where domain knowledge is used to create a new, potentially more informative feature (a ratio in this case) from existing ones.
Incorrect! Try again.
11If you have a dataset of customer transactions, calculating the 'total_spent_by_customer' for each unique customer is an example of creating what type of feature?
aggregation features
Easy
A.A polynomial feature
B.A principal component
C.A normalized feature
D.An aggregation feature
Correct Answer: An aggregation feature
Explanation:
Aggregation features are created by grouping data by a specific attribute (like 'customer_id') and then applying an aggregation function (like sum, mean, or count) to another attribute.
Incorrect! Try again.
12What is the primary goal of dimensionality reduction?
Dimensionality Reduction
Easy
A.To remove all missing values from the dataset.
B.To reduce the number of features in a dataset.
C.To increase the number of samples in the dataset.
D.To increase the number of features in a dataset.
Correct Answer: To reduce the number of features in a dataset.
Explanation:
Dimensionality reduction techniques aim to decrease the number of input variables (features or dimensions) while trying to preserve as much of the important information as possible.
Incorrect! Try again.
13Which of these is a key benefit of performing dimensionality reduction?
Dimensionality Reduction
Easy
A.It guarantees an improvement in model accuracy.
B.It creates a more interpretable model by using original features.
C.It automatically handles categorical data.
D.It can reduce model training time and complexity.
Correct Answer: It can reduce model training time and complexity.
Explanation:
By reducing the number of features, dimensionality reduction can significantly speed up the training process and make the model simpler, which can also help in preventing overfitting.
Incorrect! Try again.
14The 'Curse of Dimensionality' primarily refers to problems that arise when:
Curse of dimensionality
Easy
A.The dataset contains too many outliers.
B.The number of features is very large compared to the number of observations.
C.Features are not on the same scale.
D.The number of observations is very large.
Correct Answer: The number of features is very large compared to the number of observations.
Explanation:
This term describes how data in high-dimensional spaces becomes very sparse. The volume of the space grows so fast that the data points become isolated, making it difficult for algorithms to find meaningful patterns.
Incorrect! Try again.
15Principal Component Analysis (PCA) is primarily used for what purpose?
PCA is an unsupervised technique because it does not use the target variable. It transforms the data to a new coordinate system to reduce dimensionality by finding the directions (principal components) of maximum variance.
Incorrect! Try again.
16The principal components generated by PCA have which important property?
Principal Component Analysis
Easy
A.They are always a subset of the original features.
B.They are uncorrelated with each other.
C.They perfectly separate the classes in the data.
D.They are highly correlated with each other.
Correct Answer: They are uncorrelated with each other.
Explanation:
PCA creates new features called principal components which are linear combinations of the original features. A key characteristic is that these new components are orthogonal (uncorrelated) to each other.
Incorrect! Try again.
17What does the first principal component (PC1) represent?
Principal Component Analysis
Easy
A.The direction in the data with the maximum variance.
B.The direction in the data with the minimum variance.
C.The feature that is most correlated with the target.
D.The average of all features in the dataset.
Correct Answer: The direction in the data with the maximum variance.
Explanation:
The first principal component is defined as the linear combination of the original features that captures the largest possible variance in the dataset. Subsequent components capture the maximum remaining variance while being orthogonal to the previous ones.
Incorrect! Try again.
18In PCA, what does the 'explained variance ratio' for a specific principal component indicate?
explained variance ration
Easy
A.The correlation between the component and the first original feature.
B.The number of original features that make up that component.
C.The percentage of the total variance in the dataset that is captured by that component.
D.The classification accuracy achieved using only that component.
Correct Answer: The percentage of the total variance in the dataset that is captured by that component.
Explanation:
The explained variance ratio tells us how much of the information (variance) from the original dataset is contained within each principal component. This helps in deciding how many components to keep.
Incorrect! Try again.
19What is the main objective of Linear Discriminant Analysis (LDA)?
Linear Discriminant Analysis
Easy
A.To remove features that are constant or have low variance.
B.To find a feature subspace that maximizes the variance of the data.
C.To find a feature subspace that maximizes the separability between classes.
D.To group similar data points into clusters without using labels.
Correct Answer: To find a feature subspace that maximizes the separability between classes.
Explanation:
Unlike PCA which focuses on capturing variance, LDA's primary goal is to find the linear combinations of features that best separate the different classes in a dataset. It aims to maximize the distance between the means of the classes while minimizing the variance within each class.
Incorrect! Try again.
20A fundamental difference between PCA and LDA is that LDA is a ___ algorithm.
Linear Discriminant Analysis
Easy
A.Semi-supervised
B.Supervised
C.Reinforcement
D.Unsupervised
Correct Answer: Supervised
Explanation:
LDA is a supervised algorithm because it uses the class labels of the data points to find the axes that maximize the separation between those classes. PCA, in contrast, is unsupervised as it only looks at the variance within the features, not the target labels.
Incorrect! Try again.
21A dataset has four features (F1, F2, F3, F4) that have been scaled to a range of [0, 1]. Their variances are calculated as F1: 0.02, F2: 0.15, F3: 0.005, F4: 0.20. If you apply a variance threshold of 0.01 to remove quasi-constant features, which features will be kept for the model?
variance threshold Feature Selection
Medium
A.All features will be kept
B.F3 only
C.F1, F2, and F4
D.F2 and F4
Correct Answer: F1, F2, and F4
Explanation:
The variance threshold method removes all features whose variance does not meet the specified threshold. The threshold is 0.01. The variances are: Var(F1) = 0.02 > 0.01, Var(F2) = 0.15 > 0.01, Var(F3) = 0.005 < 0.01, and Var(F4) = 0.20 > 0.01. Therefore, feature F3 is removed, and features F1, F2, and F4 are kept.
Incorrect! Try again.
22In a predictive modeling task, you find that two features, feature_A and feature_B, have a Pearson correlation coefficient of 0.95. The correlation of feature_A with the target variable is 0.4, while the correlation of feature_B with the target is -0.6. To reduce multicollinearity, which feature is the better choice to remove and why?
correlation-based removal Feature Selection
Medium
A.Remove feature_B because its correlation with the target is negative.
B.It does not matter which one you remove; the effect on the model will be identical.
C.Remove feature_A because it has a lower absolute correlation with the target.
D.Remove both features because their high inter-correlation will always harm the model.
Correct Answer: Remove feature_A because it has a lower absolute correlation with the target.
Explanation:
When two features are highly correlated, the standard practice is to keep the one that has a stronger relationship with the target variable. The strength of this relationship is measured by the absolute value of the correlation. Here, and . Since 0.6 > 0.4, feature_B is considered more predictive. Therefore, feature_A should be removed.
Incorrect! Try again.
23A data scientist is using forward selection on a dataset with 500 potential features. The process starts with an empty model and iteratively adds the most significant feature at each step. What is a key limitation of this "greedy" approach?
forward selection
Medium
A.It may select a suboptimal combination of features because it cannot remove features that become redundant later.
B.It is computationally more expensive than trying all possible feature combinations.
C.It can only be used for linear models and not for tree-based models.
D.It is guaranteed to overfit the training data more than backward elimination.
Correct Answer: It may select a suboptimal combination of features because it cannot remove features that become redundant later.
Explanation:
Forward selection is a greedy algorithm. It adds the best feature at each step based on the current set of features. However, it never re-evaluates previously added features. This can lead to a final feature set that is suboptimal, as a combination of two features added later might have been better than the first feature chosen, but the algorithm is locked into its initial choice and cannot backtrack.
Incorrect! Try again.
24You are performing backward elimination on a regression model that starts with 10 features (F1 to F10). In the first iteration, you train 10 separate models, each with 9 features (removing one feature at a time). The model performance (e.g., lowest AIC) is best when feature F7 is removed. What is the next logical step in the process?
backward elimination
Medium
A.Stop the process because the least important feature has been identified and removed.
B.Re-run the first iteration with a different performance metric to confirm the result.
C.Permanently remove F7 and start the next iteration with the remaining 9 features.
D.Put F7 back and try removing F1, as it was the second-worst performer.
Correct Answer: Permanently remove F7 and start the next iteration with the remaining 9 features.
Explanation:
Backward elimination is an iterative process. It starts with all features and, at each step, removes the single feature whose removal leads to the best model performance. After identifying and removing F7 in the first step, the process continues with the remaining 9 features. The cycle of training models with one feature removed (now from a set of 9) is repeated to find the next feature to eliminate.
Incorrect! Try again.
25When using a feature importance mechanism like Gini importance (mean decrease in impurity) from a Random Forest, what is a known potential bias that a data scientist should be aware of?
tree-based feature importance
Medium
A.The method consistently underestimates the importance of continuous numerical features.
B.The method can only be used for classification tasks, not regression.
C.The method tends to inflate the importance of high-cardinality features.
D.The method is biased towards features that have a linear relationship with the target.
Correct Answer: The method tends to inflate the importance of high-cardinality features.
Explanation:
Impurity-based feature importance measures have a known bias: they tend to favor features with a higher number of unique values (high cardinality). This applies to both numerical features and categorical features with many levels. These features offer more potential split points, which can lead to a larger reduction in impurity purely by chance, thus inflating their perceived importance.
Incorrect! Try again.
26A machine learning engineer is working with a dataset of grayscale images, where each image is 28x28 pixels. They use Principal Component Analysis (PCA) to transform the original 784-pixel features into 50 principal components. This process is best described as:
Feature Extraction
Medium
A.Feature Extraction, because new, composite features are created from the original ones.
B.Data Augmentation, because new training data is being synthesized.
C.Feature Scaling, because the range of pixel values is being normalized.
D.Feature Selection, because 734 features are being discarded.
Correct Answer: Feature Extraction, because new, composite features are created from the original ones.
Explanation:
Feature Extraction involves creating a new, smaller set of features by combining or transforming the original ones. PCA does this by finding linear combinations of the original pixel features to create new, uncorrelated features (principal components). This is distinct from Feature Selection, which would involve keeping a subset of the original 784 pixels and discarding the rest.
Incorrect! Try again.
27You are given a dataset for predicting flight delays. The data includes scheduled_departure_time and actual_departure_time in a datetime format. Which of the following newly created features would likely be the most direct and powerful predictor for the model?
creating new features
Medium
A.departure_difference = (actual_departure_time - scheduled_departure_time) in minutes.
B.departure_day_of_week extracted from scheduled_departure_time.
C.departure_month extracted from scheduled_departure_time.
D.departure_is_weekend extracted from scheduled_departure_time.
Correct Answer: departure_difference = (actual_departure_time - scheduled_departure_time) in minutes.
Explanation:
While features like day of the week, weekend status, and month are all useful contextual features, departure_difference directly calculates the delay at the point of departure. This is a very strong and direct signal for predicting the total flight delay, as it captures the initial error that the model is trying to predict.
Incorrect! Try again.
28To predict customer churn, you have a transaction log with customer_id, transaction_date, and transaction_amount. Which of the following is the best example of creating an aggregation feature at the customer level?
aggregation features
Medium
A.Calculating the average transaction_amount for each customer_id.
B.Normalizing the transaction_amount column using Min-Max scaling.
C.One-hot encoding the payment method used for each transaction.
D.Creating a days_since_last_transaction feature for each transaction record.
Correct Answer: Calculating the average transaction_amount for each customer_id.
Explanation:
Aggregation features involve summarizing data from a lower level of detail (individual transactions) to a higher level (customer). Calculating the average transaction amount per customer (GROUP BY customer_id) creates a single value for each customer that represents their typical spending behavior. This is a powerful feature for a customer-level prediction task like churn.
Incorrect! Try again.
29In a dataset where many features are highly correlated (high multicollinearity), why is a dimensionality reduction technique like PCA often more effective than a feature selection technique?
Dimensionality Reduction
Medium
A.Feature selection is always computationally more expensive than PCA.
B.PCA preserves the original features, making the model more interpretable.
D.PCA creates new uncorrelated features that capture the shared variance from the original correlated features.
Correct Answer: PCA creates new uncorrelated features that capture the shared variance from the original correlated features.
Explanation:
When features are highly correlated, they contain redundant information. Feature selection would discard some of these features, losing their unique contribution entirely. PCA, a dimensionality reduction technique, combines the correlated features into a smaller set of new, uncorrelated components. Each component captures a part of the variance from the original set, effectively summarizing the information without completely discarding it.
Incorrect! Try again.
30How does the "curse of dimensionality" primarily affect distance-based algorithms like k-Nearest Neighbors (k-NN)?
Curse of dimensionality
Medium
A.High-dimensional data is always linearly separable, making k-NN more accurate.
B.The computational cost to calculate distances decreases as the number of dimensions grows.
C.The distance between any two points in a high-dimensional space becomes less meaningful as they tend to become almost equidistant.
D.The concept of a "neighborhood" becomes more dense and easier to define.
Correct Answer: The distance between any two points in a high-dimensional space becomes less meaningful as they tend to become almost equidistant.
Explanation:
In high-dimensional spaces, the volume of the space increases exponentially, causing data points to become very sparse. A key consequence is that the distance to the nearest neighbor approaches the distance to the farthest neighbor for most points. This phenomenon, known as distance concentration, makes the concept of a "close" neighbor less distinct and meaningful, which undermines the core assumption of distance-based algorithms like k-NN.
Incorrect! Try again.
31After performing PCA on a 2D dataset with standardized features 'study_hours' and 'sleep_hours', the first principal component (PC1) is defined by the vector [0.707, -0.707]. What does this imply about the relationship between the two original features in the data?
Principal Component Analysis
Medium
A.'study_hours' and 'sleep_hours' are strongly positively correlated.
B.The two features are completely independent.
C.'study_hours' and 'sleep_hours' are strongly negatively correlated.
D.'study_hours' has significantly more variance than 'sleep_hours'.
Correct Answer: 'study_hours' and 'sleep_hours' are strongly negatively correlated.
Explanation:
The vector [0.707, -0.707] represents the loadings for PC1. This means PC1 can be written as the linear combination: PC1 = 0.707 * 'study_hours' - 0.707 * 'sleep_hours'. The opposite signs of the loadings indicate that the direction of maximum variance in the data is one where an increase in 'study_hours' corresponds to a decrease in 'sleep_hours', signifying a strong negative correlation.
Incorrect! Try again.
32A data scientist performs PCA on a dataset and obtains the following explained variance ratios for the first four principal components: PC1=0.55, PC2=0.25, PC3=0.12, PC4=0.04. To capture at least 90% of the total variance in the data, what is the minimum number of principal components they should retain?
explained variance ratio
Medium
A.2
B.1
C.3
D.4
Correct Answer: 3
Explanation:
To find the cumulative variance, we sum the explained variance ratios of the components.
1 component: 0.55 (55%)
2 components: 0.55 + 0.25 = 0.80 (80%)
3 components: 0.55 + 0.25 + 0.12 = 0.92 (92%)
To capture at least 90% of the variance, a cumulative sum of 0.90 or more is required. This is first achieved with the top 3 components, which together explain 92% of the variance.
Incorrect! Try again.
33What is the fundamental difference in the optimization objective between Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA)?
Linear Discriminant Analysis
Medium
A.PCA aims to minimize the within-class scatter, while LDA aims to maximize the total variance.
B.LDA seeks to find a feature subspace that maximizes the separability between classes, while PCA seeks to maximize the variance in the data.
C.LDA creates new features that are always orthogonal, while PCA features are not.
D.PCA is a supervised technique that uses labels, while LDA is unsupervised.
Correct Answer: LDA seeks to find a feature subspace that maximizes the separability between classes, while PCA seeks to maximize the variance in the data.
Explanation:
This is the core distinction. PCA is an unsupervised technique that finds the directions (principal components) of maximum variance in the dataset, without any regard for class labels. In contrast, LDA is a supervised technique that uses class labels to find a new feature subspace that maximizes the ratio of between-class variance to within-class variance, thereby maximizing class separability.
Incorrect! Try again.
34Applying a variance threshold to a dataset with features of vastly different scales (e.g., 'age' in years and 'income' in thousands of dollars) is problematic. What preprocessing step is essential to make the variance threshold meaningful in this scenario?
variance threshold Feature Selection
Medium
A.Feature scaling (e.g., Standardization or Min-Max scaling).
B.Applying a logarithmic transformation to the 'income' feature.
C.One-hot encoding of all categorical features.
D.Removing outliers from the 'income' feature.
Correct Answer: Feature scaling (e.g., Standardization or Min-Max scaling).
Explanation:
Variance is highly dependent on the scale of a feature. A feature with a large scale (like 'income') will naturally have a much larger variance than a feature with a small scale (like 'age'), which can be misleading. To compare variances fairly, all features must be brought to a common scale. Feature scaling, such as normalizing to a [0, 1] range or standardizing to have a mean of 0 and standard deviation of 1, is a crucial prerequisite.
Incorrect! Try again.
35Consider a scenario with a very large number of features and a relatively small number of samples (i.e., ). Why would forward selection generally be a more feasible wrapper method than backward elimination in this case?
backward elimination
Medium
A.Backward elimination is more prone to getting stuck in local optima than forward selection.
B.Backward elimination starts by fitting a model with all features, which may be computationally intractable or statistically impossible if .
C.Forward selection can handle non-linear models while backward elimination can only be used for linear models.
Correct Answer: Backward elimination starts by fitting a model with all features, which may be computationally intractable or statistically impossible if .
Explanation:
Backward elimination begins by building a model with all features. In a high-dimensional dataset where the number of features is much larger than the number of samples , fitting a model with all features is often computationally prohibitive or statistically invalid (e.g., for ordinary least squares, the solution is not unique). Forward selection is more feasible because it starts with zero features and adds them one by one, never needing to fit a model with more features than samples in its early stages.
Incorrect! Try again.
36A feature in your dataset has a very low Pearson correlation with the target variable, but a Random Forest model assigns it a high feature importance score. What is the most likely reason for this discrepancy?
tree-based feature importance
Medium
A.The feature importance calculation is flawed and should be ignored.
B.The feature is highly correlated with another unimportant feature, causing multicollinearity.
C.The feature has very low variance and was improperly scaled.
D.The feature has a strong non-linear or interaction-based relationship with the target.
Correct Answer: The feature has a strong non-linear or interaction-based relationship with the target.
Explanation:
Pearson correlation only measures the strength of a linear relationship. A feature can have a correlation of nearly zero with the target but still be highly predictive if its relationship is non-linear (e.g., a U-shaped relationship) or if it primarily contributes through interactions with other features. Tree-based models like Random Forest are excellent at capturing these complex, non-linear patterns, which would be reflected in a high importance score.
Incorrect! Try again.
37A key property of the principal components (PCs) generated by PCA is their relationship to one another. Which statement correctly describes this mathematical property?
Principal Component Analysis
Medium
A.The PCs are orthogonal, meaning they are linearly uncorrelated.
B.The PCs are a subset of the most important original features.
C.Each PC after the first one explains more variance than the previous one.
D.The PCs are all positively correlated with the first PC.
Correct Answer: The PCs are orthogonal, meaning they are linearly uncorrelated.
Explanation:
By construction, PCA finds a new set of axes (the principal components) for the data such that the components are orthogonal to each other. In a geometric sense, this means they are at right angles. In a statistical sense, this means their covariance is zero, making them linearly uncorrelated. This property is essential for reducing redundancy in the data representation.
Incorrect! Try again.
38You are given a labeled dataset with 10 classes and 50 features. Your goal is to reduce the dimensionality for a subsequent classification model. What is the maximum number of dimensions (components) that Linear Discriminant Analysis (LDA) can reduce this dataset to?
Linear Discriminant Analysis
Medium
A.49
B.10
C.9
D.50
Correct Answer: 9
Explanation:
The number of components that LDA can produce is limited by , where is the number of classes and is the number of features. In this case, and . Therefore, the maximum number of dimensions LDA can project the data onto is . LDA projects data onto a space that best separates the centers of the classes, and with C classes, there are at most C-1 such discriminatory dimensions.
Incorrect! Try again.
39Which of the following phenomena is LEAST likely to be a direct consequence of the curse of dimensionality?
Curse of dimensionality
Medium
A.A linear model becoming more interpretable due to feature clarity.
B.The number of training examples required to maintain a certain data density growing exponentially.
C.The volume of the feature space growing exponentially, making data sparse.
D.The distance between a point's nearest and farthest neighbor becoming almost equal.
Correct Answer: A linear model becoming more interpretable due to feature clarity.
Explanation:
The curse of dimensionality introduces numerous problems. It makes data sparse (B), requires exponentially more data to generalize well (C), and makes distance metrics less meaningful (D). It does not make models more interpretable. In fact, a model with hundreds or thousands of features is significantly less interpretable than a model with a few features. The other options are classic examples of the curse's effects.
Incorrect! Try again.
40You have a dataset of online user activity with session_start_time and session_end_time. You create a new feature session_duration = session_end_time - session_start_time. You then create another feature is_long_session = 1 if session_duration > 15 minutes else 0. What is the primary risk of including both session_duration and is_long_session in a linear model?
creating new features
Medium
A.Losing important information about session length.
B.Violating the assumption of normality for the model's residuals.
C.Introducing high multicollinearity between the two features.
D.Creating a feature that is too sparse to be useful.
Correct Answer: Introducing high multicollinearity between the two features.
Explanation:
is_long_session is directly derived from session_duration. This means the two features are highly correlated by definition. Including both in a linear model introduces multicollinearity, which can make the model's coefficient estimates unstable and difficult to interpret. While session_duration contains more information, the binary flag is a redundant representation of that same information.
Incorrect! Try again.
41In a high-dimensional space (e.g., >1000 dimensions), you are using a k-Nearest Neighbors (k-NN) algorithm. Which of the following statements best describes the most critical impact of the curse of dimensionality on the algorithm's distance calculations?
Curse of dimensionality
Hard
A.The ratio of the distance to the nearest neighbor and the distance to the farthest neighbor approaches 1, making distance-based discrimination difficult.
B.The computational cost of calculating distances becomes infinite, rendering the algorithm unusable.
C.The Manhattan distance becomes a more reliable metric than Euclidean distance because it is less sensitive to outliers.
D.The Euclidean distance between any two points converges to zero, making all points seem equidistant.
Correct Answer: The ratio of the distance to the nearest neighbor and the distance to the farthest neighbor approaches 1, making distance-based discrimination difficult.
Explanation:
The curse of dimensionality causes the volume of the feature space to increase so rapidly that the data points become very sparse. A key consequence is that the distance to the nearest neighbor and the farthest neighbor for a given point become almost equal. If is the distance to the farthest point and is the distance to the nearest, the ratio approaches 0. This makes it extremely difficult for algorithms like k-NN to distinguish between neighbors and non-neighbors based on distance, severely degrading their performance.
Incorrect! Try again.
42You perform PCA on a dataset that has been standardized (mean 0, variance 1). You then create a new feature, , which is a perfect linear combination of two existing features, and (i.e., ). You add to the dataset and re-run PCA. What is the most likely effect on the eigenvalues of the new covariance matrix?
Principal Component Analysis
Hard
A.At least one eigenvalue will become zero, and the largest eigenvalues corresponding to the variance in and may increase.
B.All eigenvalues will increase proportionally to the variance of the new feature.
C.The number of non-zero eigenvalues will increase by one, corresponding to the new feature.
D.A new eigenvalue of approximately zero will be introduced, and the other eigenvalues will remain unchanged.
Correct Answer: At least one eigenvalue will become zero, and the largest eigenvalues corresponding to the variance in and may increase.
Explanation:
Adding a feature that is a perfect linear combination of others introduces perfect multicollinearity. This makes the new covariance matrix singular. A singular matrix has at least one eigenvalue equal to zero. The new feature doesn't add any new information (intrinsic dimensionality is unchanged), so the number of dimensions needed to capture the variance does not increase. The variance from the new feature will be absorbed into the existing principal components that already capture the variance from and , likely increasing the magnitude of the largest eigenvalues.
Incorrect! Try again.
43You are working on a 3-class classification problem with 50 features. You decide to use Linear Discriminant Analysis (LDA) for dimensionality reduction. What is the absolute maximum number of dimensions (discriminant components) you can reduce your data to using LDA, and why?
Linear Discriminant Analysis
Hard
A.2, because the number of components is limited by , which in this case is .
B.3, because the number of components is limited by , where is the number of classes.
C.49, because the number of components is limited by , where is the number of features.
D.50, because LDA can generate as many components as there are original features.
Correct Answer: 2, because the number of components is limited by , which in this case is .
Explanation:
The number of discriminant components that LDA can produce is limited by the rank of the between-class scatter matrix . The rank of is at most , where is the number of classes. It is also limited by the number of features, . Therefore, the maximum number of components is . In this case, with 50 features and 3 classes, the maximum number of components is . The question asks for the formula using for features, which is often cited as a more precise bound for the rank of the within-class scatter matrix, but the dominant constraint here is from the number of classes, making the overall limit . Option D is the most precise and correct.
Incorrect! Try again.
44Consider a scenario where the optimal feature subset for a regression model is {A, B, C}. However, feature A is only predictive in the presence of both B and C. Individually, A has zero correlation with the target. How would a standard Forward Selection procedure, using p-value or R-squared as the selection criterion, likely perform in this situation?
forward selection
Hard
A.It will fail to select feature A because its individual contribution will appear negligible at every step, thus getting stuck in a local optimum.
B.It will correctly identify {A, B, C} as it iteratively adds the most significant feature at each step.
C.Forward Selection is guaranteed to find the global optimum, so it will test all combinations including {A, B, C} and select it.
D.It will first add B and C, and then in the next step, it will recognize the interaction and add A.
Correct Answer: It will fail to select feature A because its individual contribution will appear negligible at every step, thus getting stuck in a local optimum.
Explanation:
Forward Selection is a greedy algorithm. At each step, it evaluates adding each of the remaining features to the current set of selected features. If feature A has no predictive power on its own, it will not be selected in the first step. If B and C are selected, the algorithm will then test adding A to the set {B, C}. While in this case it might then add A, the question describes a more general limitation. The core problem is its 'myopic' or greedy nature. If A's contribution is only apparent when combined with B and C, and the algorithm happens to be at a stage with only {B} selected, adding A might still show no improvement. Thus, it can easily miss complex interactions and get stuck in a local optimum that does not include the true best subset.
Incorrect! Try again.
45You are using a Random Forest model and notice two features, monthly_income and yearly_income, are highly correlated (). How would the default Gini Importance (Mean Decrease in Impurity) metric likely represent the importance of these two features compared to Permutation Importance?
tree-based feature importance
Hard
A.Both methods will correctly identify that only one of the two features is needed and assign high importance to one and zero to the other.
B.Permutation Importance will be biased and show both as highly important, while Gini Importance will correctly split the importance between them.
C.Gini Importance may arbitrarily assign high importance to one and low to the other, while Permutation Importance might rate both as moderately important if they are predictive.
D.Gini Importance will assign high importance to both, while Permutation Importance will assign low importance to both.
Correct Answer: Gini Importance may arbitrarily assign high importance to one and low to the other, while Permutation Importance might rate both as moderately important if they are predictive.
Explanation:
Gini Importance (MDI) is calculated based on how much each feature contributes to reducing impurity within the trees during training. When two features are highly correlated, the model can use either one for a split and achieve a similar impurity reduction. This can lead to the importance being split between them, or more commonly, one feature gets chosen more frequently by chance, receiving a high importance score while the other gets a very low one. Permutation Importance, on the other hand, measures the drop in model performance when a feature's values are randomly shuffled. If monthly_income is shuffled but yearly_income is intact, the model can still use yearly_income to make good predictions, so the performance drop (and thus importance) for monthly_income might be small, potentially underestimating the true importance of the underlying concept of 'income'.
Incorrect! Try again.
46In a feature selection process, you identify two features, F1 and F2, with a correlation of 0.9. You also find that Corr(F1, Target) = 0.6 and Corr(F2, Target) = 0.2. A common heuristic is to remove the feature with the lower correlation to the target. What is a significant risk of automatically applying this heuristic without further investigation?
correlation-based removal Feature Selection
Hard
A.F2, despite its low direct correlation, might capture unique variance or have a strong relationship with the target after controlling for F1 (i.e., high partial correlation).
B.The high correlation between F1 and F2 is likely spurious and should be ignored.
C.There is no risk; removing the feature with lower correlation to the target is always the optimal choice to reduce multicollinearity.
D.The removed feature, F2, might have a strong non-linear relationship with the target that is not captured by the Pearson correlation.
Correct Answer: F2, despite its low direct correlation, might capture unique variance or have a strong relationship with the target after controlling for F1 (i.e., high partial correlation).
Explanation:
While F2 has a lower simple correlation with the target, this doesn't tell the whole story. It's possible that F1 is correlated with the target through the same mechanism as F2, but also through other mechanisms. F2 might contain unique information that is suppressed in the simple correlation analysis but would be valuable to a multivariate model like multiple regression. This is related to the concept of suppression effects. Automatically removing F2 based on the simple heuristic could lead to a loss of valuable, unique predictive information.
Incorrect! Try again.
47You are applying PCA to a dataset containing features with vastly different scales (e.g., age in years, income in dollars). You forget to scale the data before applying PCA. Which of the following outcomes is most likely?
Principal Component Analysis
Hard
A.The results will be identical to PCA on scaled data, as PCA is scale-invariant.
B.The first principal component will be dominated by the feature with the highest variance, effectively ignoring the information from other features.
C.The principal components will align with the original feature axes, providing no dimensionality reduction.
D.The PCA algorithm will fail to converge because the covariance matrix will be ill-conditioned.
Correct Answer: The first principal component will be dominated by the feature with the highest variance, effectively ignoring the information from other features.
Explanation:
PCA is a variance-maximizing procedure. If features have different scales, the feature with the largest range and variance (like income in dollars) will overwhelmingly dominate the calculation of the first principal component. The algorithm will find that the direction of maximum variance is almost perfectly aligned with the axis of that single feature. Consequently, the first PC will essentially be a proxy for the 'income' feature, and the contributions from features with smaller variance (like 'age') will be negligible. This is why standardizing the data (to have a mean of 0 and a standard deviation of 1) is a critical preprocessing step for PCA.
Incorrect! Try again.
48When comparing Backward Elimination with Forward Selection for a dataset with a large number of features (p > 100), which statement accurately describes a key trade-off, assuming the goal is to optimize a model's AIC (Akaike Information Criterion)?
backward elimination
Hard
A.Both methods are equivalent and will always arrive at the same final set of features, regardless of the starting point.
B.Backward Elimination is less prone to missing important feature interactions because it starts with all features, but it is more computationally expensive.
C.Forward Selection is guaranteed to find a better or equal AIC score because it builds the model from the ground up.
D.Backward Elimination is computationally cheaper because it performs fewer model fits than Forward Selection.
Correct Answer: Backward Elimination is less prone to missing important feature interactions because it starts with all features, but it is more computationally expensive.
Explanation:
Backward Elimination starts with the full model containing all p features. This allows it to see the combined effect and interactions of all features from the beginning. It then iteratively removes the least useful feature. Forward Selection starts with an empty model and adds features one by one, which can cause it to miss interactions that are only valuable when multiple specific features are present together. However, the starting point of Backward Elimination (fitting a model with all p features) can be extremely computationally expensive, or even impossible if p is very large or larger than the number of samples. The number of steps is at most p for both, but each step in Backward Elimination can be more costly, especially in the beginning.
Incorrect! Try again.
49You apply a VarianceThreshold feature selector with threshold=0.1 to a dataset where all features have been scaled using MinMaxScaler (scaling each feature to a range of [0, 1]). What is the most significant potential issue with this approach?
variance threshold Feature Selection
Hard
A.The threshold of 0.1 is arbitrary and has no statistical justification, making the selection process unreliable.
B.This approach is invalid because VarianceThreshold should only be applied before any scaling.
C.The variance of a min-max scaled feature depends on the distribution of its data; features with values clustered at 0 and 1 will have high variance, while those clustered in the middle will have low variance, potentially leading to incorrect removals.
D.The threshold is too low and will not remove any features, as all variances will be close to 1.0.
Correct Answer: The variance of a min-max scaled feature depends on the distribution of its data; features with values clustered at 0 and 1 will have high variance, while those clustered in the middle will have low variance, potentially leading to incorrect removals.
Explanation:
After MinMaxScaler, all features are in the [0, 1] range, but their variances are not standardized. A feature whose values are bimodally distributed at the extremes (e.g., half the data is 0, half is 1) will have a high variance (around 0.25). A feature whose values are all clustered around 0.5 will have a very low variance. A uniform distribution on [0, 1] has a variance of 1/12 (approx 0.083). Therefore, applying a fixed variance threshold after min-max scaling can lead to the removal of features not because they are quasi-constant, but because their scaled distribution is concentrated in the middle of the range. This might incorrectly remove a genuinely useful feature.
Incorrect! Try again.
50You have a binary classification problem where the classes are not linearly separable but form two concentric circles in a 2D feature space. How would applying Linear Discriminant Analysis (LDA) for dimensionality reduction from 2D to 1D perform?
Linear Discriminant Analysis
Hard
A.LDA will find the perfect 1D projection that separates the two circles, as it maximizes class separability.
B.LDA will overfit to the circular structure and create a highly non-linear decision boundary.
C.LDA will project the data onto a line that best separates the variance, similar to PCA.
D.LDA will fail to find a useful projection because the class means are identical (at the center of the circles), resulting in a between-class scatter of zero.
Correct Answer: LDA will fail to find a useful projection because the class means are identical (at the center of the circles), resulting in a between-class scatter of zero.
Explanation:
LDA works by finding a projection that maximizes the ratio of between-class variance to within-class variance. The between-class variance is calculated based on the distance between the means of the classes. In the case of two concentric circles, the mean of the inner circle and the mean of the outer ring are both at the same point (the center). Therefore, the between-class scatter matrix () will be a zero matrix. LDA will be unable to find any direction that separates the class means, and the resulting projection will be useless for classification. This highlights a key limitation of LDA: it can only find linear separations.
Incorrect! Try again.
51After performing PCA on a 50-dimensional dataset, you plot the cumulative explained variance. The plot shows a smooth, almost linear increase, reaching 95% cumulative variance only after 45 components. There is no clear 'elbow' in the scree plot. What does this suggest about the original dataset?
explained variance ratio
Hard
A.The dataset has a low intrinsic dimensionality, and most of the variance is captured by the first few components.
B.The variance is evenly distributed across many dimensions, suggesting that the features are largely uncorrelated and each contributes a small amount of unique information.
C.The PCA implementation is flawed, as a clear elbow should always be present.
D.The features in the original dataset are highly correlated and redundant.
Correct Answer: The variance is evenly distributed across many dimensions, suggesting that the features are largely uncorrelated and each contributes a small amount of unique information.
Explanation:
A sharp elbow in the scree plot (or a rapid increase in cumulative variance that then plateaus) indicates that the first few principal components capture a large portion of the total variance, which happens when the original features are highly correlated. Conversely, a smooth, slow, linear-like increase in cumulative explained variance implies that each successive principal component adds only a small, roughly equal amount of variance. This occurs when the original features are largely uncorrelated (or orthogonal), and the total variance is spread out almost evenly across all dimensions. In such a case, dimensionality reduction with PCA is less effective, as many components are needed to retain most of the information.
Incorrect! Try again.
52You are building a linear regression model. The true underlying relationship between a feature and the target is . You decide to create polynomial features from (e.g., ). What is the theoretical implication of this choice for your linear model?
creating new features
Hard
A.According to Taylor's theorem, a sufficiently high-degree polynomial can approximate the sine function within a specific range, allowing the linear model to capture the non-linear relationship.
B.Using polynomial features will introduce perfect multicollinearity, making the model's coefficients uninterpretable and unstable.
C.The model will remain linear and will not be able to approximate the sine function, regardless of the degree .
D.Only features of an odd degree (e.g., ) will be useful, as the sine function is an odd function.
Correct Answer: According to Taylor's theorem, a sufficiently high-degree polynomial can approximate the sine function within a specific range, allowing the linear model to capture the non-linear relationship.
Explanation:
A linear model is linear in its coefficients. By creating polynomial features (), we are transforming the feature space. The model is still of the form , which is a linear combination of these new features. Taylor's theorem states that any sufficiently smooth function (like ) can be approximated by a polynomial (its Taylor series). Therefore, by providing the model with polynomial features, we enable it to learn the weights () that form the coefficients of a Taylor polynomial that approximates . This is a fundamental concept in using linear models for non-linear problems.
Incorrect! Try again.
53You are building a time-series model to predict sales for a store on a given day. You create a feature avg_sales_for_day_of_week by calculating the average sales for every Monday, every Tuesday, etc., using the entire dataset. You then use this feature to train a model and evaluate it on a held-out test set from the last 10% of the time-series. Why is this feature engineering approach likely to produce an overly optimistic performance estimate?
aggregation features
Hard
A.The feature introduces multicollinearity with other time-based features like the month of the year.
B.The feature does not account for seasonality and will therefore be inaccurate.
C.Aggregation over the day of the week is too coarse and will not be predictive.
D.This is a form of data leakage; the feature value for a training sample is derived using information from the future (including the test set).
Correct Answer: This is a form of data leakage; the feature value for a training sample is derived using information from the future (including the test set).
Explanation:
This is a classic example of temporal data leakage. When you calculate the average for all Mondays in the dataset, the value you assign to a Monday in the training set is influenced by the sales of Mondays that occur after it, including those in the test set. At the time of prediction for a given day, you would not have access to future data. The correct, non-leaky approach is to use an expanding window or a rolling window. For any given day d, the avg_sales_for_day_of_week should be calculated using only data from days befored.
Incorrect! Try again.
54You are given a dataset of grayscale images (e.g., MNIST). Which of the following pairs of techniques represents a valid and common hierarchical feature extraction pipeline for this type of data?
Feature extraction often involves a hierarchical process of creating increasingly abstract representations. For image data, a common pipeline is to first extract low-level features and then build higher-level features from them. Applying an edge detection filter like Sobel extracts basic information about gradients (edges). The Histogram of Oriented Gradients (HOG) then aggregates this gradient information into a more robust feature descriptor. This two-step process (low-level filter -> higher-level descriptor) is a classic computer vision feature extraction pipeline. The other options are either nonsensical (One-Hot Encoding pixels), redundant, or mix feature selection with extraction in an illogical order.
Incorrect! Try again.
55In the context of the curse of dimensionality, what is the 'concentration of norms' phenomenon and how does it affect machine learning algorithms?
Curse of dimensionality
Hard
A.All data points concentrate in the center of the feature space, making them indistinguishable.
B.Feature norms must be standardized (concentrated to a mean of 0 and variance of 1) for any algorithm to work in high dimensions.
C.The norm of the weight vector in linear models tends to concentrate to zero, a phenomenon known as regularization.
D.The L2 norm (Euclidean distance) of random vectors in high dimensions becomes tightly concentrated around its mean, making relative distances less meaningful.
Correct Answer: The L2 norm (Euclidean distance) of random vectors in high dimensions becomes tightly concentrated around its mean, making relative distances less meaningful.
Explanation:
The 'concentration of norms' (or 'distance concentration') is a counter-intuitive geometric phenomenon in high-dimensional spaces. It states that as dimensionality increases, the Euclidean distance between any two randomly chosen points becomes very similar. The distribution of distances becomes very narrow (i.e., concentrated around the mean distance). This is the same issue described in the k-NN question from a more formal perspective. It undermines distance-based algorithms like k-NN, clustering (e.g., k-means), and kernel methods that rely on the notion of proximity, because the contrast between the distances to 'near' and 'far' points diminishes significantly.
Incorrect! Try again.
56An impurity-based feature importance metric (like Gini Importance) from a tree-based model is known to be biased. Which of the following describes this bias most accurately?
tree-based feature importance
Hard
A.It is biased in favor of numerical features over categorical features, regardless of their cardinality.
B.It is biased in favor of high-cardinality features (both categorical and numerical with many unique values).
C.It is biased in favor of features that are highly correlated with the target variable.
D.It is biased against features that appear later in the feature list of the dataset.
Correct Answer: It is biased in favor of high-cardinality features (both categorical and numerical with many unique values).
Explanation:
Impurity-based measures are biased towards features with a high number of unique values (high cardinality). This is because such features offer more potential split points. With more potential splits to choose from, it's more likely that one of these splits will, by pure chance, reduce the impurity of the training data, even if the feature is not genuinely predictive. This can cause a high-cardinality feature (like a unique ID column, in the extreme case) to receive an inflated importance score. Permutation importance does not suffer from this particular bias.
Incorrect! Try again.
57You are using Backward Elimination on a dataset with 50 features to build a multiple linear regression model. You notice that the removal of a feature causes a very large change in the coefficients and p-values of several other features. What is this phenomenon indicative of?
backward elimination
Hard
A.The dataset is too small for a model with 50 features.
B.Feature has a strong non-linear relationship with the target.
C.There is strong multicollinearity between and the other features whose coefficients changed.
D.Feature is an outlier and its removal correctly stabilizes the model.
Correct Answer: There is strong multicollinearity between and the other features whose coefficients changed.
Explanation:
A key symptom of multicollinearity in linear models is coefficient instability. When two or more features are highly correlated, the model has difficulty attributing the effect on the target variable to any single one of them. The coefficient estimates become very sensitive to small changes in the data or model specification. Removing one of the collinear features () forces the model to re-attribute the explanatory power that shared with its correlated counterparts. This causes the coefficients and statistical significance of those other features to change dramatically.
Incorrect! Try again.
58Under which scenario would using Feature Selection (e.g., Forward Selection) be strongly preferred over Feature Extraction (e.g., PCA), even if PCA achieves slightly better predictive performance?
Dimensionality Reduction
Hard
A.When the features are on vastly different scales and standardization is not possible.
B.When the underlying relationship between features and target is known to be highly non-linear.
C.When the dataset has a very large number of features (p > 1000).
D.When the model's primary purpose is inference and the interpretability of individual features' effects is critical.
Correct Answer: When the model's primary purpose is inference and the interpretability of individual features' effects is critical.
Explanation:
This question addresses the core trade-off between selection and extraction. Feature selection methods (like forward selection, backward elimination, LASSO) select a subset of the original features. This means the final model is built on understandable, real-world variables (e.g., 'age', 'income'). This is crucial for inference, where the goal is to understand the relationship between predictors and the outcome. Feature extraction methods like PCA create new, synthetic features (principal components) that are linear combinations of all original features. While these components are optimal for capturing variance, they are generally not interpretable in terms of the original problem domain, making PCA unsuitable when interpretability is the priority.
Incorrect! Try again.
59You are performing correlation-based feature removal on a dataset with 3 features (A, B, C). You observe the following correlations: Corr(A, B) = 0.9, Corr(A, C) = 0.8, Corr(B, C) = 0.7. The algorithm iteratively removes the feature from the most correlated pair that has the lower average correlation with all other features. Which feature will be removed first?
correlation-based removal Feature Selection
Hard
A.Either A or B, the choice is arbitrary.
B.Feature B
C.Feature C
D.Feature A
Correct Answer: Feature C
Explanation:
This question requires careful step-by-step application of a specific (though plausible) heuristic. First
Incorrect! Try again.
60You have a dataset where feature A causally influences feature B, and both A and B causally influence the target Y. Consequently, A and B are highly correlated. A standard automated feature selection process flags the (A, B) pair for multicollinearity and removes B because Corr(B, Y) is slightly lower than Corr(A, Y). What is the primary risk of this action if the goal is model interpretability and understanding the system's mechanics?
correlation-based removal Feature Selection
Hard
A.This action is correct, as the direct effect of A on Y is the only relationship of interest.
B.The model's predictive accuracy will be significantly reduced because B contains unique information about Y not present in A.
C.The model may remain predictive, but it loses causal interpretability by removing a key mediating variable (B) in the pathway from A to Y.
D.There is no risk; removing the less correlated feature is the optimal way to handle multicollinearity.
Correct Answer: The model may remain predictive, but it loses causal interpretability by removing a key mediating variable (B) in the pathway from A to Y.
Explanation:
This scenario describes a causal mediation model (A -> B -> Y). While a model using only feature A might still be predictively powerful (as A's influence on Y is partly carried through B), it obscures the true underlying mechanism. Feature B acts as a mediator. By removing it, you can no longer analyze the direct effect of A on Y versus the indirect effect that goes through B. If the goal is to understand how the system works (inference and interpretability), removing a mediating variable is a significant error, even if it doesn't harm predictive accuracy.
Incorrect! Try again.
61You run Forward Selection on two different random 80% subsamples of your full dataset. You find that the two runs result in significantly different final sets of selected features. What is this phenomenon called, and what does it imply about your dataset?
forward selection
Hard
A.This is called overfitting, and it implies the model is too complex for the data.
B.This is called model instability, and it suggests that there are several near-optimal feature subsets and/or high multicollinearity.
C.This is called the 'curse of dimensionality', and it implies the feature space is too sparse.
D.This is called feature leakage, and it implies information from the test set was used in training.
Correct Answer: This is called model instability, and it suggests that there are several near-optimal feature subsets and/or high multicollinearity.
Explanation:
Stepwise methods like Forward Selection can be highly unstable. Small changes in the training data (like using a different subsample) can lead to large changes in the selected model (the set of chosen features). This instability is a major drawback of greedy selection procedures. It often occurs when there isn't a single, clear 'best' subset of predictors. Instead, there might be multiple, different subsets of features that achieve very similar performance, or when features are highly correlated, the algorithm might pick one feature in one run and its correlated counterpart in another run. This highlights the need for more robust selection methods like LASSO or using resampling techniques like bootstrapping to assess feature selection stability.
Incorrect! Try again.
62In a high-dimensional space (e.g., >1000 dimensions), you are using a k-Nearest Neighbors (k-NN) algorithm. Which of the following statements best describes the most critical impact of the curse of dimensionality on the algorithm's distance calculations?
Curse of dimensionality
Hard
A.The ratio of the distance to the nearest neighbor and the distance to the farthest neighbor approaches 1, making distance-based discrimination difficult.
B.The Euclidean distance between any two points converges to zero, making all points seem equidistant.
C.The Manhattan distance becomes a more reliable metric than Euclidean distance because it is less sensitive to outliers.
D.The computational cost of calculating distances becomes infinite, rendering the algorithm unusable.
Correct Answer: The ratio of the distance to the nearest neighbor and the distance to the farthest neighbor approaches 1, making distance-based discrimination difficult.
Explanation:
The curse of dimensionality causes the volume of the feature space to increase so rapidly that the data points become very sparse. A key consequence is that the distance to the nearest neighbor and the farthest neighbor for a given point become almost equal. If is the distance to the farthest point and is the distance to the nearest, the ratio approaches 0. This makes it extremely difficult for algorithms like k-NN to distinguish between neighbors and non-neighbors based on distance, severely degrading their performance.
Incorrect! Try again.
63You perform PCA on a dataset that has been standardized (mean 0, variance 1). You then create a new feature, , which is a perfect linear combination of two existing features, and (i.e., ). You add to the dataset and re-run PCA. What is the most likely effect on the eigenvalues of the new covariance matrix?
Principal Component Analysis
Hard
A.All eigenvalues will increase proportionally to the variance of the new feature.
B.A new eigenvalue of approximately zero will be introduced, and the other eigenvalues will remain unchanged.
C.At least one eigenvalue will become zero, and the largest eigenvalues corresponding to the variance in and may increase.
D.The number of non-zero eigenvalues will increase by one, corresponding to the new feature.
Correct Answer: At least one eigenvalue will become zero, and the largest eigenvalues corresponding to the variance in and may increase.
Explanation:
Adding a feature that is a perfect linear combination of others introduces perfect multicollinearity. This makes the new covariance matrix singular. A singular matrix has at least one eigenvalue equal to zero. The new feature doesn't add any new information (intrinsic dimensionality is unchanged), so the number of dimensions needed to capture the variance does not increase. The variance from the new feature will be absorbed into the existing principal components that already capture the variance from and , likely increasing the magnitude of the largest eigenvalues.
Incorrect! Try again.
64You are working on a 3-class classification problem with 50 features. You decide to use Linear Discriminant Analysis (LDA) for dimensionality reduction. What is the absolute maximum number of dimensions (discriminant components) you can reduce your data to using LDA, and why?
Linear Discriminant Analysis
Hard
A.2, because the number of components is limited by , which in this case is .
B.3, because the number of components is limited by , where is the number of classes.
C.49, because the number of components is limited by , where is the number of features.
D.50, because LDA can generate as many components as there are original features.
Correct Answer: 2, because the number of components is limited by , which in this case is .
Explanation:
The number of discriminant components that LDA can produce is limited by the rank of the between-class scatter matrix . The rank of is at most , where is the number of classes. It is also limited by the number of features, . Therefore, the maximum number of components is . In this case, with 50 features and 3 classes, the maximum number of components is .
Incorrect! Try again.
65Consider a scenario where the optimal feature subset for a regression model is {A, B, C}. However, feature A is only predictive in the presence of both B and C. Individually, A has zero correlation with the target. How would a standard Forward Selection procedure, using p-value or R-squared as the selection criterion, likely perform in this situation?
forward selection
Hard
A.It will fail to select feature A because its individual contribution will appear negligible at every step, thus getting stuck in a local optimum.
B.It will first add B and C, and then in the next step, it will recognize the interaction and add A.
C.Forward Selection is guaranteed to find the global optimum, so it will test all combinations including {A, B, C} and select it.
D.It will correctly identify {A, B, C} as it iteratively adds the most significant feature at each step.
Correct Answer: It will fail to select feature A because its individual contribution will appear negligible at every step, thus getting stuck in a local optimum.
Explanation:
Forward Selection is a greedy algorithm. At each step, it evaluates adding each of the remaining features to the current set of selected features. If feature A has no predictive power on its own, it will not be selected in the first step. Even if B and C are later selected, the greedy nature means it may have already missed the opportunity to see the interaction. Its 'myopic' view prevents it from seeing the benefit of combinations of features that are not individually strong, leading it to a suboptimal solution.
Incorrect! Try again.
66You are using a Random Forest model and notice two features, monthly_income and yearly_income, are highly correlated (). How would the default Gini Importance (Mean Decrease in Impurity) metric likely represent the importance of these two features compared to Permutation Importance?
tree-based feature importance
Hard
A.Gini Importance will assign high importance to both, while Permutation Importance will assign low importance to both.
B.Both methods will correctly identify that only one of the two features is needed and assign high importance to one and zero to the other.
C.Gini Importance may arbitrarily assign high importance to one and low to the other, while Permutation Importance is also likely to underestimate their collective importance.
D.Permutation Importance will be biased and show both as highly important, while Gini Importance will correctly split the importance between them.
Correct Answer: Gini Importance may arbitrarily assign high importance to one and low to the other, while Permutation Importance is also likely to underestimate their collective importance.
Explanation:
Gini Importance (MDI) is calculated during training. When two features are highly correlated, the model can use either for a split and achieve a similar impurity reduction. This can cause one feature to be chosen more frequently by chance, receiving a high importance score while the other gets a very low one. Permutation Importance, calculated post-training, measures the performance drop when a feature is shuffled. If monthly_income is shuffled but the correlated yearly_income is intact, the model can still use yearly_income to make good predictions. Thus, the performance drop (and thus importance) for monthly_income might be small, underestimating the true importance of the underlying 'income' concept.
Incorrect! Try again.
67In a feature selection process, you identify two features, F1 and F2, with a correlation of 0.9. You also find that Corr(F1, Target) = 0.6 and Corr(F2, Target) = 0.2. A common heuristic is to remove the feature with the lower correlation to the target (F2). What is a significant risk of automatically applying this heuristic without further investigation?
correlation-based removal Feature Selection
Hard
A.The removed feature, F2, might have a strong non-linear relationship with the target that is not captured by the Pearson correlation.
B.There is no risk; removing the feature with lower correlation to the target is always the optimal choice to reduce multicollinearity.
C.The high correlation between F1 and F2 is likely spurious and should be ignored.
D.F2, despite its low direct correlation, might capture unique variance or have a strong relationship with the target after controlling for F1 (i.e., high partial correlation).
Correct Answer: F2, despite its low direct correlation, might capture unique variance or have a strong relationship with the target after controlling for F1 (i.e., high partial correlation).
Explanation:
While F2 has a lower simple correlation with the target, this doesn't tell the whole story. It's possible that F1 is correlated with the target through the same mechanism as F2, but also through other mechanisms. F2 might contain unique information that is suppressed in the simple correlation analysis but would be valuable to a multivariate model like multiple regression. This is related to the concept of suppression effects. Automatically removing F2 based on the simple heuristic could lead to a loss of valuable, unique predictive information.
Incorrect! Try again.
68You are applying PCA to a dataset containing features with vastly different scales (e.g., age in years, income in dollars). You forget to scale the data before applying PCA. Which of the following outcomes is most likely?
Principal Component Analysis
Hard
A.The PCA algorithm will fail to converge because the covariance matrix will be ill-conditioned.
B.The first principal component will be dominated by the feature with the highest variance, effectively ignoring the information from other features.
C.The results will be identical to PCA on scaled data, as PCA is scale-invariant.
D.The principal components will align with the original feature axes, providing no dimensionality reduction.
Correct Answer: The first principal component will be dominated by the feature with the highest variance, effectively ignoring the information from other features.
Explanation:
PCA is a variance-maximizing procedure. If features have different scales, the feature with the largest range and variance (like income in dollars) will overwhelmingly dominate the calculation of the first principal component. The algorithm will find that the direction of maximum variance is almost perfectly aligned with the axis of that single feature. Consequently, the first PC will essentially be a proxy for the 'income' feature, and the contributions from features with smaller variance (like 'age') will be negligible. This is why standardizing the data (to have a mean of 0 and a standard deviation of 1) is a critical preprocessing step for PCA.
Incorrect! Try again.
69When comparing Backward Elimination with Forward Selection for a dataset with a large number of features (p > 100), which statement accurately describes a key trade-off, assuming the goal is to optimize a model's AIC (Akaike Information Criterion)?
backward elimination
Hard
A.Backward Elimination is less prone to missing important feature interactions because it starts with all features, but it is more computationally expensive.
B.Both methods are equivalent and will always arrive at the same final set of features, regardless of the starting point.
C.Forward Selection is guaranteed to find a better or equal AIC score because it builds the model from the ground up.
D.Backward Elimination is computationally cheaper because it performs fewer model fits than Forward Selection.
Correct Answer: Backward Elimination is less prone to missing important feature interactions because it starts with all features, but it is more computationally expensive.
Explanation:
Backward Elimination starts with the full model containing all p features. This allows it to see the combined effect and interactions of all features from the beginning. It then iteratively removes the least useful feature. Forward Selection starts with an empty model and adds features one by one, which can cause it to miss interactions that are only valuable when multiple specific features are present together. However, the starting point of Backward Elimination (fitting a model with all p features) can be extremely computationally expensive, or even impossible if p is very large or larger than the number of samples.
Incorrect! Try again.
70You apply a VarianceThreshold feature selector with threshold=0.1 to a dataset where all features have been scaled using MinMaxScaler (scaling each feature to a range of [0, 1]). What is the most significant potential issue with this approach?
variance threshold Feature Selection
Hard
A.This approach is invalid because VarianceThreshold should only be applied before any scaling.
B.The variance of a min-max scaled feature depends on the distribution of its data; features with values clustered at 0 and 1 will have high variance, while those clustered in the middle will have low variance, potentially leading to incorrect removals.
C.The threshold is too low and will not remove any features, as all variances will be close to 1.0.
D.The threshold of 0.1 is arbitrary and has no statistical justification, making the selection process unreliable.
Correct Answer: The variance of a min-max scaled feature depends on the distribution of its data; features with values clustered at 0 and 1 will have high variance, while those clustered in the middle will have low variance, potentially leading to incorrect removals.
Explanation:
After MinMaxScaler, all features are in the [0, 1] range, but their variances are not standardized. A feature whose values are bimodally distributed at the extremes (e.g., half the data is 0, half is 1) will have a high variance (around 0.25). A feature whose values are all clustered around 0.5 will have a very low variance. A uniform distribution on [0, 1] has a variance of 1/12 (approx 0.083). Therefore, applying a fixed variance threshold after min-max scaling can lead to the removal of features not because they are quasi-constant, but because their scaled distribution is concentrated in the middle of the range. This might incorrectly remove a genuinely useful feature.
Incorrect! Try again.
71You have a binary classification problem where the classes are not linearly separable but form two concentric circles in a 2D feature space. How would applying Linear Discriminant Analysis (LDA) for dimensionality reduction from 2D to 1D perform?
Linear Discriminant Analysis
Hard
A.LDA will overfit to the circular structure and create a highly non-linear decision boundary.
B.LDA will find the perfect 1D projection that separates the two circles, as it maximizes class separability.
C.LDA will fail to find a useful projection because the class means are identical (at the center of the circles), resulting in a between-class scatter of zero.
D.LDA will project the data onto a line that best separates the variance, similar to PCA.
Correct Answer: LDA will fail to find a useful projection because the class means are identical (at the center of the circles), resulting in a between-class scatter of zero.
Explanation:
LDA works by finding a projection that maximizes the ratio of between-class variance to within-class variance. The between-class variance is calculated based on the distance between the means of the classes. In the case of two concentric circles, the mean of the inner circle and the mean of the outer ring are both at the same point (the center). Therefore, the between-class scatter matrix () will be a zero matrix. LDA will be unable to find any direction that separates the class means, and the resulting projection will be useless for classification. This highlights a key limitation of LDA: it can only find linear separations.
Incorrect! Try again.
72After performing PCA on a 50-dimensional dataset, you plot the cumulative explained variance. The plot shows a smooth, almost linear increase, reaching 95% cumulative variance only after 45 components. There is no clear 'elbow' in the scree plot. What does this suggest about the original dataset?
explained variance ratio
Hard
A.The features in the original dataset are highly correlated and redundant.
B.The PCA implementation is flawed, as a clear elbow should always be present.
C.The variance is evenly distributed across many dimensions, suggesting that the features are largely uncorrelated and each contributes a small amount of unique information.
D.The dataset has a low intrinsic dimensionality, and most of the variance is captured by the first few components.
Correct Answer: The variance is evenly distributed across many dimensions, suggesting that the features are largely uncorrelated and each contributes a small amount of unique information.
Explanation:
A sharp elbow in the scree plot (or a rapid increase in cumulative variance that then plateaus) indicates that the first few principal components capture a large portion of the total variance, which happens when the original features are highly correlated. Conversely, a smooth, slow, linear-like increase in cumulative explained variance implies that each successive principal component adds only a small, roughly equal amount of variance. This occurs when the original features are largely uncorrelated (or orthogonal), and the total variance is spread out almost evenly across all dimensions. In such a case, dimensionality reduction with PCA is less effective, as many components are needed to retain most of the information.
Incorrect! Try again.
73You are building a linear regression model. The true underlying relationship between a feature and the target is . You decide to create polynomial features from (e.g., ). What is the theoretical implication of this choice for your linear model?
creating new features
Hard
A.Only features of an odd degree (e.g., ) will be useful, as the sine function is an odd function.
B.Using polynomial features will introduce perfect multicollinearity, making the model's coefficients uninterpretable and unstable.
C.According to Taylor's theorem, a sufficiently high-degree polynomial can approximate the sine function within a specific range, allowing the linear model to capture the non-linear relationship.
D.The model will remain linear and will not be able to approximate the sine function, regardless of the degree .
Correct Answer: According to Taylor's theorem, a sufficiently high-degree polynomial can approximate the sine function within a specific range, allowing the linear model to capture the non-linear relationship.
Explanation:
A linear model is linear in its coefficients. By creating polynomial features (), we are transforming the feature space. The model is still of the form , which is a linear combination of these new features. Taylor's theorem states that any sufficiently smooth function (like ) can be approximated by a polynomial (its Taylor series). Therefore, by providing the model with polynomial features, we enable it to learn the weights () that form the coefficients of a Taylor polynomial that approximates . This is a fundamental concept in using linear models for non-linear problems.
Incorrect! Try again.
74You are building a time-series model to predict sales for a store on a given day. You create a feature avg_sales_for_day_of_week by calculating the average sales for every Monday, every Tuesday, etc., using the entire dataset. You then use this feature to train a model and evaluate it on a held-out test set from the last 10% of the time-series. Why is this feature engineering approach likely to produce an overly optimistic performance estimate?
aggregation features
Hard
A.The feature introduces multicollinearity with other time-based features like the month of the year.
B.Aggregation over the day of the week is too coarse and will not be predictive.
C.This is a form of data leakage; the feature value for a training sample is derived using information from the future (including the test set).
D.The feature does not account for seasonality and will therefore be inaccurate.
Correct Answer: This is a form of data leakage; the feature value for a training sample is derived using information from the future (including the test set).
Explanation:
This is a classic example of temporal data leakage. When you calculate the average for all Mondays in the dataset, the value you assign to a Monday in the training set is influenced by the sales of Mondays that occur after it, including those in the test set. At the time of prediction for a given day, you would not have access to future data. The correct, non-leaky approach is to use an expanding window or a rolling window. For any given day d, the avg_sales_for_day_of_week should be calculated using only data from days befored.
Incorrect! Try again.
75You are given a dataset of grayscale images (e.g., MNIST). Which of the following pairs of techniques represents a valid and common hierarchical feature extraction pipeline for this type of data?
Feature extraction often involves a hierarchical process of creating increasingly abstract representations. For image data, a common pipeline is to first extract low-level features and then build higher-level features from them. Applying an edge detection filter like Sobel extracts basic information about gradients (edges). The Histogram of Oriented Gradients (HOG) then aggregates this gradient information into a more robust feature descriptor. This two-step process (low-level filter -> higher-level descriptor) is a classic computer vision feature extraction pipeline. The other options are either nonsensical (One-Hot Encoding pixels), redundant, or mix feature selection with extraction in an illogical order.
Incorrect! Try again.
76In the context of the curse of dimensionality, what is the 'concentration of norms' phenomenon and how does it affect machine learning algorithms?
Curse of dimensionality
Hard
A.All data points concentrate in the center of the feature space, making them indistinguishable.
B.The norm of the weight vector in linear models tends to concentrate to zero, a phenomenon known as regularization.
C.The L2 norm (Euclidean distance) of random vectors in high dimensions becomes tightly concentrated around its mean, making relative distances less meaningful.
D.Feature norms must be standardized (concentrated to a mean of 0 and variance of 1) for any algorithm to work in high dimensions.
Correct Answer: The L2 norm (Euclidean distance) of random vectors in high dimensions becomes tightly concentrated around its mean, making relative distances less meaningful.
Explanation:
The 'concentration of norms' (or 'distance concentration') is a counter-intuitive geometric phenomenon in high-dimensional spaces. It states that as dimensionality increases, the Euclidean distance between any two randomly chosen points becomes very similar. The distribution of distances becomes very narrow (i.e., concentrated around the mean distance). This is the same issue described in the k-NN question from a more formal perspective. It undermines distance-based algorithms like k-NN, clustering (e.g., k-means), and kernel methods that rely on the notion of proximity, because the contrast between the distances to 'near' and 'far' points diminishes significantly.
Incorrect! Try again.
77An impurity-based feature importance metric (like Gini Importance) from a tree-based model is known to be biased. Which of the following describes this bias most accurately?
tree-based feature importance
Hard
A.It is biased in favor of numerical features over categorical features, regardless of their cardinality.
B.It is biased in favor of features that are highly correlated with the target variable.
C.It is biased in favor of high-cardinality features (both categorical and numerical with many unique values).
D.It is biased against features that appear later in the feature list of the dataset.
Correct Answer: It is biased in favor of high-cardinality features (both categorical and numerical with many unique values).
Explanation:
Impurity-based measures are biased towards features with a high number of unique values (high cardinality). This is because such features offer more potential split points. With more potential splits to choose from, it's more likely that one of these splits will, by pure chance, reduce the impurity of the training data, even if the feature is not genuinely predictive. This can cause a high-cardinality feature (like a unique ID column, in the extreme case) to receive an inflated importance score. Permutation importance does not suffer from this particular bias.
Incorrect! Try again.
78You are using Backward Elimination on a dataset with 50 features to build a multiple linear regression model. You notice that the removal of a feature causes a very large change in the coefficients and p-values of several other features. What is this phenomenon indicative of?
backward elimination
Hard
A.There is strong multicollinearity between and the other features whose coefficients changed.
B.Feature has a strong non-linear relationship with the target.
C.Feature is an outlier and its removal correctly stabilizes the model.
D.The dataset is too small for a model with 50 features.
Correct Answer: There is strong multicollinearity between and the other features whose coefficients changed.
Explanation:
A key symptom of multicollinearity in linear models is coefficient instability. When two or more features are highly correlated, the model has difficulty attributing the effect on the target variable to any single one of them. The coefficient estimates become very sensitive to small changes in the data or model specification. Removing one of the collinear features () forces the model to re-attribute the explanatory power that shared with its correlated counterparts. This causes the coefficients and statistical significance of those other features to change dramatically.
Incorrect! Try again.
79Under which scenario would using Feature Selection (e.g., Forward Selection) be strongly preferred over Feature Extraction (e.g., PCA), even if PCA achieves slightly better predictive performance?
Dimensionality Reduction
Hard
A.When the model's primary purpose is inference and the interpretability of individual features' effects is critical.
B.When the underlying relationship between features and target is known to be highly non-linear.
C.When the dataset has a very large number of features (p > 1000).
D.When the features are on vastly different scales and standardization is not possible.
Correct Answer: When the model's primary purpose is inference and the interpretability of individual features' effects is critical.
Explanation:
This question addresses the core trade-off between selection and extraction. Feature selection methods (like forward selection, backward elimination, LASSO) select a subset of the original features. This means the final model is built on understandable, real-world variables (e.g., 'age', 'income'). This is crucial for inference, where the goal is to understand the relationship between predictors and the outcome. Feature extraction methods like PCA create new, synthetic features (principal components) that are linear combinations of all original features. While these components are optimal for capturing variance, they are generally not interpretable in terms of the original problem domain, making PCA unsuitable when interpretability is the priority.
Incorrect! Try again.
80You have a dataset where feature A causally influences feature B, and both A and B causally influence the target Y. Consequently, A and B are highly correlated. A standard automated feature selection process flags the (A, B) pair for multicollinearity and removes B because Corr(B, Y) is slightly lower than Corr(A, Y). What is the primary risk of this action if the goal is model interpretability and understanding the system's mechanics?
correlation-based removal Feature Selection
Hard
A.The model's predictive accuracy will be significantly reduced because B contains unique information about Y not present in A.
B.This action is correct, as the direct effect of A on Y is the only relationship of interest.
C.The model may remain predictive, but it loses causal interpretability by removing a key mediating variable (B) in the pathway from A to Y.
D.There is no risk; removing the less correlated feature is the optimal way to handle multicollinearity.
Correct Answer: The model may remain predictive, but it loses causal interpretability by removing a key mediating variable (B) in the pathway from A to Y.
Explanation:
This scenario describes a causal mediation model (A -> B -> Y). While a model using only feature A might still be predictively powerful (as A's influence on Y is partly carried through B), it obscures the true underlying mechanism. Feature B acts as a mediator. By removing it, you can no longer analyze the direct effect of A on Y versus the indirect effect that goes through B. If the goal is to understand how the system works (inference and interpretability), removing a mediating variable is a significant error, even if it doesn't harm predictive accuracy.
Incorrect! Try again.
81You run Forward Selection on two different random 80% subsamples of your full dataset. You find that the two runs result in significantly different final sets of selected features. What is this phenomenon called, and what does it imply about your dataset?
forward selection
Hard
A.This is called model instability, and it suggests that there are several near-optimal feature subsets and/or high multicollinearity.
B.This is called the 'curse of dimensionality', and it implies the feature space is too sparse.
C.This is called feature leakage, and it implies information from the test set was used in training.
D.This is called overfitting, and it implies the model is too complex for the data.
Correct Answer: This is called model instability, and it suggests that there are several near-optimal feature subsets and/or high multicollinearity.
Explanation:
Stepwise methods like Forward Selection can be highly unstable. Small changes in the training data (like using a different subsample) can lead to large changes in the selected model (the set of chosen features). This instability is a major drawback of greedy selection procedures. It often occurs when there isn't a single, clear 'best' subset of predictors. Instead, there might be multiple, different subsets of features that achieve very similar performance, or when features are highly correlated, the algorithm might pick one feature in one run and its correlated counterpart in another run. This highlights the need for more robust selection methods like LASSO or using resampling techniques like bootstrapping to assess feature selection stability.