Created
October 22, 2015 13:32
-
-
Save subpath/9bf22088e5b940e4d6d5 to your computer and use it in GitHub Desktop.
Classification in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Example of Machine Learning classifications in Python" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"So for the classification example I choose \n", | |
"[Thyroid Disease (New Thyroid) data set](http://sci2s.ugr.es/keel/dataset.php?cod=66).\n", | |
"This data set is one of the several databases about Thyroid avalaible at the UCI repository. \n", | |
"The task was to detect is a given patient is normal (1) or suffers from hyperthyroidism (2) or hypothyroidism (3)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"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>T3resin</th>\n", | |
" <th>Thyroxin</th>\n", | |
" <th>Triiodothyronine</th>\n", | |
" <th>Thyroidstimulating</th>\n", | |
" <th>TSH_value</th>\n", | |
" <th>Class</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>count</th>\n", | |
" <td>215.000000</td>\n", | |
" <td>215.000000</td>\n", | |
" <td>215.000000</td>\n", | |
" <td>215.000000</td>\n", | |
" <td>215.000000</td>\n", | |
" <td>215.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>mean</th>\n", | |
" <td>109.595349</td>\n", | |
" <td>9.804651</td>\n", | |
" <td>2.050233</td>\n", | |
" <td>2.880000</td>\n", | |
" <td>4.199070</td>\n", | |
" <td>1.441860</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>std</th>\n", | |
" <td>13.145447</td>\n", | |
" <td>4.697362</td>\n", | |
" <td>1.419486</td>\n", | |
" <td>6.118031</td>\n", | |
" <td>8.070519</td>\n", | |
" <td>0.726737</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>min</th>\n", | |
" <td>65.000000</td>\n", | |
" <td>0.500000</td>\n", | |
" <td>0.200000</td>\n", | |
" <td>0.100000</td>\n", | |
" <td>-0.700000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25%</th>\n", | |
" <td>103.000000</td>\n", | |
" <td>7.100000</td>\n", | |
" <td>1.350000</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.550000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50%</th>\n", | |
" <td>110.000000</td>\n", | |
" <td>9.200000</td>\n", | |
" <td>1.700000</td>\n", | |
" <td>1.300000</td>\n", | |
" <td>2.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>75%</th>\n", | |
" <td>117.500000</td>\n", | |
" <td>11.300000</td>\n", | |
" <td>2.200000</td>\n", | |
" <td>1.700000</td>\n", | |
" <td>4.100000</td>\n", | |
" <td>2.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>max</th>\n", | |
" <td>144.000000</td>\n", | |
" <td>25.300000</td>\n", | |
" <td>10.000000</td>\n", | |
" <td>56.400000</td>\n", | |
" <td>56.300000</td>\n", | |
" <td>3.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" T3resin Thyroxin Triiodothyronine Thyroidstimulating \\\n", | |
"count 215.000000 215.000000 215.000000 215.000000 \n", | |
"mean 109.595349 9.804651 2.050233 2.880000 \n", | |
"std 13.145447 4.697362 1.419486 6.118031 \n", | |
"min 65.000000 0.500000 0.200000 0.100000 \n", | |
"25% 103.000000 7.100000 1.350000 1.000000 \n", | |
"50% 110.000000 9.200000 1.700000 1.300000 \n", | |
"75% 117.500000 11.300000 2.200000 1.700000 \n", | |
"max 144.000000 25.300000 10.000000 56.400000 \n", | |
"\n", | |
" TSH_value Class \n", | |
"count 215.000000 215.000000 \n", | |
"mean 4.199070 1.441860 \n", | |
"std 8.070519 0.726737 \n", | |
"min -0.700000 1.000000 \n", | |
"25% 0.550000 1.000000 \n", | |
"50% 2.000000 1.000000 \n", | |
"75% 4.100000 2.000000 \n", | |
"max 56.300000 3.000000 " | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"#import libraries for dataset\n", | |
"import numpy as np\n", | |
"import pandas as pd\n", | |
"\n", | |
"#import machine learning libraries\n", | |
"from sklearn.cross_validation import train_test_split\n", | |
"from sklearn.neighbors import KNeighborsClassifier\n", | |
"from sklearn.linear_model import LogisticRegression\n", | |
"from sklearn import metrics, tree\n", | |
"\n", | |
"# Plot imports\n", | |
"import seaborn as sns\n", | |
"sns.set_style('whitegrid')\n", | |
"%matplotlib inline\n", | |
"\n", | |
"# import dataset\n", | |
"\n", | |
"df = pd.read_csv('Thyroid Disease (New Thyroid) data set.csv')\n", | |
"\n", | |
"# Look at the data\n", | |
"df.describe()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"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>T3resin</th>\n", | |
" <th>Thyroxin</th>\n", | |
" <th>Triiodothyronine</th>\n", | |
" <th>Thyroidstimulating</th>\n", | |
" <th>TSH_value</th>\n", | |
" <th>Class</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>107</td>\n", | |
" <td>10.1</td>\n", | |
" <td>2.2</td>\n", | |
" <td>0.9</td>\n", | |
" <td>2.7</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>113</td>\n", | |
" <td>9.9</td>\n", | |
" <td>3.1</td>\n", | |
" <td>2.0</td>\n", | |
" <td>5.9</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>127</td>\n", | |
" <td>12.9</td>\n", | |
" <td>2.4</td>\n", | |
" <td>1.4</td>\n", | |
" <td>0.6</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>109</td>\n", | |
" <td>5.3</td>\n", | |
" <td>1.6</td>\n", | |
" <td>1.4</td>\n", | |
" <td>1.5</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>105</td>\n", | |
" <td>7.3</td>\n", | |
" <td>1.5</td>\n", | |
" <td>1.5</td>\n", | |
" <td>-0.1</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" T3resin Thyroxin Triiodothyronine Thyroidstimulating TSH_value Class\n", | |
"0 107 10.1 2.2 0.9 2.7 1\n", | |
"1 113 9.9 3.1 2.0 5.9 1\n", | |
"2 127 12.9 2.4 1.4 0.6 1\n", | |
"3 109 5.3 1.6 1.4 1.5 1\n", | |
"4 105 7.3 1.5 1.5 -0.1 1" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"\n", | |
"df.head()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"So dataset looks good, no missing values or anomalies.\n", | |
"Lets visualize our dataset." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.axes._subplots.AxesSubplot at 0x1963b438>" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAERCAYAAACZystaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xt8VNW5+P/P2jOTC2QSCEIY5B5lcwcNEkfaeqlgPVqT\nonx/lhrES+3xq/Z6etF6w9bTntPvqZ5qr4JigpzTg4SAWkUqVltORIkaQHCD4SYwAkJIJpDLzOz1\n+2NPQoDcIDOTkDzv14uXycxk7zVjsp+91nrWs5TWGiGEEL2b0dUNEEII0fUkGAghhJBgIIQQQoKB\nEEIIJBgIIYRAgoEQQgjAHe8TmKaZC/zSsqwrTdMcBDwD9AMUMM+yrF2maX4TuAsIAz+3LOuVeLdL\nCCHECXHtGZim+SOci39y9KF/B4osy7oceBiYaJrmYOA+4DLgGuAXpmkmxbNdQgghThbvYaJPgNk4\nvQBwLvjDTNNcA3wDWAtMB9ZZlhWyLKs6+jOT49wuIYQQzcQ1GFiWVYwz9NNoJHDEsqyZwB7gx4AX\nqGr2miCQEc92CSGEOFmiJ5APA6uiX78ETAOqcQJCIy9QmeB2CSFErxb3CeRT/AO4DlgCXA5sBt4F\nHjdNMxlIAcZFH29VWVmZFFQSQoizkJOTo1p6PFHBoPHi/QNgoWmadwNHgbmWZVWZpvkb4O84PZUH\nLMtqaO+AOTk5cWusEEL0RGVlZa0+p87FqqVlZWVagoEQQpyZsrKyVnsGsuhMCCGEBAMhhBASDIQQ\nQiDBQAghBBIMhBBCIMFACCEEiV90JoQQvcbGjRt58sknCYVChEIh7r33Xl555RVuvvlmpkyZ0tXN\nO4kEAyGEiIPKykoWLFjAM888Q2ZmJocPH+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bvRqP8NnqWjN7Lx5k7Lv4qxWb2RQl\nNQiqTriJgqAlc4FPmFlPM3sHHqf/3RQPV/wWmwZUjfhLVHomF9A83M1UigOA5yTdhL8n4HjaDvsc\nBBUjjEEQZEgj+/n4i1gW4mGhRfHwyI8DB5vZdcBk4Dnc1bMQfxvaXEq/K/cBPFz6YtzgzMFfkhQE\nW4RYTRQEQRDEzCAIgiAIYxAEQRAQxiAIgiAgjEEQBEFAGIMgCIKAMAZBEAQBYQyCIAgCwhgEQRAE\nwH8B9e2Py8CYgUwAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x191a6d30>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"dataF = pd.melt(df, \"Class\", var_name=\"criteria\")\n", | |
"\n", | |
"sns.stripplot(x=\"criteria\", y=\"value\", hue=\"Class\", data=dataF,\n", | |
" jitter=True, edgecolor=\"gray\",size = 6)\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"##Machine Learning part" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"First you need to reshape your data, so it become vectors like that:\n", | |
"[x1,x2,x,3], [y1]. \n", | |
"For each features (x1,x2...xn) there own label (y).\n", | |
"It's mean that for each T3resin, Thyroxin, Triiodothyronine, Thyroidstimulating, TSH_value values you should have class.\n", | |
"And I did it with following code." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"i=0\n", | |
"x={}\n", | |
"while i<len(df['Class']):\n", | |
" x[i]=[df['T3resin'][i], df['Thyroxin'][i], df['Triiodothyronine'][i], df['Thyroidstimulating'][i],df['TSH_value'][i]] \n", | |
" i+=1\n", | |
"i=0\n", | |
"X=[]\n", | |
"while i<len(df['Class']):\n", | |
" X.append(x[i])\n", | |
" i+=1 " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
" T3resin Thyroxin Triiodothyronine Thyroidstimulating TSH_value Class\n", | |
"0 107 10.1 2.2 0.9 2.7 1\n", | |
"1 113 9.9 3.1 2.0 5.9 1\n", | |
"2 127 12.9 2.4 1.4 0.6 1\n", | |
"3 109 5.3 1.6 1.4 1.5 1\n", | |
"4 105 7.3 1.5 1.5 -0.1 1\n", | |
"5 105 6.1 2.1 1.4 7.0 1\n", | |
"6 110 10.4 1.6 1.6 2.7 1\n", | |
"7 114 9.9 2.4 1.5 5.7 1\n", | |
"8 106 9.4 2.2 1.5 0.0 1\n", | |
"9 107 13.0 1.1 0.9 3.1 1\n" | |
] | |
} | |
], | |
"source": [ | |
"#data set before:\n", | |
"print df[:10]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[[107, 10.1, 2.2000000000000002, 0.90000000000000002, 2.7000000000000002], [113, 9.9000000000000004, 3.1000000000000001, 2.0, 5.9000000000000004], [127, 12.9, 2.3999999999999999, 1.3999999999999999, 0.59999999999999998], [109, 5.2999999999999998, 1.6000000000000001, 1.3999999999999999, 1.5], [105, 7.2999999999999998, 1.5, 1.5, -0.10000000000000001], [105, 6.0999999999999996, 2.1000000000000001, 1.3999999999999999, 7.0], [110, 10.4, 1.6000000000000001, 1.6000000000000001, 2.7000000000000002], [114, 9.9000000000000004, 2.3999999999999999, 1.5, 5.7000000000000002], [106, 9.4000000000000004, 2.2000000000000002, 1.5, 0.0], [107, 13.0, 1.1000000000000001, 0.90000000000000002, 3.1000000000000001]]\n" | |
] | |
} | |
], | |
"source": [ | |
"#data set after\n", | |
"\n", | |
"print(X[:10])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"So another words I create a matrix where n-row contsins fearures for n-label Class.\n", | |
"I'm pretty sure there are much better ways to do it, but this is how I figured out solution myself :)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"# makes an array of labels\n", | |
"\n", | |
"Y = np.array(df.Class)\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Now splitting our data into data for model training and model testing" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"X_train, X_test, Y_train, Y_test = train_test_split( X, Y, test_size=None, random_state=42)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"###Finaly Machine learning part" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"I will use 3 differen techiques:\n", | |
"kNeighbors, Logistic Regression, Decision Tree.\n", | |
"\n", | |
"Every time the same sequence: \n", | |
"1. import classifier\n", | |
"2. Fit the data\n", | |
"3. Make a prediction\n", | |
"4. Score your model" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"#Import the kNeighbors Classifiers \n", | |
"knn = KNeighborsClassifier(n_neighbors = 3)\n", | |
"\n", | |
"# Fit the data\n", | |
"knn.fit(X_train,Y_train)\n", | |
"\n", | |
"# Run a prediction\n", | |
"Y_pred = knn.predict(X_test)\n", | |
"Y_test = np.array(Y_test)\n", | |
"\n", | |
"# Check Accuracy against the Testing Set\n", | |
"knn_result = metrics.accuracy_score(Y_test,Y_pred)\n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Same thing with other models" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# Create a Logistic Regression Class object\n", | |
"logreg = LogisticRegression()\n", | |
"logreg.fit(X_train, Y_train)\n", | |
"\n", | |
"\n", | |
"# Prediction from X_test\n", | |
"Y_pred = logreg.predict(X_test)\n", | |
"\n", | |
"#Check accuracy\n", | |
"logreg_results = metrics.accuracy_score(Y_test,Y_pred)\n", | |
"\n", | |
"\n", | |
"clf = tree.DecisionTreeClassifier()\n", | |
"clf = clf.fit(X_train, Y_train)\n", | |
"\n", | |
"Y_pred = clf.predict(X_test)\n", | |
"#Check accuracy\n", | |
"clf_results = metrics.accuracy_score(Y_test,Y_pred)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[0.96296296296296291, 0.94444444444444442, 0.98148148148148151]\n" | |
] | |
} | |
], | |
"source": [ | |
"#Check which model is better\n", | |
"overall_results = [knn_result,logreg_results,clf_results]\n", | |
"\n", | |
"print(overall_results)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"So it looks like Decision Tree most acuratly decribe our data.\n", | |
"So if you have parameters of patient such us our features, you can determine type of Thyroid he have with 98% accuracy." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Was noticed that results of models predicrion depent on how you split your data into training and test sets. For example if random_state in train_test_split function will be different best result could be obtain from other model and not from Decision Tree.\n", | |
"\n", | |
"I will learn about next time. " | |
] | |
} | |
], | |
"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.10" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment