Why do we need to normalize or scale data in machine learning?
In machine learning, different features may have entirely different magnitudes. Without processing, features with larger magnitudes may dominate the model training process. Normalization scales all features to the same scale so they can be fairly compared and processed, preventing increased computational complexity or degraded performance.
Conditions
- Suitable for datasets where features differ greatly in units or magnitude
Reasoning, step by step
- Observe that raw data may be very large (e.g., in the thousands or tens of thousands).
- Recognize that using it directly in machine learning algorithms leads to extremely high time complexity.
- Understand that by constraining the data between 0 and 1, algorithms can process it more efficiently and avoid computational difficulties arising from excessively large numerical values.
Example
The instructor points out that Square Foot values are in the thousands, while Bedrooms values are single-digit; to place them on the same scale, normalization is required.
Common misconceptions
- Assuming that raw data with different magnitudes can be directly fed into a machine learning model. Data of different magnitudes causes the model to favor features with larger numerical values.
Watch the explanation
Explore next
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.