MS-DS Master of Data science FREE Master of Data Science Machine Learning Questions and Answers 2 — Questions and Answers
Question 1: Which regularization technique adds the absolute value of coefficients as a penalty term to the loss function?
- L1 (Lasso) regularization (Correct answer)
- L2 (Ridge) regularization
- Elastic Net regularization
- Dropout regularization
Correct answer: L1 (Lasso) regularization
L1 regularization adds the sum of absolute values of coefficients to the loss function, which can drive some coefficients to exactly zero.
Question 2: In a random forest algorithm, what technique is used to create diversity among individual decision trees?
- Bagging with feature subsampling (Correct answer)
- Gradient boosting
- Principal component rotation
- Sequential feature elimination
Correct answer: Bagging with feature subsampling
Random forests use bootstrap aggregating (bagging) combined with random feature subsampling at each split to ensure diversity among trees.
Question 3: What does the silhouette score measure in unsupervised learning?
- How well each data point fits within its assigned cluster compared to neighboring clusters (Correct answer)
- The total variance explained by the clustering
- The number of optimal clusters in a dataset
- The distance between cluster centroids
Correct answer: How well each data point fits within its assigned cluster compared to neighboring clusters
The silhouette score ranges from -1 to 1 and measures how similar a point is to its own cluster versus the nearest neighboring cluster.
Question 4: Which activation function is most commonly used in hidden layers of modern deep neural networks?
- ReLU (Correct answer)
- Sigmoid
- Tanh
- Softmax
Correct answer: ReLU
ReLU (Rectified Linear Unit) is preferred in hidden layers because it mitigates the vanishing gradient problem and enables faster training.
Question 5: What is the primary purpose of cross-validation in machine learning model development?
- To estimate how well the model generalizes to unseen data (Correct answer)
- To increase the size of the training dataset
- To select the best features for the model
- To speed up the training process
Correct answer: To estimate how well the model generalizes to unseen data
Cross-validation partitions data into multiple train-test splits to provide a reliable estimate of model performance on unseen data.
Question 6: In gradient boosting, what does each successive model attempt to predict?
- The residual errors of the previous model (Correct answer)
- The original target variable
- The feature importances
- The learning rate for the next iteration
Correct answer: The residual errors of the previous model
Each new model in gradient boosting is trained to predict the residual errors from the ensemble built so far, iteratively reducing overall error.
Which regularization technique adds the absolute value of coefficients as a penalty term to the loss function?