PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #126
You are building an ML model to predict trends in the stock market based on a wide range of factors. While exploring the data, you notice that some features have a large range. You want to ensure…
The correct answer is D. Normalize the data by scaling it to have values between 0 and 1. To prevent features with large ranges from disproportionately influencing an ML model and potentially causing overfitting due to magnitude, the data should be normalized by scaling values to a common range, such as 0 to 1.
Question
Options
- AStandardize the data by transforming it with a logarithmic function.
- BApply a principal component analysis (PCA) to minimize the effect of any particular feature.
- CUse a binning strategy to replace the magnitude of each feature with the appropriate bin number.
- DNormalize the data by scaling it to have values between 0 and 1.
How the community answered
(28 responses)- A4% (1)
- C7% (2)
- D89% (25)
Why each option
To prevent features with large ranges from disproportionately influencing an ML model and potentially causing overfitting due to magnitude, the data should be normalized by scaling values to a common range, such as 0 to 1.
Standardizing data by transforming it with a logarithmic function is typically used to reduce skewness or manage features with exponential distributions, not as the primary method to prevent overfitting solely due to large feature magnitudes.
Principal Component Analysis (PCA) is a dimensionality reduction technique that creates new orthogonal features; it does not directly address the issue of individual features with large magnitudes overfitting the model, although it might involve scaling as a preprocessing step.
Using a binning strategy discretizes continuous features, which can reduce sensitivity to outliers or make distributions more uniform, but it typically loses information and is not the standard or most effective method to prevent overfitting caused by the magnitude of continuous features.
Normalizing the data by scaling it to have values between 0 and 1 (Min-Max scaling) ensures that all features contribute proportionally to the model's learning process, irrespective of their original magnitude. This prevents features with naturally larger values from dominating the weight updates or distance calculations in algorithms sensitive to feature scales, thus reducing the risk of overfitting due to magnitude.
Concept tested: Feature scaling (normalization) to prevent overfitting
Source: https://developers.google.com/machine-learning/data-prep/transform/normalization
Topics
Community Discussion
No community discussion yet for this question.