An ML engineer is building a model to predict housing and apartment prices using three features: square meters, price, and building age. The dataset (10,000 rows) contains extreme values: one very large mansion and one extremely small apartment. To ensure the model makes accurate predictions for typical properties, which preprocessing approach should be used?
Choose an answer
Tap an option to check your answer.
Correct answer: Remove the outliers and apply a log transform to the Square Meters feature..
Why this is the answer
Removing outliers is crucial because extreme values like a mansion or a tiny apartment can skew model training, leading to inaccurate predictions for typical properties. Log transformation is effective for features with a wide range of values, like "Square Meters," as it reduces the impact of large values and makes the distribution more symmetrical, improving model performance. Keeping outliers (incorrect options) would allow these extreme values to disproportionately influence the model. One-hot encoding (incorrect options) is unsuitable for numerical features like "Square Meters" as it's designed for categorical data, creating many unnecessary binary columns and not addressing the distribution issues.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed