




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. What is the primary measure of central tendency that minimizes the sum of absolute deviations in a dataset? A) Mean B) Median C) Mode D) Geometric mean Answer: B Explanation: The median minimizes the sum of absolute deviations, making it robust to outliers. Question 2. If a dataset has a variance of 25, what is its standard deviation? A) 5 B) 10 C) 25 D) 625 Answer: A Explanation: Standard deviation is the square root of variance; √25 = 5. Question 3. Which of the following techniques is best suited for detecting outliers in a univariate normal distribution? A) Z‑score > 2 B) Interquartile range (IQR) method C) Mahalanobis distance D) DBSCAN clustering Answer: B Explanation: The IQR method (1.5×IQR beyond Q1/Q3) is commonly used for univariate outlier detection.
Question 4. A histogram of a variable appears symmetric and bell‑shaped. Which distribution most likely describes the data? A) Uniform B) Exponential C) Normal D) Bimodal Answer: C Explanation: A symmetric bell‑shaped histogram indicates a normal distribution. Question 5. In a scatter plot, a strong upward linear trend suggests which correlation coefficient value? A) - 0. B) - 0. C) 0. D) 0. Answer: D Explanation: A strong positive linear relationship corresponds to a correlation near +1. Question 6. Which heatmap element directly visualizes the magnitude of pairwise Pearson correlations? A) Color intensity B) Cell size C) Border thickness D) Text labels only Answer: A Explanation: In a correlation heatmap, color intensity encodes the correlation magnitude.
Answer: C Explanation: K‑NN imputation replaces missing values with a weighted average of the k nearest observations. Question 10. When encoding a categorical variable with high cardinality (e.g., ZIP codes), which method reduces dimensionality while preserving ordinal information? A) One‑Hot Encoding B) Label Encoding C) Target Encoding D) Binary Encoding Answer: D Explanation: Binary encoding converts categories to binary digits, reducing dimensionality compared to one‑hot. Question 11. Which scaling technique transforms features to have zero mean and unit variance? A) Min‑Max Scaling B) Log Transformation C) Standardization (Z‑score) D) Robust Scaling Answer: C Explanation: Standardization subtracts the mean and divides by the standard deviation, yielding zero mean and unit variance. Question 12. In filter‑based feature selection, which statistic is commonly used to rank features for a binary classification problem? A) Mutual Information B) Coefficient of Determination (R²)
C) Silhouette Score D) Gini Importance Answer: A Explanation: Mutual information measures the dependency between a feature and the target, useful for filter selection. Question 13. Which wrapper method evaluates subsets of features by training a model repeatedly? A) Recursive Feature Elimination (RFE) B) Pearson Correlation Filter C) L1 Regularization D) Principal Component Analysis Answer: A Explanation: RFE repeatedly fits a model and removes the least important features, embodying the wrapper approach. Question 14. Which embedded technique performs feature selection as part of model training by penalizing coefficients? A) Forward Selection B) Lasso (L1) Regression C) Chi‑Square Test D) Random Forest Importance Answer: B Explanation: Lasso adds an L1 penalty, shrinking some coefficients to zero, thereby selecting features during training. Question 15. In simple linear regression, what does the slope coefficient represent?
Question 18. In decision‑tree regression, which impurity measure is commonly used to select splits? A) Gini impurity B) Entropy C) Mean Squared Error (MSE) D) Information Gain Ratio Answer: C Explanation: Regression trees use reduction in variance or MSE to choose the best split. Question 19. Random Forest reduces overfitting compared to a single decision tree primarily because it: A) Uses deeper trees B) Prunes branches aggressively C) Averages predictions over many decorrelated trees D) Applies L1 regularization on leaf nodes Answer: C Explanation: Bagging many trees trained on bootstrapped samples and random feature subsets decorrelates them, lowering variance. Question 20. The cost function for logistic regression is based on: A) Mean Squared Error B) Hinge loss C) Cross‑entropy (log loss) D) Absolute deviation Answer: C Explanation: Logistic regression minimizes the binary cross‑entropy between predicted probabilities and true labels.
Question 21. Which of the following activation functions is most appropriate for the output layer of a binary classifier? A) ReLU B) Sigmoid C) Tanh D) Softmax Answer: B Explanation: Sigmoid maps any real‑valued input to (0,1), suitable for binary probability output. Question 22. In K‑Nearest Neighbors classification, how does increasing the value of K generally affect model bias and variance? A) Increases bias, decreases variance B) Decreases bias, increases variance C) Increases both bias and variance D) Decreases both bias and variance Answer: A Explanation: Larger K smooths decision boundaries (higher bias) but makes predictions less sensitive to noise (lower variance). Question 23. Which kernel function allows an SVM to create non‑linear decision boundaries while operating in the original feature space? A) Linear kernel B) Polynomial kernel C) Radial Basis Function (RBF) kernel D) Sigmoid kernel Answer: C
Answer: A Explanation: Plotting within‑cluster sum of squares vs. k shows an “elbow” where adding more clusters yields diminishing returns, indicating a suitable k. Question 27. Which distance metric is most appropriate for clustering binary presence/absence data? A) Euclidean distance B) Manhattan distance C) Jaccard distance D) Cosine similarity Answer: C Explanation: Jaccard distance measures dissimilarity based on shared presence, suitable for binary vectors. Question 28. Hierarchical clustering that merges clusters based on the maximum distance between any two points in different clusters is known as: A) Single linkage B) Complete linkage C) Average linkage D) Ward’s method Answer: B Explanation: Complete linkage uses the farthest pairwise distance to define inter‑cluster similarity. Question 29. The Apriori algorithm relies on which principle to prune candidate itemsets? A) Downward closure (anti‑monotonicity) B) Upper bound pruning
C) Gradient descent D) Support vector maximization Answer: A Explanation: If an itemset is infrequent, all its supersets are also infrequent; this anti‑monotone property allows pruning. Question 30. In anomaly detection using isolation forests, anomalies are identified because they: A) Have high reconstruction error B) Are isolated with fewer splits C) Possess high density in feature space D) Exhibit large Mahalanobis distance Answer: B Explanation: Isolation forests randomly partition data; anomalies tend to be isolated early, requiring fewer splits. Question 31. Which regression evaluation metric is most sensitive to large errors? A) Mean Absolute Error (MAE) B) Median Absolute Error C) Root Mean Squared Error (RMSE) D) R² Score Answer: C Explanation: RMSE squares residuals, amplifying the impact of larger errors. Question 32. The coefficient of determination (R²) can be negative when: A) Model predicts perfectly B) Model is worse than predicting the mean of the target
A) Bagging B) Boosting C) Stacking D) Random Subspace Answer: B Explanation: Boosting iteratively adds weak learners that emphasize previously misclassified instances. Question 36. XGBoost differs from traditional gradient boosting primarily because it: A) Uses decision stumps only B) Implements regularization and parallel tree construction C) Requires only categorical features D) Optimizes hinge loss exclusively Answer: B Explanation: XGBoost adds L1/L2 regularization, handles missing values, and builds trees in parallel, improving speed and accuracy. Question 37. In hyperparameter tuning, which search strategy evaluates a predefined number of random configurations rather than all possible combinations? A) Grid Search B) Random Search C) Bayesian Optimization D) Exhaustive Search Answer: B Explanation: Random Search samples hyperparameter space randomly, often more efficient than exhaustive grid search.
Question 38. When performing k‑fold cross‑validation with k=5, what proportion of data is used for training in each fold? A) 20 % B) 40 % C) 60 % D) 80 % Answer: D Explanation: In 5‑fold CV, each fold holds out 1/5 = 20 % for validation, leaving 80 % for training. Question 39. Which metric is most appropriate for evaluating a regression model on a dataset with many outliers? A) R² B) MAE C) RMSE D) Adjusted R² Answer: B Explanation: MAE uses absolute errors, reducing the influence of extreme outliers compared to RMSE. Question 40. A model that performs significantly better on training data than on validation data is likely suffering from: A) Underfitting B) Overfitting C) Data leakage D) High bias Answer: B
D) Both models have identical F1‑Scores. Answer: C Explanation: Precision emphasizes false positives, recall emphasizes false negatives; the preferred model depends on business context. Question 44. In a decision tree, what does a node depth of 0 represent? A) Leaf node B) Root node C) First split node D) Pruned node Answer: B Explanation: Depth 0 is the root of the tree, from which all splits originate. Question 45. Which of the following is NOT a valid method for encoding an ordinal categorical variable? A) Label Encoding preserving order B) One‑Hot Encoding C) Target Encoding with monotonic mapping D) Binary Encoding preserving order Answer: B Explanation: One‑Hot Encoding treats categories as nominal, discarding ordinal information. Question 46. If two features have a Pearson correlation coefficient of 0.98, what is a likely consequence of including both in a linear regression model? A) Improved interpretability B) Reduced multicollinearity C) Inflated variance of coefficient estimates
D) Increased model bias Answer: C Explanation: High correlation leads to multicollinearity, causing unstable coefficient estimates and large standard errors. Question 47. Which regularization technique adds a penalty equal to the absolute value of coefficients? A) L1 (Lasso) B) L2 (Ridge) C) Elastic Net D) Dropout Answer: A Explanation: L1 regularization (Lasso) penalizes the sum of absolute coefficient values, encouraging sparsity. Question 48. In a confusion matrix, the term “True Negative” refers to: A) Correctly predicted positive class B) Incorrectly predicted positive class C) Correctly predicted negative class D) Incorrectly predicted negative class Answer: C Explanation: True Negative is when the actual class is negative and the model predicts negative. Question 49. Which metric is most appropriate for evaluating a highly imbalanced binary classification problem where the minority class is critical? A) Accuracy B) Precision
C) The final production model after tuning D) A model trained on the full dataset without validation Answer: B Explanation: A baseline provides a reference point (e.g., predicting the mean) to assess whether more sophisticated models add value. Question 53. Which of the following is an advantage of using a Random Forest over a single Decision Tree? A) Faster training time B) Better interpretability C) Lower variance and higher accuracy D) Ability to handle only categorical data Answer: C Explanation: Random Forest aggregates many trees, reducing variance and typically improving predictive performance. Question 54. When performing stratified k‑fold cross‑validation for a binary classification problem, what is preserved across folds? A) Exact same samples in each fold B) Proportion of each class C) Order of instances D) Feature scaling parameters Answer: B Explanation: Stratification ensures each fold maintains the same class distribution as the whole dataset. Question 55. Which loss function is minimized by the median of a distribution?
A) Squared loss B) Absolute loss C) Huber loss D) Log‑loss Answer: B Explanation: The median minimizes the sum of absolute deviations (L1 loss). Question 56. In a support vector machine, the parameter C controls: A) Kernel width B) Margin width vs. misclassification trade‑off C) Number of support vectors D) Learning rate Answer: B Explanation: C balances the desire for a large margin (low complexity) against the penalty for misclassifying training points. Question 57. Which clustering algorithm can produce clusters of arbitrary shape and is based on density? A) K‑Means B) Hierarchical Agglomerative C) DBSCAN D) Gaussian Mixture Models Answer: C Explanation: DBSCAN groups points that are densely connected, allowing non‑convex cluster shapes.