Machine Learning Fundamentals Assessment — Questions and Answers
Question 1: What is the elbow method used for in clustering?
- Evaluating silhouette scores across different algorithms
- Identifying outliers before clustering
- Selecting the optimal learning rate for k-means
- Determining the optimal number of clusters by identifying where inertia reduction slows (Correct answer)
Correct answer: Determining the optimal number of clusters by identifying where inertia reduction slows
The elbow method plots within-cluster inertia against the number of clusters (k) and looks for a kink where adding more clusters yields diminishing returns.
Question 2: Which approach is recommended for troubleshooting feature engineering issues?
- Rely solely on past experience
- Use systematic isolation and testing methods (Correct answer)
- Wait for the problem to resolve itself
- Replace all components simultaneously
Correct answer: Use systematic isolation and testing methods
Systematic isolation and testing methodically narrows down the root cause, making troubleshooting efficient and accurate.
Question 3: What is the purpose of the Variance Inflation Factor (VIF) in regression?
- Test for heteroscedasticity
- Detect multicollinearity among predictors (Correct answer)
- Measure prediction error
- Evaluate model fit
Correct answer: Detect multicollinearity among predictors
VIF quantifies how much the variance of a coefficient is inflated due to linear correlation with other predictors; VIF > 10 is concerning.
Question 4: In Machine Learning practice, reliability in assessment refers to:
- The consistency and reproducibility of results (Correct answer)
- The speed of administration
- The cost of the assessment tool
- The popularity of the instrument
Correct answer: The consistency and reproducibility of results
Reliability refers to the consistency and reproducibility of assessment results when the test is repeated under similar conditions.
Question 5: What is a key characteristic of Naive Bayes classifiers that makes them 'naive'?
- They ignore the training labels
- They only work with binary classification
- They require no hyperparameter tuning
- They assume all features are conditionally independent given the class (Correct answer)
Correct answer: They assume all features are conditionally independent given the class
Naive Bayes assumes conditional independence between features given the class label, which simplifies computation but rarely holds in practice.
Question 6: What distinguishes Lasso regression from Ridge regression in terms of feature selection?
- Lasso minimizes MSE; Ridge minimizes MAE
- Lasso uses L2 penalty; Ridge uses L1
- Lasso requires standardization; Ridge does not
- Lasso can shrink coefficients exactly to zero; Ridge cannot (Correct answer)
Correct answer: Lasso can shrink coefficients exactly to zero; Ridge cannot
Lasso's L1 penalty produces sparse solutions by setting some coefficients exactly to zero, effectively performing feature selection.
Question 7: What does 'fine-tuning' mean when adapting a pretrained deep learning model?
- Pruning unnecessary neurons from the model
- Quantizing the model weights for deployment
- Continuing to train some or all layers of a pretrained model on a new task (Correct answer)
- Training the model from scratch on a new dataset
Correct answer: Continuing to train some or all layers of a pretrained model on a new task
Fine-tuning updates the pretrained weights on new task data, often with a small learning rate, to adapt learned representations without losing general knowledge.
Question 8: What is the main risk of applying target encoding without regularization?
- Increased dimensionality
- Target leakage causing data leakage (Correct answer)
- Underfitting due to information loss
- Loss of feature interpretability
Correct answer: Target leakage causing data leakage
Without regularization or cross-fitting, target encoding can leak target information into the training features, causing overfitting.
Question 9: What does a high AUC-ROC score (close to 1.0) indicate about a classification model?
- The model has low training accuracy
- The model is severely overfitting
- The model requires more training data
- The model perfectly separates the positive and negative classes (Correct answer)
Correct answer: The model perfectly separates the positive and negative classes
An AUC-ROC near 1.0 means the model ranks positive instances higher than negative ones across all thresholds, indicating excellent discriminative ability.
Question 10: What problem does beam search solve in sequence generation?
- It approximates the most probable output sequence by maintaining top-k candidates (Correct answer)
- It prevents overfitting during training
- It handles padding in batched inputs
- It speeds up tokenization
Correct answer: It approximates the most probable output sequence by maintaining top-k candidates
Beam search keeps the top-k (beam width) partial sequences at each step, balancing quality and computational cost versus greedy decoding.
Question 11: What does the term 'perplexity' measure in language model evaluation?
- The number of parameters in the model
- The diversity of the training vocabulary
- The speed of token generation
- How well a probability model predicts a sample (Correct answer)
Correct answer: How well a probability model predicts a sample
Perplexity measures how well a language model predicts a held-out text — lower perplexity indicates a better-fitting model.
Question 12: What is 'data leakage' in the context of model evaluation?
- Model weights being exposed publicly
- Overfitting to the validation set
- Training data accidentally deleted
- Test set information influencing the training process (Correct answer)
Correct answer: Test set information influencing the training process
Data leakage occurs when information from the test/future data leaks into training, causing overly optimistic evaluation metrics.
Question 13: If a model achieves AUC-ROC of 0.5, what does this indicate?
- Perfect classification
- Better than random guessing
- The model always predicts the negative class
- Performance equivalent to random guessing (Correct answer)
Correct answer: Performance equivalent to random guessing
An AUC of 0.5 means the model has no discriminative ability and performs no better than random chance.
Question 14: What is the primary consideration when implementing changes to neural networks?
- Speed of implementation
- Impact assessment and change management (Correct answer)
- Vendor preference
- Personal convenience
Correct answer: Impact assessment and change management
Impact assessment and proper change management ensure that modifications do not introduce unexpected problems or service disruptions.
Question 15: Which decision tree splitting criterion measures the average uncertainty weighted by each subset's size?
- Gain Ratio
- Gini Impurity (Correct answer)
- Entropy
- Information Gain
Correct answer: Gini Impurity
Gini impurity measures how often a randomly chosen element would be misclassified; weighted average across children is minimized at each split in CART.
Question 16: When comparing two models using cross-validation scores, which statistical test is commonly used?
- Paired t-test (Correct answer)
- Z-test for proportions
- Chi-squared test
- ANOVA
Correct answer: Paired t-test
A paired t-test compares cross-validation scores from the same folds across two models, accounting for the paired nature of the data.
Question 17: Which statement about the K-Medoids algorithm is correct compared to K-Means?
- K-Medoids is faster than K-Means on large datasets
- K-Medoids minimizes the sum of squared distances
- K-Medoids cannot handle outliers
- K-Medoids centroids must be actual data points (Correct answer)
Correct answer: K-Medoids centroids must be actual data points
In K-Medoids, the representative of each cluster (medoid) must be an actual data point, making it more robust to outliers than K-Means.
Question 18: Which assumption of linear regression states that residuals should not be correlated with each other?
- Multicollinearity
- Normality of residuals
- Homoscedasticity
- Independence of errors (Correct answer)
Correct answer: Independence of errors
The independence of errors assumption requires that residuals are uncorrelated — violation often occurs in time-series data.
Question 19: What is the 'bias-variance trade-off' in model evaluation?
- The trade-off between precision and recall
- The tension between underfitting (high bias) and overfitting (high variance) (Correct answer)
- The balance between training speed and model accuracy
- The balance between model complexity and interpretability
Correct answer: The tension between underfitting (high bias) and overfitting (high variance)
High bias leads to underfitting while high variance leads to overfitting; the trade-off is finding the model complexity that minimizes both.
Question 20: What is the curse of dimensionality?
- The phenomenon where high-dimensional spaces make data sparse, degrading distance-based algorithms (Correct answer)
- The inability of models to learn from more than 100 features
- The exponential growth of model parameters with depth
- The computational cost of training on large datasets
Correct answer: The phenomenon where high-dimensional spaces make data sparse, degrading distance-based algorithms
As dimensionality increases, data becomes increasingly sparse and distances between points become less meaningful, causing many ML algorithms to degrade in performance.
Question 21: In a Support Vector Machine, what is the 'margin'?
- The misclassification rate on training data
- The number of support vectors divided by total samples
- The regularization penalty applied to the weight vector
- The distance between the decision boundary and the nearest data points from each class (Correct answer)
Correct answer: The distance between the decision boundary and the nearest data points from each class
The margin is the distance between the hyperplane and the closest data points (support vectors) from each class; SVM maximizes this margin.
Question 22: Which professional attribute is most valued in classification within the Machine Learning field?
- Prioritizing personal convenience
- Working in isolation
- Accountability and commitment to standards (Correct answer)
- Avoiding challenging situations
Correct answer: Accountability and commitment to standards
Accountability and commitment to professional standards build trust and ensure consistent, high-quality practice.
Question 23: A classifier achieves 98% accuracy on a dataset where 98% of samples belong to class A. What problem does this illustrate?
- Underfitting due to insufficient model complexity
- Overfitting to the minority class
- Data leakage from test set to training set
- The accuracy paradox with imbalanced data (Correct answer)
Correct answer: The accuracy paradox with imbalanced data
A trivial classifier predicting only class A achieves 98% accuracy, demonstrating that accuracy is misleading when class distributions are severely imbalanced.
Question 24: Which initialization strategy for K-Means selects initial centroids that are spread far apart to improve convergence?
- K-Means++ (Correct answer)
- Random initialization
- PCA-based initialization
- Forgy method
Correct answer: K-Means++
K-Means++ probabilistically selects each subsequent centroid farther from already-chosen ones, reducing the chance of poor local optima.
Question 25: In k-fold cross-validation with k=5, what percentage of data is used for training in each fold?
- 95%
- 20%
- 50%
- 80% (Correct answer)
Correct answer: 80%
With k=5, the data is split into 5 folds; each iteration uses 4 folds (80%) for training and 1 fold (20%) for validation.
Question 26: What is the primary advantage of using an ensemble method like Random Forest over a single decision tree?
- Faster training time
- Simpler model interpretation
- Lower variance through averaging multiple trees (Correct answer)
- Reduced memory usage
Correct answer: Lower variance through averaging multiple trees
Random Forest reduces variance by averaging predictions from many decorrelated trees built on random subsets of features and data.
Question 27: What is a skip connection (residual connection) in deep learning?
- A connection that skips the activation function
- A shortcut path that adds a layer's input directly to its output (Correct answer)
- A dropout mask applied across multiple layers
- A connection that skips regularization
Correct answer: A shortcut path that adds a layer's input directly to its output
Skip connections allow gradients to flow directly through the network, enabling training of very deep networks by alleviating the vanishing gradient problem.
Question 28: Which of the following scenarios will K-means clustering fail to produce satisfactory results? 1) Outliers in the data 2) Data points of various densities 3) Nonconvex data points
- 2 and 3
- 1, 2, and 3 (Correct answer)
- 1 and 2
- 1 and 3
Correct answer: 1, 2, and 3
Explanations: <br> K-means clustering algorithm fails to give good results when the data contains outliers, the density spread of data points across the data space is different, and the data points follow nonconvex shapes.
Question 29: In Named Entity Recognition (NER), which tagging scheme uses B-, I-, and O- prefixes?
- SentencePiece tagging
- BIO tagging (Correct answer)
- Unigram tagging
- BPE tagging
Correct answer: BIO tagging
BIO tagging marks the Beginning of an entity, the Inside (continuation) of an entity, and Outside tokens that are not part of any entity.
Question 30: What is a Variational Autoencoder (VAE) primarily used for compared to a standard autoencoder?
- Generating new samples by learning a smooth latent space distribution (Correct answer)
- More efficient data compression
- Faster training convergence
- Better anomaly detection accuracy
Correct answer: Generating new samples by learning a smooth latent space distribution
VAEs impose a probabilistic distribution (typically Gaussian) on the latent space, enabling generation of new, realistic samples by sampling from that distribution.
Question 31: What is transfer learning in the context of deep neural networks?
- Converting a model from one framework to another
- Transferring data between training and validation sets
- Moving a trained model from GPU to CPU
- Reusing a pretrained model's learned features as a starting point for a new task (Correct answer)
Correct answer: Reusing a pretrained model's learned features as a starting point for a new task
Transfer learning leverages features learned on large datasets (e.g., ImageNet) and fine-tunes the model on a smaller target dataset, saving time and data.
Question 32: Which imputation strategy is most appropriate for a feature with a heavy right-skewed distribution?
- Median imputation (Correct answer)
- Mean imputation
- Zero imputation
- Mode imputation
Correct answer: Median imputation
The median is robust to outliers and skew, making it more representative than the mean for skewed distributions.
Question 33: What does the term 'dead neuron' refer to when using ReLU activations?
- A neuron that always outputs zero because its weights push its input permanently negative (Correct answer)
- A neuron removed by the dropout process
- A neuron whose weights have not been initialized
- A neuron that outputs the same value regardless of input
Correct answer: A neuron that always outputs zero because its weights push its input permanently negative
A dead ReLU neuron receives only negative inputs, always outputting zero with zero gradient, meaning it can never recover during training.
Question 34: Which loss function is typically used for training a binary classification model with logistic regression?
- Mean Squared Error
- Binary Cross-Entropy (Correct answer)
- Huber Loss
- Hinge Loss
Correct answer: Binary Cross-Entropy
Binary cross-entropy (log loss) measures the divergence between predicted probabilities and true binary labels, making it ideal for logistic regression.
Question 35: In time-series feature engineering, what does a 'lag feature' represent?
- The rate of change between consecutive observations
- The value of a variable at a previous time step (Correct answer)
- The moving average of the series
- The Fourier transform of the signal
Correct answer: The value of a variable at a previous time step
A lag feature captures the value of the target or a predictor at an earlier time point, allowing models to learn temporal dependencies.
Question 36: What is the Matthews Correlation Coefficient (MCC) particularly useful for?
- Comparing models across different domains
- Regression tasks with outliers
- Measuring clustering quality
- Evaluating classifiers on imbalanced datasets (Correct answer)
Correct answer: Evaluating classifiers on imbalanced datasets
MCC accounts for all four cells of the confusion matrix and provides a balanced measure even when classes are severely imbalanced.
Question 37: What is the role of the minPts parameter in DBSCAN?
- It controls the learning rate
- It sets the distance threshold for merging
- It defines the minimum number of points required to form a dense region (Correct answer)
- It sets the maximum number of clusters
Correct answer: It defines the minimum number of points required to form a dense region
A point is a core point in DBSCAN if at least minPts points (including itself) fall within its epsilon-radius neighborhood.
Question 38: Which of the following is NOT a hyperparameter of a Random Forest model?
- Learned feature weights of the trees (Correct answer)
- Number of trees in the forest
- Number of features considered at each split
- Maximum depth of each tree
Correct answer: Learned feature weights of the trees
Learned feature weights are parameters determined by the training process, not hyperparameters set before training.
Question 39: What is 'recursive feature elimination' (RFE)?
- Removing features with zero variance iteratively
- Projecting features onto principal components recursively
- Selecting features based on correlation with the target
- Training a model and repeatedly removing the least important features until a target count is reached (Correct answer)
Correct answer: Training a model and repeatedly removing the least important features until a target count is reached
RFE fits a model, ranks features by importance, removes the weakest feature(s), and repeats until the desired number of features remains.
Question 40: What is a policy in reinforcement learning?
- The transition probabilities between environment states
- A mapping from states to actions (or action probabilities) that defines agent behavior (Correct answer)
- The reward function provided by the environment
- The maximum total reward achievable in an episode
Correct answer: A mapping from states to actions (or action probabilities) that defines agent behavior
A policy defines the agent's behavior by mapping states to actions or probabilities of actions, determining what the agent does in each situation.
Question 41: In the context of NLP, what is a 'zero-shot' setting?
- The model is trained on zero examples and evaluated randomly
- The model is trained with a learning rate of zero
- The model uses zero attention heads
- The model solves a task at inference time without any task-specific training examples (Correct answer)
Correct answer: The model solves a task at inference time without any task-specific training examples
Zero-shot evaluation tests a model's ability to perform a new task using only a natural language description, without any labeled examples for that specific task.
Question 42: Which scenario best describes overfitting in a neural network?
- Gradients are near zero throughout training
- Training loss is low but validation loss is much higher (Correct answer)
- Training loss is high and validation loss is high
- Training loss decreases while validation loss also decreases steadily
Correct answer: Training loss is low but validation loss is much higher
Overfitting occurs when the model memorizes training data, leading to low training loss but poor generalization on unseen validation data.
Question 43: Which technique helps mitigate catastrophic forgetting when fine-tuning large language models on new tasks?
- Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA (Correct answer)
- Removing dropout during training
- Increasing the learning rate
- Using a larger batch size
Correct answer: Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA
PEFT methods like LoRA freeze most pre-trained weights and add small trainable adapter modules, preserving general knowledge while learning new tasks efficiently.
Question 44: Which optimizer adapts the learning rate for each parameter based on past gradients and is commonly used in training transformers?
- Adam (Correct answer)
- RMSProp
- SGD with momentum
- Adagrad
Correct answer: Adam
Adam combines momentum and RMSProp, maintaining adaptive per-parameter learning rates using first and second moment estimates of gradients.
Question 45: What is the purpose of a skip connection (residual connection) in ResNets?
- To allow gradients and inputs to bypass layers, easing training of very deep networks (Correct answer)
- To randomly deactivate entire layers during training
- To connect the first layer directly to the output layer
- To skip certain training examples deemed too easy
Correct answer: To allow gradients and inputs to bypass layers, easing training of very deep networks
Skip connections add the input of a block directly to its output, providing gradient shortcuts that alleviate vanishing gradients in very deep networks.
Question 46: What is 'feature scaling' and why is it important for algorithms like SVMs and k-NN?
- Selecting the most important features; reduces computation
- Adding polynomial features to increase model complexity
- Removing outliers from the training set
- Normalizing feature ranges so no single feature dominates distance calculations (Correct answer)
Correct answer: Normalizing feature ranges so no single feature dominates distance calculations
Feature scaling (e.g., standardization or min-max normalization) ensures all features contribute equally to distance-based calculations, which is critical for SVMs and k-NN.
Question 47: Which of the following best describes 'feature learning' in unsupervised learning?
- Automatically discovering useful representations from raw data without labels (Correct answer)
- Selecting the most important supervised features
- Engineering handcrafted features from domain knowledge
- Removing correlated features before classification
Correct answer: Automatically discovering useful representations from raw data without labels
Feature learning (representation learning) involves algorithms like autoencoders and deep belief networks that discover compact, meaningful representations from unlabeled data.
Question 48: Which of the following correctly describes a negative R² value?
- The model explains negative variance, which is impossible
- The model has negative prediction error
- R² can never be negative
- The model performs worse than a horizontal mean line (Correct answer)
Correct answer: The model performs worse than a horizontal mean line
Negative R² occurs when the model fits the data worse than simply predicting the mean of the target variable.
Question 49: In Machine Learning practice, what is the primary benefit of using multiple assessment methods?
- It is required by law in all cases
- It fills more class time
- It provides a more complete picture of student understanding (Correct answer)
- It eliminates the need for grading
Correct answer: It provides a more complete picture of student understanding
Using multiple assessment methods captures different aspects of student understanding and reduces the limitations of any single measure.
Question 50: In the context of neural networks, what is backpropagation?
- The process of feeding input data forward through the network
- A technique for initializing network weights
- The algorithm that computes gradients of the loss with respect to each weight by applying the chain rule backward through the network (Correct answer)
- The method for selecting the optimal learning rate
Correct answer: The algorithm that computes gradients of the loss with respect to each weight by applying the chain rule backward through the network
Backpropagation efficiently computes gradients for all weights by applying the chain rule of calculus backward from the output loss to each layer's parameters.
Question 51: What does mean Average Precision (mAP) measure in object detection evaluation?
- Average localization error of bounding box predictions
- The mean inference speed across different model sizes
- Average pixel accuracy across all semantic classes
- The average of per-class Average Precision scores across multiple IoU thresholds and classes (Correct answer)
Correct answer: The average of per-class Average Precision scores across multiple IoU thresholds and classes
mAP aggregates the area under the precision-recall curve for each class and averages across all classes and IoU thresholds, providing a comprehensive detection metric.
Question 52: What problem does ICA (Independent Component Analysis) solve that PCA does not?
- Reducing dimensionality while maximizing variance
- Separating statistically independent non-Gaussian source signals (Correct answer)
- Finding the optimal number of clusters
- Removing correlated features
Correct answer: Separating statistically independent non-Gaussian source signals
ICA finds a decomposition into statistically independent components, making it suitable for blind source separation tasks like separating audio signals.
Question 53: We set the gradient to zero to obtain the minimum or maximum of a function because:
- Depends on the type of problem
- A and B
- The value of the gradient at extrema of a function is always zero (Correct answer)
- None of these
Correct answer: The value of the gradient at extrema of a function is always zero
Explanation: <br> The gradient of a multivariable function at a maximum point will be the zero vector of the function, which is the single greatest value that the function can achieve.
Question 54: Which of the following best describes 'feature importance' from a Random Forest model?
- The correlation coefficient of a feature with the target variable
- The average reduction in impurity (e.g., Gini) across all trees when a feature is used to split (Correct answer)
- The p-value of a feature in a linear regression
- The number of times a feature appears in the training data
Correct answer: The average reduction in impurity (e.g., Gini) across all trees when a feature is used to split
Random Forest feature importance measures how much each feature decreases weighted impurity across all splits in all trees, averaged over the ensemble.
Question 55: What does the 'bias' term represent in the bias-variance tradeoff?
- The mean of the training labels
- Sensitivity to small fluctuations in training data
- Noise in the test dataset
- Error due to overly simplistic model assumptions (Correct answer)
Correct answer: Error due to overly simplistic model assumptions
Bias reflects error introduced by assuming a model form that is too simple to capture the true underlying relationship in the data.
Question 56: What problem does an LSTM network solve compared to a vanilla RNN?
- It replaces activation functions with attention layers
- It removes the need for backpropagation
- It handles longer-term dependencies by using gating mechanisms (Correct answer)
- It speeds up training with batch normalization
Correct answer: It handles longer-term dependencies by using gating mechanisms
LSTM's cell state and gates (input, forget, output) allow it to retain or discard information over long sequences, mitigating the vanishing gradient problem in RNNs.
Question 57: In support vector regression (SVR), what does the ε (epsilon) parameter control?
- The kernel bandwidth for non-linear mappings
- The regularization strength of the model
- The width of the tube within which errors are ignored (Correct answer)
- The learning rate of the optimization
Correct answer: The width of the tube within which errors are ignored
The ε-insensitive tube in SVR means errors smaller than ε incur no penalty, controlling tolerance for deviation from the regression line.
Question 58: In neural architecture search (NAS), what is the goal?
- To prune a pretrained model to the smallest size
- To automatically discover optimal neural network architectures using search algorithms (Correct answer)
- To search for the best learning rate schedule
- To manually design the best network topology for a task
Correct answer: To automatically discover optimal neural network architectures using search algorithms
NAS automates the design of neural network architectures by searching over possible configurations using techniques like reinforcement learning or evolutionary algorithms.
Question 59: What is the role of an embedding layer in a neural network processing text?
- It converts text to uppercase for normalization
- It computes attention scores between word pairs
- It applies convolutional filters across word sequences
- It maps discrete tokens to dense continuous vector representations (Correct answer)
Correct answer: It maps discrete tokens to dense continuous vector representations
An embedding layer learns a dense vector for each token, capturing semantic relationships in a continuous space.
Question 60: What is the exploding gradient problem and a common mitigation technique?
- Weights diverging due to large batches; fixed by smaller learning rates
- Gradients growing exponentially; mitigated by gradient clipping (Correct answer)
- Gradients becoming zero; solved by ReLU activation
- Loss increasing unboundedly; fixed by dropout
Correct answer: Gradients growing exponentially; mitigated by gradient clipping
Exploding gradients occur when backpropagated values grow exponentially; gradient clipping caps gradient norms to keep updates stable.
Machine Learning Fundamentals Assessment
The Machine Learning Fundamentals Assessment covers supervised and unsupervised learning, neural networks, deep learning, feature engineering, model evaluation, regression, classification, clustering, natural language processing, and computer vision techniques used in modern ML applications.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds