MS-DS Master of Data science Master of Data Science 4 — Questions and Answers
Question 1: Which consistency model guarantees that all nodes in a distributed system see the same data at the same time?
- Eventual consistency
- Strong (linearizable) consistency (Correct answer)
- Causal consistency
- Monotonic read consistency
Correct answer: Strong (linearizable) consistency
Strong (linearizable) consistency ensures that all reads reflect the most recent write and all nodes observe updates in the same order.
Question 2: What is the purpose of cross-validation in model evaluation?
- To increase the training dataset size
- To obtain a more reliable estimate of model generalization performance (Correct answer)
- To speed up hyperparameter optimization
- To prevent data leakage from the test set
Correct answer: To obtain a more reliable estimate of model generalization performance
Cross-validation rotates data through multiple train/validation splits, giving a less biased and lower-variance estimate of how the model will perform on unseen data.
Question 3: Which algorithm is commonly used for collaborative filtering in recommendation systems?
- K-means clustering
- Matrix factorization (e.g., SVD) (Correct answer)
- Naive Bayes
- DBSCAN
Correct answer: Matrix factorization (e.g., SVD)
Matrix factorization decomposes the user-item interaction matrix into latent factor matrices, capturing hidden preference patterns.
Question 4: In the MapReduce programming model, what does the 'Shuffle and Sort' phase accomplish?
- It filters out invalid records from the mapper output
- It groups all values by key and delivers them sorted to each reducer (Correct answer)
- It distributes data evenly across worker nodes
- It compresses mapper output to reduce network bandwidth
Correct answer: It groups all values by key and delivers them sorted to each reducer
The shuffle and sort phase collects mapper outputs, groups all values associated with the same key, and delivers them sorted to the appropriate reducer.
Question 5: What statistical concept describes the tendency of machine learning models to fit noise in training data rather than the underlying pattern?
- Underfitting
- Overfitting (Correct answer)
- Regularization
- Bias
Correct answer: Overfitting
Overfitting occurs when a model learns the training data too well, including its noise, resulting in poor generalization to new data.
Question 6: Which activation function is most commonly used in the output layer of a binary classification neural network?
- ReLU
- Sigmoid (Correct answer)
- Tanh
- Softmax
Correct answer: Sigmoid
The sigmoid function maps outputs to (0,1), which can be interpreted as a probability for binary classification tasks.
Question 7: In time series analysis, what does 'stationarity' require?
- The series must be monotonically increasing
- The statistical properties (mean, variance) must remain constant over time (Correct answer)
- The series must have no seasonal component
- The data must be collected at fixed intervals
Correct answer: The statistical properties (mean, variance) must remain constant over time
A stationary time series has constant mean, variance, and autocovariance structure over time, which is a key assumption for many forecasting models like ARIMA.
Which consistency model guarantees that all nodes in a distributed system see the same data at the same time?