Data Preparation and Feature Engineering
Garbage in, garbage out
Alteryx Machine Learning consumes a flat, tidy table: one row per entity, one column per feature, plus the target. Most project failures trace to preparation, not algorithms. Expect questions on missing values, outliers, categorical encoding, scaling, and date handling.
Missing data
Understand the difference between missing at random and missing with meaning (missingness itself can be a feature). Imputation choices matter: mean/median for numeric, mode or a dedicated category for categorical. Deleting rows is a valid but lossy option; deleting a column with high missingness may be better than imputing noise.
Encoding and scaling
Categorical variables must become numeric. One-hot encoding creates sparse columns and can explode dimensionality on high-cardinality fields; consider grouping rare categories first. Numeric features on wildly different scales can dominate distance- or gradient-based methods, so scaling helps some algorithms and is unnecessary for tree-based ones.
Feature engineering
Derive ratios, time-since-event, aggregates, and interaction terms that encode domain knowledge. Then prune: remove constant columns, near-duplicates, and leaky fields. Feature importance from an initial model can guide a second iteration.
Traps
Questions often present leakage disguised as good engineering (e.g., a field populated only after the outcome is known), or imputation computed on the full dataset before splitting, which leaks validation information.
Worked example
A churn dataset has a cancel_reason field. It is filled only for customers who already churned, so it is leakage. Drop it, and instead engineer days_since_last_login and support_tickets_last_90d.