What is target encoding and how can it leak?
Simple meaning
Target encoding replaces a category with a statistic of y, such as the mean label.
Open the full page for Why, Steps, Example and Key takeaway.
Panel-ready AI & Data Analytics questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.
Target encoding replaces a category with a statistic of y, such as the mean label.
Open the full page for Why, Steps, Example and Key takeaway.
One-hot becomes huge, so people use target encoding, hashing, embeddings, or frequency encoding.
Open the full page for Why, Steps, Example and Key takeaway.
Interactions help linear and logistic models capture AND-style effects they cannot learn from main effects alone.
Open the full page for Why, Steps, Example and Key takeaway.
If missingness itself predicts the target, mean imputation hides that signal.
Open the full page for Why, Steps, Example and Key takeaway.
SMOTE builds synthetic minority points by interpolating between a minority row and its neighbors.
Open the full page for Why, Steps, Example and Key takeaway.
Class weights leave the original rows intact and only change the loss.
Open the full page for Why, Steps, Example and Key takeaway.
It plots precision against recall as you move the threshold, focusing on the rare class.
Open the full page for Why, Steps, Example and Key takeaway.
Threshold tuning is often the first and cheapest lever when probabilities are usable.
Open the full page for Why, Steps, Example and Key takeaway.
ColumnTransformer applies different transformers to different column subsets in one step.
Open the full page for Why, Steps, Example and Key takeaway.
FeatureUnion runs transformers on the same data and concatenates their outputs.
Open the full page for Why, Steps, Example and Key takeaway.
Pass the whole Pipeline to GridSearchCV or RandomizedSearchCV.
Open the full page for Why, Steps, Example and Key takeaway.
Backpropagation applies the chain rule to compute the gradient of the loss with respect to every weight.
Open the full page for Why, Steps, Example and Key takeaway.
In deep sigmoid or tanh stacks, gradients shrink as they go backward, so early layers barely learn.
Open the full page for Why, Steps, Example and Key takeaway.
An epoch is one full pass over the training set.
Open the full page for Why, Steps, Example and Key takeaway.
Elastic net mixes L1 and L2.
Open the full page for Why, Steps, Example and Key takeaway.
For vanilla SGD they match: both add a term that pulls weights toward zero.
Open the full page for Why, Steps, Example and Key takeaway.
Stopping before the optimizer fully minimizes train loss limits effective capacity.
Open the full page for Why, Steps, Example and Key takeaway.
Use stratified k-fold for classification so each fold keeps the class mix.
Open the full page for Why, Steps, Example and Key takeaway.
GroupKFold keeps all rows from the same group, such as a user or a hospital, on one side of the split.
Open the full page for Why, Steps, Example and Key takeaway.
ShuffleSplit draws repeated random train and val cuts, which is flexible when you want a fixed train size.
Open the full page for Why, Steps, Example and Key takeaway.