Artificial Intelligence Machine Learning 2 — Questions and Answers
Question 1: Which algorithm is a non-parametric method that classifies new points based on the majority class of their nearest neighbors?
- Linear Regression
- K-Nearest Neighbors (Correct answer)
- Naive Bayes
- Support Vector Machine
Correct answer: K-Nearest Neighbors
K-Nearest Neighbors classifies a point by looking at the k closest training examples and using a majority vote.
Question 2: What is cross-validation used for in machine learning?
- To increase dataset size
- To estimate model performance on unseen data (Correct answer)
- To speed up model training
- To encode categorical features
Correct answer: To estimate model performance on unseen data
Cross-validation partitions data into folds to provide a reliable estimate of how the model generalizes.
Question 3: Which ensemble method builds multiple decision trees and averages their predictions?
- AdaBoost
- Random Forest (Correct answer)
- Logistic Regression
- Naive Bayes
Correct answer: Random Forest
Random Forest builds many decision trees using random subsets of data and features, then averages results.
Question 4: What is 'feature engineering' in the machine learning pipeline?
- Selecting the best model architecture
- Creating or transforming input variables to improve model performance (Correct answer)
- Evaluating model accuracy on test data
- Splitting data into train and test sets
Correct answer: Creating or transforming input variables to improve model performance
Feature engineering involves creating, transforming, or selecting input variables to make patterns easier for a model to learn.
Question 5: Which gradient boosting library is widely used in US industry competitions and known for speed?
- TensorFlow
- PyTorch
- XGBoost (Correct answer)
- Scikit-learn
Correct answer: XGBoost
XGBoost is an optimized gradient boosting library that is fast, scalable, and popular in competitions like Kaggle.
Question 6: What does 'learning rate' control in gradient descent optimization?
- The number of training epochs
- The step size taken in the direction of the negative gradient (Correct answer)
- The proportion of data used per batch
- The depth of the neural network
Correct answer: The step size taken in the direction of the negative gradient
The learning rate determines how large each parameter update step is during gradient descent.
Which algorithm is a non-parametric method that classifies new points based on the majority class of their nearest neighbors?