Skip to content

Instantly share code, notes, and snippets.

@vinceallenvince
Created October 6, 2016 14:59
Show Gist options
  • Save vinceallenvince/08ddab064b25bcf22a0268a93d0be936 to your computer and use it in GitHub Desktop.
Save vinceallenvince/08ddab064b25bcf22a0268a93d0be936 to your computer and use it in GitHub Desktop.
Titanic Kaggle competition - Feature EDA - Surname and officer bias
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 75,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from __future__ import division\n",
"import operator\n",
"import math\n",
"\n",
"import pandas as pd\n",
"from pandas import Series, DataFrame\n",
"import numpy as np\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"sns.set_style('whitegrid')\n",
"%matplotlib inline\n",
"\n",
"from sklearn.cross_validation import cross_val_score\n",
"from sklearn.linear_model import LogisticRegression\n",
"from sklearn.svm import SVC, LinearSVC\n",
"from sklearn.ensemble import RandomForestClassifier\n",
"from sklearn.neighbors import KNeighborsClassifier\n",
"from sklearn.naive_bayes import GaussianNB"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"colors = ['#3182bd', '#6baed6', '#9ecae1', '#c6dbef', '#e6550d', '#fd8d3c', '#fdae6b', '#fdd0a2', '#31a354', '#74c476', \n",
" '#a1d99b', '#c7e9c0', '#756bb1', '#9e9ac8', '#bcbddc']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Titanic EDA - Surname and officer bias\n",
"There is anecdotal evidence officers were biased toward non-English speakers in their management of the evacuation. [Masabumi Hosono's](https://www.encyclopedia-titanica.org/titanic-survivor/masabumi-hosono.html) story is just one example.\n",
"\n",
"Is bias reflected in the data?\n",
"\n",
"To answer, I downloaded a csv of ~14,000 British surnames from 1849 and plotted survival rates against names matching an English surname. There's likely a fair amount of error in this process. But the plot below indicates there were many more people traveling with a non-English surname which is not surprising. However, it is interesting non-English passsengers had a lower survival rate in class 3 than English passengers. The situation in the other classes is the opposite.\n",
"\n",
"Is this a hint of bias? Would a more precise examination of country of origin render more detail? Probably."
]
},
{
"cell_type": "code",
"execution_count": 142,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<img src='http://i.imgur.com/LDcNdcm.gif'>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%HTML\n",
"<img src='http://i.imgur.com/LDcNdcm.gif'>"
]
},
{
"cell_type": "code",
"execution_count": 77,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def check_classifiers(X_train, Y_train):\n",
" \n",
" _cv = 5\n",
" classifier_score = {}\n",
" \n",
" scores = cross_val_score(LogisticRegression(), X, y, cv=_cv)\n",
" classifier_score['LogisticRegression'] = scores.mean()\n",
" \n",
" scores = cross_val_score(KNeighborsClassifier(), X, y, cv=_cv)\n",
" classifier_score['KNeighborsClassifier'] = scores.mean()\n",
" \n",
" scores = cross_val_score(RandomForestClassifier(), X, y, cv=_cv)\n",
" classifier_score['RandomForestClassifier'] = scores.mean()\n",
" \n",
" scores = cross_val_score(SVC(), X, y, cv=_cv)\n",
" classifier_score['SVC'] = scores.mean()\n",
" \n",
" scores = cross_val_score(GaussianNB(), X, y, cv=_cv)\n",
" classifier_score['GaussianNB'] = scores.mean()\n",
"\n",
" return sorted(classifier_score.items(), key=operator.itemgetter(1), reverse=True)"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"X_train = pd.read_csv('data/train.csv', dtype={'Age': np.float64})\n",
"y_train = X_train['Survived']"
]
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def process_surname(nm):\n",
" return nm.split(',')[0].lower()\n",
"\n",
"X_train['surname'] = X_train['Name'].apply(process_surname)"
]
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"english_surnames = pd.read_csv('uk_surnames.csv')['Name'].tolist()\n",
"# downloaded from surnamestudies.org.uk\n",
"# \"Surname Studies is devoted to the resources available for the study of the distribution,\n",
"# incidence and statistical analysis of the surnames of Britain, mainly post-1837, and\n",
"# primarily as a mass phenomenon.\"\n",
"# http://surnamestudies.org.uk/statistics/soundex.csv"
]
},
{
"cell_type": "code",
"execution_count": 81,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"['abberley',\n",
" 'abbey',\n",
" 'abbis',\n",
" 'abble',\n",
" 'abbot',\n",
" 'abbots',\n",
" 'abbott',\n",
" 'abbotts',\n",
" 'abbs']"
]
},
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"english_surnames = [surname.lower() for surname in english_surnames]\n",
"english_surnames[1:10]"
]
},
{
"cell_type": "code",
"execution_count": 82,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"def check_surname(nm):\n",
" if nm in english_surnames:\n",
" return 1.0\n",
" else:\n",
" return 0.0\n",
"\n",
"X_train['surname_english'] = X_train['surname'].apply(check_surname)"
]
},
{
"cell_type": "code",
"execution_count": 141,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAscAAAFgCAYAAABXB9TlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XeYHmW5+PFvOi10A+GHdM4tKCCsgHDoAkpTxHZCFQEb\nB2lyFASREjoRESGUiDSBgKLSkSIQjiIsR6V5EwwSaUIQEkJMI/v7Y55N3ixbEtjdd3fz/VxXruy0\nZ+53Zt7nveeZZ2b6NTU1IUmSJAn61zsASZIkqacwOZYkSZIKk2NJkiSpMDmWJEmSCpNjSZIkqTA5\nliRJkoqB9Q5gURARPwK2KYPrAxOA6UATsEVmzmhjuWWBGzJzpw7KPwjYPTM/23lRL7gFjbOV5b4C\nnAj8JTP3qBk/AJgFPA7ModpO/cr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vzwYbbMD3vve9ua0iW221FQ8++CC33XYbp59+Ottvvz1rr70266yzDpMnT2bQoEG8+OKL\nTJo0iTPOOIP11luPa665hrvuuovp06ez3HLLccEFF3DzzTdz3333MX36dCZNmsR+++3HPffcw/jx\n4/nOd77DDjvswO23384VV1zBgAEDaGho4KijjqrHrpHUx7Wsf3fZZRcaGhqsf61/pYVmn+NOdMMN\nN7D88stz1VVX8ZOf/ISTTjoJgKlTp7LHHntw1VVXMWzYMB544AHuueceJk+ezNixYxk5ciT//Oc/\n6ddv/je79uvXj4kTJzJ58mRGjx7Nueeey+zZswGYNm0aRx99ND//+c+ZMmUKTz311HzL/upXv+L7\n3/8+1113HWuvvTbvvPNOm3G/8sorjBo1iu9+97sArLrqqowZM4Z9992X66+/HoA33niDK664guuv\nv55Zs2bx+OOPA/D2229zySWXcPDBB3PddddxwQUXcPLJJ/PLX/6SyZMnc8EFF3DFFVdwzTXX8Mor\nr/D73/++cza2JNVoWf9efvnlgPWv9a+08Gw57kTPPPMMjY2N/PnPf6apqYl33nmHN954A4D11lsP\ngOHDhzNz5kxeeOEFPvrRjwKw/PLLs9Zaa7Va5jrrrMOXvvQljjrqKGbPns3+++8PwLLLLsvw4cMB\n+MAHPsD06dPnW+60007jpz/9KS+88AIbb7wxTU1N802vHV5++eVZeuml5w43x7ryyivz2GOPATB4\n8GCOOuooFl98cV599dW5PxLrr78+AEOHDp37GZZZZhlmzJjB888/z7/+9S8OOeQQmpqamDZtGhMn\nTmSLLbZYqO0qSR1pWf/OmTPH+tf6V3pPTI470VprrcXw4cP56le/yowZMxg9ejTLLrtsq/NGBL/+\n9a/Zf//9mTx5Ms8991yr8z3zzDO8/fbbXHzxxbz22muMGDGCbbfdtsNYxo4dy0knncTgwYM56KCD\n+NOf/sSQIUN47bXXAOZr6WitxaRWZnL33XczduxYpk+fzl577TW3cm85b60PfvCDDB8+nMsvv5wB\nAwZw0003za34Jakztax/TzzxROtf61/pPTE57kRf+tKXOOGEE9hvv/14++23GTFi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ynHbaaSy11FJdu2Ml9Xgt698dd9yRhoYG61/rX2mhdXWf442AJSPizoi4\nOyI2BzbJzAfL9NuBnYDNgHGZOTszpwDjgQ27OLYuMXXqVEaPHs2FF17IJZdcAsAJJ5zAiSeeyFVX\nXcWIESM47bTTAPj73//Oaaedxo033sgDDzzA66+/Pl9Zf/vb37jtttu49tprueaaa/jtb3/Lc889\nB8Cqq67KmDFj2Hfffbn++ut54403uOyyy7j++usZM2YM06dPf1dsza85veWWWxg1ahRXX301Sy89\n79Ln9ttvzxVXXMHWW2/NnXfeOd+yd999N7vsssvczzBlypT5ymz59x577MFPf/pTBgwYMN82ufji\niwEYP34855xzDldeeSU77bQTd9xxBwAvvPACp59+OqNHj+ZHP/oRxx13HDfccAO/+MUv5tuWV155\nJdtssw2XXnrpwu4iSX1UbV1z8803A9a/1r/SwuvqbhXTgLMzc0xErEuVDNe+qu8tYGlgKPO6XgBM\nBZbp4ti6xHrrrQdUb2CaMWMGAK+++ioRAcCmm27KqFGjAFh99dVZfPHFARg2bBgzZszg+OOP5/nn\nn2eFFVbgk5/8JC+99BIHHHAATU1NvPXWW0ycOHG+9ay88so89thjTJw4kXXXXZfBgwcD8NGPfrTN\nGM8++2zOOeccJk2axDbbbDN3/Prrrw9UlwAnTZo03zJf//rXueiiizjggANYeeWV2XDD+c9dWr6G\nfI011mh1m8ycOROAlVZaiVNOOYUll1ySf/7zn2yyySYAfPCDH2TJJZdk0KBBrLjiigwdOnS+cv/2\nt79x0kknATB79mxWX331Nj+npEVLa3WN9a/1r7Swujo5fgZ4FiAzx0fE61RdJ5oNBd4EplAlyS3H\nt6uxsbHd6assZLDvd31///vfeeWVV2hsbGTWrFnMmDGDxsZGllpqKW666SZWW201HnnkEZZddlke\nf/xxpk6dOrfMt956i8cff5zPfvazc8ubOHEiw4YN4/DDDwfg9ttvZ8aMGUyaNIlnn32WJZZYgvHj\nx/P666/zxhtv8NRTT/GHP/yBAQMG8NBDD9G/f3Vh4OWXX567vocffphrr72W/f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6ibJKsnWGOMt\nyXNV3fc112OMx0yjhrseeTwlefjkfo4q/JqNr0tVbSc5S7KT5LpHVifzlPdrzfW+nCe5+nCf9Ybr\nYjn05GXSk5dJT/4Gx0cDAEDz5RgAAJpwDAAATTgGAIAmHAMAQBOOAQCgCccAANCEYwAAaMIxAAC0\nd9F8s6iy9XOzAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x11a847b50>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, (axis1, axis2) = plt.subplots(1, 2, figsize=(10, 5))\n",
"\n",
"df_ = X_train['Survived'].groupby([X_train['Pclass'], X_train['surname_english']])\n",
"\n",
"# Count survived by English surname\n",
"\n",
"N = 3\n",
"ind = np.arange(N) # the x locations for the groups\n",
"width = 0.35 # the total width of the bars\n",
"\n",
"rects1 = axis1.bar(ind, df_.count()[:, 1], width, color=colors[0], lw=0.0)\n",
"rects2 = axis1.bar(ind+width, df_.count()[:, 0], width, color=colors[4], lw=0.0)\n",
"\n",
"axis1.set_ylim(0, 550)\n",
"axis1.set_ylabel('Count')\n",
"axis1.set_title('Total count of English surname by Pclass')\n",
"axis1.set_xticks(ind + width)\n",
"axis1.set_xticklabels(('Pclass 1', 'Pclass 2', 'Pclass 3'))\n",
"\n",
"axis1.legend((rects1[0], rects2[0]), ('english surname', 'non-english surname'), loc=2)\n",
"\n",
"\n",
"# Avg survived by English surname in class 3\n",
"\n",
"N = 3\n",
"ind = np.arange(N) # the x locations for the groups\n",
"width = 0.4 # the total width of the bars\n",
"\n",
"rects1 = axis2.bar(ind, df_.mean()[:, 1], width, color=colors[0], lw=0.0)\n",
"rects2 = axis2.bar(ind+width, df_.mean()[:, 0], width, color=colors[4], lw=0.0)\n",
"\n",
"axis2.set_ylim(0, 1)\n",
"axis2.set_ylabel('mean(Survived)')\n",
"axis2.set_title('Average survived by English surname by Pclass')\n",
"axis2.set_xticks(ind + width)\n",
"axis2.set_xticklabels(('Pclass 1', 'Pclass 2', 'Pclass 3'))\n",
"\n",
"axis2.legend((rects1[0], rects2[0]), ('english surname', 'non-english surname'), loc=2)\n",
"\n",
"plt.tight_layout()\n",
"\n",
"plt.savefig('plots/surname_by_class.png')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"More people in class 3 had non-English surnames. However, unlike the other classes, they had a slightly lower survival rate than people with English surnames."
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"features = ['surname_english']"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[('RandomForestClassifier', 0.61616490890978648),\n",
" ('LogisticRegression', 0.61616490890978648),\n",
" ('SVC', 0.61616490890978648),\n",
" ('GaussianNB', 0.61616490890978648),\n",
" ('KNeighborsClassifier', 0.53541668218202298)]"
]
},
"execution_count": 88,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"X = DataFrame(X_train[features])\n",
"y = y_train\n",
"scores = check_classifiers(X, y)\n",
"scores"
]
},
{
"cell_type": "code",
"execution_count": 89,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Features</th>\n",
" <th>Coefficient Estimate</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>surname_english</td>\n",
" <td>0.287834</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Features Coefficient Estimate\n",
"0 surname_english 0.287834"
]
},
"execution_count": 89,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get Correlation Coefficient for each feature using Logistic Regression\n",
"coeff_df = DataFrame(X.columns)\n",
"coeff_df.columns = ['Features']\n",
"classifier = LogisticRegression()\n",
"coeff_df[\"Coefficient Estimate\"] = pd.Series(classifier.fit(X, y).coef_[0])\n",
"\n",
"# preview\n",
"coeff_df"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"Having an english surname is not a strong predictor of survival."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment