AML AML Feature Engineering & Data Preprocessing 1 — Questions and Answers
Question 1: What is the primary purpose of feature scaling in machine learning?
- To reduce the number of features
- To ensure all features contribute equally to model training (Correct answer)
- To remove outliers from the dataset
- To encode categorical variables
Correct answer: To ensure all features contribute equally to model training
Feature scaling normalizes feature ranges so that no single feature dominates model training due to its magnitude.
Question 2: Which technique handles missing values by replacing them with the average of the column?
- One-hot encoding
- Label encoding
- Mean imputation (Correct answer)
- Standardization
Correct answer: Mean imputation
Mean imputation replaces missing values with the column's average, preserving the dataset's overall distribution.
Question 3: What does one-hot encoding do to categorical variables?
- Assigns numeric labels to categories
- Creates binary columns for each category (Correct answer)
- Removes low-frequency categories
- Scales categories to a 0-1 range
Correct answer: Creates binary columns for each category
One-hot encoding converts each category into a separate binary column, avoiding the assumption of ordinal relationships.
Question 4: Which dimensionality reduction technique projects data onto directions of maximum variance?
- t-SNE
- LDA
- PCA (Correct answer)
- UMAP
Correct answer: PCA
PCA (Principal Component Analysis) finds orthogonal axes of maximum variance to compress feature dimensions.
Question 5: What is the primary benefit of feature selection in a machine learning pipeline?
- Increases model complexity
- Reduces overfitting and training time (Correct answer)
- Adds synthetic training data
- Improves data imputation accuracy
Correct answer: Reduces overfitting and training time
Feature selection removes irrelevant or redundant features, reducing overfitting risk and computational cost.
Question 6: Which outlier detection method uses the interquartile range (IQR) to flag extreme values?
- Z-score normalization
- Min-max scaling
- Winsorization
- Tukey's fence method (Correct answer)
Correct answer: Tukey's fence method
Tukey's fence method flags values beyond 1.5x IQR from Q1 or Q3 as outliers for removal or treatment.
What is the primary purpose of feature scaling in machine learning?