Data Preparation for ML and AI

A transaction amount feature contains zeros and has a long right tail. An engineer wants to compress large values while preserving ordering and retaining zeros. Which transformation is MOST appropriate?

Show the answer

Correct answerA. Apply a log(1 + x) transformation.

AWhy this is right: Adding one makes the logarithm defined at zero, while the logarithm compresses large nonnegative values.

BWhy not this: Standardization changes the mean and scale but preserves the distribution's skewness.

CWhy not this: Binning groups distinct values together, losing their individual ordering within each bin.

DWhy not this: Min-max scaling preserves the relative spacing of values rather than compressing the right tail.

For nonnegative amounts, log(1 + x) compresses large values, preserves ordering, and maps zero to zero. Min-max scaling changes the range but does not reduce the distribution's skewness.