Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Developing Kaggle Notebooks

You're reading from   Developing Kaggle Notebooks Pave your way to becoming a Kaggle Notebooks Grandmaster

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781805128519
Length 370 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Gabriel Preda Gabriel Preda
Author Profile Icon Gabriel Preda
Gabriel Preda
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Introducing Kaggle and Its Basic Functions FREE CHAPTER 2. Getting Ready for Your Kaggle Environment 3. Starting Our Travel – Surviving the Titanic Disaster 4. Take a Break and Have a Beer or Coffee in London 5. Get Back to Work and Optimize Microloans for Developing Countries 6. Can You Predict Bee Subspecies? 7. Text Analysis Is All You Need 8. Analyzing Acoustic Signals to Predict the Next Simulated Earthquake 9. Can You Find Out Which Movie Is a Deepfake? 10. Unleash the Power of Generative AI with Kaggle Models 11. Closing Our Journey: How to Stay Relevant and on Top 12. Other Books You May Enjoy
13. Index

Aggregated view of various features

We explored the categorical, numerical data as well as the text data. We learned how to extract various features from text data, and we build aggregated features from some of the numerical ones. Let’s now build two more features by grouping the Title and the Family Size. We will create two new features:

  • Titles – by clustering together titles that are similar (like Miss. with Mlle. or Mrs. and Mme.) or rare (like Dona., Don., Capt., Jonkheer., Rev., the Countess.) and keeping the most frequent ones: Mr., Mrs., Master. And Miss.
  • Family Type – create three clusters from the Family Size values, Single for Family Size of 1, Small (for families to up to 4 members) and Large (for families with more than 4 members)

Then, we represent on a single graph several simple or derived features that we learned have an important predictive value (see Figure 3.26).

Figure 3.25. Passengers survival rates for different features (original or derived): Sex, Passenger Class (Pclass), Age Interval, Fare Interval, Family Type, Titles (clustered). The graphs show also the percent that the subset (given by both category and survived status) represent from all passengers.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime