Data and Analytics Machine Learning Fundamentals 1 — Questions and Answers
Question 1: Which type of machine learning involves training a model on labeled data to predict outcomes for new, unseen data?
- Unsupervised learning
- Supervised learning (Correct answer)
- Reinforcement learning
- Self-supervised learning
Correct answer: Supervised learning
Supervised learning uses labeled training data where the correct output is known, allowing the model to learn mappings from inputs to outputs.
Question 2: What is overfitting in a machine learning model?
- The model performs poorly on both training and test data
- The model learns training data too well and fails to generalize to new data (Correct answer)
- The model is too simple to capture patterns in the data
- The model requires too much computational power
Correct answer: The model learns training data too well and fails to generalize to new data
Overfitting occurs when a model memorizes training data noise and details, resulting in high training accuracy but poor performance on unseen data.
Question 3: Which technique is used to prevent overfitting by adding a penalty term to the loss function?
- Boosting
- Bagging
- Regularization (Correct answer)
- Normalization
Correct answer: Regularization
Regularization adds a penalty (L1 or L2) to the loss function to discourage the model from fitting noise and reduce overfitting.
Question 4: In machine learning, what does the term 'feature engineering' refer to?
- Selecting the best algorithm for a task
- Transforming raw data into meaningful input variables for a model (Correct answer)
- Evaluating model performance on a test set
- Deploying a trained model to production
Correct answer: Transforming raw data into meaningful input variables for a model
Feature engineering is the process of using domain knowledge to create, transform, or select variables (features) from raw data to improve model performance.
Question 5: What is the purpose of a validation set in machine learning?
- To train the model's parameters
- To provide a final unbiased evaluation of the model
- To tune hyperparameters and select the best model during development (Correct answer)
- To augment the training data
Correct answer: To tune hyperparameters and select the best model during development
A validation set is used during model development to tune hyperparameters and compare different models, separate from the test set used for final evaluation.
Question 6: Which of the following is an example of an unsupervised learning algorithm?
- Linear regression
- Random forest
- K-means clustering (Correct answer)
- Support vector machine
Correct answer: K-means clustering
K-means clustering is unsupervised because it groups data points based on similarity without using labeled training examples.
Question 7: What does the bias-variance tradeoff describe in machine learning?
- The tradeoff between model accuracy and training speed
- The balance between underfitting (high bias) and overfitting (high variance) (Correct answer)
- The tradeoff between the number of features and sample size
- The balance between precision and recall
Correct answer: The balance between underfitting (high bias) and overfitting (high variance)
The bias-variance tradeoff describes how increasing model complexity reduces bias (underfitting) but increases variance (overfitting), requiring a balance for optimal generalization.
Which type of machine learning involves training a model on labeled data to predict outcomes for new, unseen data?