Sample Data: Titanic Survival

Source Notebook

Classify whether a passenger on board the maiden voyage of the RMS Titanic in 1912 survived given their age, sex and class

This data set contains the survival status of 1309 passengers aboard the maiden voyage of the RMS Titanic in 1912 (the ships crew are not included), along with the passengers age, sex and class (which serves as a proxy for economic status). 70% of the data was selected (using stratified sampling) for the training set.

Examples

Basic Examples (2) 

Retrieve the resource:

In[1]:=
\!\(
TagBox[
RowBox[{"ResourceObject", "[", "\"\<Sample Data: Titanic Survival\>\"", "]"}],
#& ,
BoxID -> "ResourceTag-Sample Data: Titanic Survival-Input",
AutoDelete->True]\)
Out[1]=

Retrieve the a sample of the data:

In[2]:=
RandomSample[ResourceData[\!\(\*
TagBox["\"\<Sample Data: Titanic Survival\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Titanic Survival-Input",
AutoDelete->True]\)], 10]
Out[2]=

Analysis (3) 

Train a classifier:

In[3]:=
classifier = Classify[ResourceData[\!\(\*
TagBox["\"\<Sample Data: Titanic Survival\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Titanic Survival-Input",
AutoDelete->True]\), "TrainingData"]]
Out[3]=

Obtain general information about the classifier:

In[4]:=
ClassifierInformation[classifier]
Out[4]=

Visualize the accuracy of the classifier on the test dataset:

In[5]:=
ClassifierMeasurements[classifier, ResourceData[\!\(\*
TagBox["\"\<Sample Data: Titanic Survival\>\"",
#& ,
BoxID -> "ResourceTag-Sample Data: Titanic Survival-Input",
AutoDelete->True]\), "TestData"], "ConfusionMatrixPlot"]
Out[5]=

Wolfram Research, "Sample Data: Titanic Survival" from the Wolfram Data Repository (2018)  

Data Resource History

Source Metadata

Data Downloads

Publisher Information