The Convenience Function and Probabilities for Relatives

Learn the concept of convenience functions and how to calculate the probabilities of relatives to have survived the Titanic disaster.

How familial relationships affect survival

Let’s get back to the Titanic. There are still plenty of ways to improve our QBN. A promising feature to include is the relationships between passengers. So far, we’ve ignored any family relationship. Our dataset contains information about the number of siblings and spouses (SibSp) and the number of parents and children (Parch) traveling with a passenger.

The SibSp and Parch fields are numeric values denoting the number of related passengers aboard the Titanic.

The following function lets us evaluate how a certain number of related passengers affects the chance to survive.

Get hands-on with 1200+ tech skills courses.