Python Homework Part 3

The code you submit for this homework must following the coding guidelines.

Problem 1 (50 pts.)

(This task was begun at the end of the Additional Examples of Machine Learning notes.)

Consider the question of identifying the survivors of the Titanic. Determine an appropriate machine learning approach covered in class and implement it.

Specifically:

  • Using an appropriate method,train a machine learning algorithm on the dataset titanic_train.csv
  • Predict the fate of the survivors in titanic_test.csv
  • Check your predictions against the complete table of survivors in titanic_complete.csv
  • Report the % accuracy of your approach. (You’ll find that it isn’t incredibly high – this is a challenging data set to model and the basic methods we’re using here aren’t quite up to the task.)

One challenge you’ll face: some columns you should want to include are categorical (e.g.male vs. female). You can use df = df.applymap(func)where func is some function you write that converts a string to a float.

Submit a Jupyter Notebook to the D2L Dropbox.