Reader small image

You're reading from  Developing Kaggle Notebooks

Product typeBook
Published inDec 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781805128519
Edition1st Edition
Languages
Right arrow
Author (1)
Gabriel Preda
Gabriel Preda
author image
Gabriel Preda

Dr. Gabriel Preda is a Principal Data Scientist for Endava, a major software services company. He has worked on projects in various industries, including financial services, banking, portfolio management, telecom, and healthcare, developing machine learning solutions for various business problems, including risk prediction, churn analysis, anomaly detection, task recommendations, and document information extraction. In addition, he is very active in competitive machine learning, currently holding the title of a three-time Kaggle Grandmaster and is well-known for his Kaggle Notebooks.
Read more about Gabriel Preda

Right arrow

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 page is locked
Previous PageNext Page
You have been reading a chapter from
Developing Kaggle Notebooks
Published in: Dec 2023Publisher: PacktISBN-13: 9781805128519

Author (1)

author image
Gabriel Preda

Dr. Gabriel Preda is a Principal Data Scientist for Endava, a major software services company. He has worked on projects in various industries, including financial services, banking, portfolio management, telecom, and healthcare, developing machine learning solutions for various business problems, including risk prediction, churn analysis, anomaly detection, task recommendations, and document information extraction. In addition, he is very active in competitive machine learning, currently holding the title of a three-time Kaggle Grandmaster and is well-known for his Kaggle Notebooks.
Read more about Gabriel Preda