Program 8
Program 8
Develop a program to load the Titanic dataset. Split the data into
training and test sets. Train a decision tree classifier. Visualize the
tree structure. Evaluate accuracy, precision, recall, and F1-score.
# Load the Titanic dataset from Seaborn library (or any other source you
prefer)
# For demonstration, we are using Seaborn's built-in Titanic dataset
titanic = sns.load_dataset('titanic')