Worksheet Titanic Python PDF
Worksheet Titanic Python PDF
The RMS Titanic sank in the North Atlantic Ocean in 1912 during her
maiden voyage from Southampton to New York. More than 1,500 of
the 2,220 passengers and crew died when the ship sank.
In this project you will make a Python program that can predict
whether a specific passenger survived.
This project worksheet is licensed under a Creative Commons Attribution Non-Commercial Share-Alike License
http://creativecommons.org/licenses/by-nc-sa/4.0/
6. Find the Titanic survivors project template and click on the “Import
Titanic survivors” button.
A description of the passenger data is displayed. Click “Import”.
What other patterns can you think of? For example, do you think
passengers with more expensive tickets would have a better or worse
chance of surviving the sinking?
Try to predict what sorts of patterns your machine learning model could
learn to recognize. And then look to see if you can find that sort of pattern
in your training data.
18. Copy the updated skeleton code displayed into a text editor.
Save it as a file called jack.py
Your machine learning model will display its prediction for whether Rose
survived the sinking of the Titanic.
Does the prediction match what happened in the movie?
When you looked for patterns in the training data, you hopefully thought
about possible reasons to explain it. For example, younger passengers
were more likely to survive because children would’ve been prioritized
when boarding lifeboats. Computers won’t have done that last bit. The
computer will hopefully have seen the pattern between age and survival
but won’t have tried to explain it. A machine learning model will learn to
recognize patterns in the data, but they won’t care about why.
Finally, you made Python programs to test your predictive model, using
information about fictional Titanic passengers from the movie, Titanic.
Now that you’ve finished, why not give one of these ideas a try?