A global financial firm uses a gradient boosting regression model to estimate customer credit scores. The dataset contains categorical fields (for example, city and housing status) and financial fields recorded in different units (for example, balances in dollars and interest in cents). Training accuracy is 99% but test accuracy is 75%. Which preprocessing steps will most improve the model's test performance?
Choose an answer
Tap an option to check your answer.
Correct answer: One-hot encode categorical fields, standardize the financial numeric fields, and apply L1 regularization..
Why this is the answer
The model's high training accuracy and low test accuracy indicate overfitting. One-hot encoding categorical features converts them into a numerical format without implying an ordinal relationship, which is suitable for models like gradient boosting. Standardizing financial numeric fields (e.g., using StandardScaler) scales features to a common range, preventing features with larger values from dominating the model and improving convergence. L1 regularization (Lasso) adds a penalty equal to the absolute value of the magnitude of coefficients, which helps in feature selection by driving some coefficients to zero, thereby reducing model complexity and combating overfitting. Tokenizing categorical fields is typically for text data. Binning financial fields can lead to loss of information. Label encoding assigns arbitrary numerical values, which can mislead models into assuming an order. Applying regularization to only numeric fields or applying different types of regularization to different parts of the model in this manner is not standard practice for addressing this type of overfitting. Logarithmic transforms are for skewed numerical data, not categorical. Imputing missing values is a general preprocessing step but doesn't directly address the overfitting issue described.
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