AI For Beginners 2 — Questions and Answers
Question 1: Which type of machine learning uses labeled training data to learn a mapping from inputs to outputs?
- Unsupervised learning
- Supervised learning (Correct answer)
- Reinforcement learning
- Self-supervised learning
Correct answer: Supervised learning
Supervised learning trains on labeled input-output pairs so the model can predict outputs for new inputs.
Question 2: What does the term 'overfitting' mean in machine learning?
- The model trains too slowly
- The model performs well on training data but poorly on new data (Correct answer)
- The model has too few parameters
- The model ignores the training data entirely
Correct answer: The model performs well on training data but poorly on new data
Overfitting occurs when a model memorizes training data noise and fails to generalize to unseen examples.
Question 3: What is a neural network's 'activation function' used for?
- To initialize model weights
- To introduce non-linearity into the network (Correct answer)
- To split data into batches
- To compute the loss value
Correct answer: To introduce non-linearity into the network
Activation functions add non-linearity, allowing neural networks to learn complex patterns beyond simple linear relationships.
Question 4: Which metric is most appropriate for evaluating a binary classification model on a heavily imbalanced dataset?
- Accuracy
- F1 Score (Correct answer)
- Mean Squared Error
- R-squared
Correct answer: F1 Score
F1 Score balances precision and recall, making it more informative than accuracy when class distribution is skewed.
Question 5: What is the purpose of a validation set during model training?
- To provide extra training samples
- To tune hyperparameters without touching the test set (Correct answer)
- To replace the need for a test set
- To store the final model weights
Correct answer: To tune hyperparameters without touching the test set
The validation set allows engineers to tune hyperparameters and detect overfitting before final evaluation on the test set.
Question 6: Which Python library is most commonly used for numerical array operations in AI/ML pipelines?
- Pandas
- NumPy (Correct answer)
- Matplotlib
- Scikit-learn
Correct answer: NumPy
NumPy provides fast multi-dimensional array operations that underpin nearly all scientific computing and ML frameworks.
Question 7: What does 'batch size' refer to in neural network training?
- The number of layers in the network
- The number of training samples processed before updating weights (Correct answer)
- The total size of the training dataset
- The number of epochs to train
Correct answer: The number of training samples processed before updating weights
Batch size controls how many samples are used to compute the gradient before each weight update step.
Which type of machine learning uses labeled training data to learn a mapping from inputs to outputs?