Bulk treatment
All numeric gaps:
All categorical gaps:
One pass over every gappy column of the kind. The per-column tools below remain for columns that deserve individual judgment.
Ignoring and Discarding Data
Drop rows with missing values in
Drop columns missing more than %
Deletion is the only treatment allowed on the Y variable, and it happened automatically when Y was declared: imputing the answer column would corrupt every model trained on it.
Mean / Median / Mode Imputation
Median is the safer default where the column is skewed (the mean has already been pulled by the tail). Mode is the option for categorical columns.
K-Nearest Neighbour as an Imputation Method
k =
weights
Each missing cell is estimated from the k most similar rows (similarity over the other numeric columns). Fills every numeric column's gaps in one pass; Y is excluded by the protection rule.
know more
Think of the row with the gap as a person whose salary you do not know. KNN looks through all the complete rows and finds the k that resemble this one most across everything you DO know (their other columns). It then fills the gap with those neighbours' average, weighted toward the closest ones if you choose distance weighting. The honesty caveat: if the neighbours are not truly similar in the way that matters, the guess inherits their noise, and a very small k can hang the whole estimate on one odd neighbour.
Use of Prediction Models
rounds
Each gappy column is modeled as a regression on the others, round-robin, until stable (the MICE idea). Seeded, so the recipe replays identically.
know more
Suppose three columns have holes: fare, delay, and load factor. The method first fills every hole with a crude guess (the column's average). Then it takes fare, temporarily erases the crude guesses there, and builds a small prediction model: given this row's delay, distance and load factor, what should its fare be? It fills fare's holes with those predictions, which now use the rest of the row instead of one blanket number. Then it does the same for delay, then load factor. That is one round. On the next round the predictors themselves are better guesses than before, so every estimate improves again; after a few rounds the numbers stop changing and it stops. Seeded means the small random choices inside are pinned to a number recorded in your recipe, so a replay next month reproduces exactly the same filled table.
Type casting
Columns that LOOK numeric but arrived as text ('8.90%', '36 months', '$1,200') block every numeric tool. The probe shows exactly which values are in the way and what the cast would turn them into; the cast then extracts the number from each value, and anything holding no number becomes missing. Casting is allowed on Y, with the standing rule applied: rows whose Y fails the cast are dropped, never imputed.
Python-convention check
The convention checked is PEP 8 snake_case: lowercase letters, digits and underscores, nothing else. A name like Interest.Rate cannot even be written as df.Interest.Rate (pandas reads the dot as an attribute), and 'Loan Length' condemns you to bracket-and-quote gymnastics in every line of code that follows; interest_rate and loan_length just work.
Rename one column
to
Any column, Y included: a rename changes the label, never the values, so the Y protection rule does not bite here. Every rename lands in the recipe, so a replay reproduces it.
Bulk treatment (all numeric columns)
IQR fences, k =
One pass over every numeric column with its own fences. Capping treats each column independently; dropping removes the union of offending rows in a single sweep, because dropping column by column would move every later column's fences mid-operation.
Per-column treatment
k =
|z| >
P to P
Capping pulls extreme values back to the fence instead of losing the rows: the usual choice when the outliers are real but distorting. Dropping is for values you believe are errors. The fences shown in the result line come from the method you picked, so the choice is always on record in the recipe.
Transformations
The result line reports skewness before and after, which is the test of whether the transformation earned its keep. Guards are honest: log refuses zeros and negatives, Box-Cox refuses non-positives (Yeo-Johnson is the one that tolerates them).
Binning
bins
Equal-width slices the RANGE into equal pieces; equal-frequency (qcut, where the number is q) slices the ROWS into equal piles. Leave labels empty to keep the interval names; the result line lists the bins so you can rename them on a second pass if you prefer.
Group rare categories
into
The way out for a categorical with too many levels (a Loan Purpose with 14 values, say): collapse the rare ones into a single bucket, THEN encode. Keep-top-N holds the N most frequent levels; the share rule holds every level above the percentage you set.
Encoding
cap
One-hot avoids the artificial ordering that label codes impose; the cap guards against a high-cardinality column exploding the width.
Date parts
Rows
keep
Columns
The usual first victims: the constant column and the identifier that VedaProfile flagged.
Feature importance: six lenses, one table
Correlation with Y, univariate F score, mutual information, random-forest impurity importance, permutation importance, and Lasso coefficient size, computed side by side with a rank under each and an average rank. The methods disagreeing is itself information: a feature the forest loves but Lasso zeroes is usually non-linear or redundant. Nothing is dropped from here; this table informs the decisions you make in the other panels.
High-correlation pairs
|r| threshold
Two features carrying the same signal: keeping both adds redundancy and destabilizes coefficients. In supervised mode the suggestion drops the one that correlates weaker with Y.
Low variation
Features that barely move barely explain. Variance is shown on min-max scaled values so columns with different units compare fairly.
Univariate SelectKBest
keep top
by
VIF board: iterative multicollinearity elimination
threshold
or custom
VIF asks, for each feature: how well do the OTHER features already predict it? (VIF = 1 / (1 - R²) of that regression.) Drop the worst offender, recompute, repeat: the board reruns itself after every drop, exactly the loop you would run by hand, and every round lands in the recipe with its reason. Convention: VIF under 2 is clean, 5 is the common line, 10 is lenient.
Recursive Feature Elimination
keep features
A wrapper method from the Filter / Wrapper / Embedded taxonomy: fit the model on everything, drop the weakest coefficient, refit, repeat. Recursion matters because coefficients change every time a feature leaves; a one-shot ranking cannot see that. Estimator: linear regression for a numeric Y, logistic for classes, on standardized features.
Lasso: selection by shrinkage
alpha
The L1 penalty shrinks coefficients toward zero and, unlike Ridge, pushes the weakest ones EXACTLY to zero: the model does the selecting while it fits, which is what embedded means. Raise alpha and watch more features die; the path plot shows every coefficient's journey.
Principal Component Analysis
components
PCA rewrites the numeric features as uncorrelated components ordered by how much variance each captures, on standardized values. The scree table is the choosing tool: take components until the cumulative percentage satisfies you, and read the loadings to see what each component is made of. Especially useful before clustering, where fewer uncorrelated axes help distance measures behave. Extraction requires complete numeric features: treat missing values first.
Factor Analysis
factors
FA asks a different question than PCA: not "which directions hold the most variance" but "which hidden factors would EXPLAIN why these features correlate". PCA components are recipes of the observed columns; factors are hypothesized causes behind them. Loadings above roughly 0.4 in size are the conventional reading of "this feature belongs to this factor".
Linear Discriminant Analysis
discriminants
LDA is the supervised member of this family: it finds the directions that best SEPARATE the classes of Y, not the directions of most variance. It therefore needs a categorical Y, and can produce at most classes minus one discriminants. For a numeric Y or unlabeled data, PCA is the tool.
Current state of the data
This block always shows the data as it stands NOW, after every recipe step. It is not the output of the operation above; the operation results appear in the panels and the action log.