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 - Avoid single mean imputation when the analysis is inferential rather than predictive
A stakeholder wants coefficients, confidence intervals or group comparisons from data with substantial missingness.
mediumdocumented fact - 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 - Add explicit interaction terms to a linear model when the effect of one driver depends on another
Domain knowledge says an effect varies by context, for example price sensitivity that differs between short-haul and long-haul markets.
mediumpractitioner 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 - Prefer splines to coarse bins when a linear model needs a nonlinear single-feature effect
You plan to cut days to departure or customer age into a few buckets so a linear model can bend.
mediumpractitioner heuristic - Compute entity history features as of the prediction timestamp with point-in-time joins
You add aggregates such as a customer's booking count, a route's average load factor or an account's late payments to each training row.
mediumdocumented fact - 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 - Drop one dummy level for unpenalized linear regression, keep all levels for penalized models and trees
You one-hot encode categoricals for a linear model and must decide whether to set drop='first'.
mediumdocumented fact - Replace a high-cardinality code with its descriptive attributes so new codes inherit meaning
A model uses airport, aircraft-type or merchant codes with hundreds of levels, and new codes arrive with no history.
mediumpractitioner heuristic - Count populated cells before adding a crossed categorical feature
You cross two or three categoricals, such as route by weekday by fare class, to give a linear model an interaction or to build a composite key.
mediumpractitioner heuristic - Bracket a suspected MNAR column with a delta adjustment instead of arguing about MAR versus MNAR
A decision-critical column, such as stated income or a survey score, may be missing because of its own value, and the team debates the mechanism from missingness plots.
harddocumented fact - Replace two near-duplicate prices with one level and one gap before interpreting a linear model
Own fare and competitor fare move together, both sit in a linear or logistic model, and their coefficients flip sign between retrains.
mediumpractitioner heuristic - 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 - Build calendar features for each timestamp that drives the outcome, such as booking date and travel date
A booking table has both booking date and departure date, but only departure-date calendar features exist because it is the row key.
mediumpractitioner heuristic - 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