Kaggle's 30 Days Of ML (Competition Part-3): What is Target Encoding and how does it work? | Summary and Q&A

9.9K views
August 19, 2021
by
Abhishek Thakur
YouTube video player
Kaggle's 30 Days Of ML (Competition Part-3): What is Target Encoding and how does it work?

TL;DR

Learn how to properly use target encoding for feature engineering, avoiding overfitting and achieving better performance in machine learning models.

Install to Summarize YouTube Videos and Get Transcripts

Questions & Answers

Q: What is target encoding and why is it important in feature engineering?

Target encoding is a technique used to convert categorical variables into numerical features based on the target variable. It is important because it helps capture relationships between the categorical variable and the target, improving model performance.

Q: What is the risk of overfitting when using target encoding?

Target encoding can easily lead to overfitting if not done carefully. While it may give high scores on the validation set, it may not generalize well to the test set, resulting in poor performance.

Q: How is target encoding performed in this video?

Target encoding is performed by grouping the data by the categorical variable and aggregating the target variable using mean or other aggregates. The resulting values are then mapped back to the original dataframe as new features.

Q: Why is it important to do target encoding out of fold?

Target encoding should be done out of fold to avoid target leakage, which occurs when information from the validation set is used to create the target-encoded features. This ensures that the encoding is based solely on the training data.

Summary & Key Takeaways

  • This video explains the concept of target encoding and its importance in feature engineering.

  • The presenter corrects a mistake from a previous video and demonstrates the right way to create target-encoded features.

  • Target encoding requires careful handling to avoid overfitting and improve model performance on the test set.

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Explore More Summaries from Abhishek Thakur 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on: