Understanding Titanic Survival Predictions with Decision Trees
Decision Tree: Supervised learning Algorithm Can do both Regression and Classification capabilities Inverted tree like structure with bunch of if-else statements The Titanic dataset is one of the most famous case studies in data science. It captures passenger details such as age, sex, class, fare, and family aboard, along with whether they survived or not. In this post, we’ll walk through how a decision tree model uses these features to predict survival, and what the visualization reveals. How the Decision Tree Works Note: These features are based on the importance table at the right side Root node: “Was the passenger male?” If female , survival chances are much higher. The tree then considers passenger class and fare to refine predictions. If male , survival chances drop significantly, but age and family aboard (siblings/spouses) still play a role. Each node in the tree shows: Gini impurity: How mixed the group is (lower / purer). Samples: Number of passengers in that group. ...