Practical insights
- 1000published
- 25in review
- 8topic families
Results
- Use RobustScaler when a few extreme values distort mean-and-variance scaling, then decide about the extremes separately
A scaled feature has a handful of huge values, such as a 10x passenger outlier or a corporate group booking.
easydocumented fact - Do not give a linear model ordinal codes for unordered categories
A nominal feature such as market or payment method is label-encoded as 0, 1, 2 and fed to a linear, kernel or distance model.
easypractitioner heuristic - Replace sentinel values like -999 before they reach linear or distance models
A source system encodes missing or not-applicable as -999, 9999 or 0.
easypractitioner heuristic - Guard ratio features against zero and tiny denominators
You build ratios such as revenue per seat, cancellations per booking or spend per visit.
easypractitioner heuristic - Log-transform skewed inputs for linear and distance models, not for trees
A numeric feature spans orders of magnitude, such as corporate account spend or group size.
easypractitioner heuristic - Remove features that are recorded because of the outcome, not before it
A candidate feature is filled in by a process that happens after or because of the target event, such as a cancellation reason, refund amount or collections flag.
easydocumented fact - Check the realised bin count when quantile-binning a zero-inflated feature
KBinsDiscretizer with strategy quantile and ten bins is applied to a feature with a large spike, for example 60% zeros in days since last cancellation.
easydocumented fact - Compute distances from coordinates with a great-circle formula in radians, not Euclidean on degrees
A model needs distance between origins and destinations, or a nearest-station feature, from latitude and longitude columns, and the step runs on raw degree values.
easypractitioner heuristic