Question: Compulsory Task I Follow these steps: Create a Decision Tree that can predict the survival of passengers on the Titanic. Make sure not to impose
Compulsory Task I
Follow these steps:
Create a Decision Tree that can predict the survival of passengers on the
Titanic. Make sure not to impose any restrictions on the depth of the tree.
Use the decisiontreetitanic.ipynb file provided, which has the
titanic.csv dataset loaded sourced here to complete the task.
Select relevant variables from the data and split the data into a training,
development, and test set.
Train a decision tree and make a plot of it
Compute your models accuracy on the development set.
Try building your model with different values of the maxdepth At
each step, create a plot of your tree and store the accuracies on both the
training and development data.
Plot a line of your training accuracies and another of your development
accuracies in the same graph. Write down what shape the lines have and
what this shape means.
Report the accuracy of your final model on the test data.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
