diff --git a/Default Prediction.ipynb b/Default Prediction.ipynb index e3aef97..bbd5d42 100644 --- a/Default Prediction.ipynb +++ b/Default Prediction.ipynb @@ -402,49 +402,6 @@ "1 - train_y.mean()" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "SVM" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Finished training 1\n", - "Finished training 0.1\n", - "Finished training 0.01\n", - "Finished training 10\n" - ] - } - ], - "source": [ - "from itertools import product\n", - "import pickle\n", - "from sklearn.linear_model import LogisticRegression\n", - "\n", - "for C in [1, .1, .01, 10]:\n", - " lr = LogisticRegression(C=C)\n", - "\n", - " lr.fit(train_x, train_y)\n", - " with open('lr_{}.pickle'.format(C), 'w') as handle:\n", - " pickle.dump(lr, handle)\n", - " \n", - " del(lr)\n", - " print(\"Finished training {}\".format(C))\n", - " #print(\"C: {}; gamma: {}; score: {}\".format(\n", - " # C, gamma, svc.score(valid_x, valid_y)))" - ] - }, { "cell_type": "code", "execution_count": 3, @@ -456,36 +413,36 @@ "name": "stderr", "output_type": "stream", "text": [ - "/usr/lib/python2.7/dist-packages/sklearn/discriminant_analysis.py:387: UserWarning: Variables are collinear.\n", - " warnings.warn(\"Variables are collinear.\")\n" + "/usr/lib/python2.7/dist-packages/sklearn/linear_model/sag.py:267: ConvergenceWarning: The max_iter was reached which means the coef_ did not converge\n", + " \"the coef_ did not converge\", ConvergenceWarning)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Finished training 342\n", - "Finished training 250\n", - "Finished training 150\n", - "Finished training 75\n" + "Finished training 1\n", + "Finished training 0.1\n", + "Finished training 0.01\n", + "Finished training 0.001\n", + "Finished training 0.0001\n" ] } ], "source": [ - "from sklearn.discriminant_analysis import LinearDiscriminantAnalysis\n", + "from itertools import product\n", "import pickle\n", + "from sklearn.linear_model import LogisticRegression\n", "\n", - "# Number of columns is 342\n", - "for n_components in [342, 250, 150, 75]:\n", - " lda = LinearDiscriminantAnalysis(n_components=n_components)\n", - " lda.fit(train_x, train_y)\n", - " with open('lda_{}.pickle'.format(n_components), 'w') as handle:\n", - " pickle.dump(lda, handle)\n", - " \n", - " del(lda)\n", - " print(\"Finished training {}\".format(n_components))\n", - " #print(\"N_components: {}; score: {}\".format(\n", - " # n_components, lda.score(valid_x, valid_y)))" + "for C in [1, .1, .01, .001, .0001]:\n", + " lr = LogisticRegression(C=C, solver='sag', max_iter=100)\n", + "\n", + " lr.fit(train_x, train_y)\n", + " with open('lr_{}.pickle'.format(C), 'w') as handle:\n", + " pickle.dump(lr, handle)\n", + " \n", + " del(lr)\n", + " print(\"Finished training {}\".format(C))" ] }, { @@ -494,36 +451,76 @@ "metadata": { "collapsed": false }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Finished training 342\n", + "Finished training 150\n", + "Finished training 20\n", + "Finished training 5\n", + "Finished training 1\n" + ] + } + ], + "source": [ + "from sklearn.discriminant_analysis import LinearDiscriminantAnalysis\n", + "import pickle\n", + "\n", + "# Number of columns is 342\n", + "for n_components in [342, 150, 20, 5, 1]:\n", + " lda = LinearDiscriminantAnalysis(n_components=n_components,\n", + " solver='lsqr')\n", + " lda.fit(train_x, train_y)\n", + " with open('lda_{}.pickle'.format(n_components), 'w') as handle:\n", + " pickle.dump(lda, handle)\n", + " \n", + " del(lda)\n", + " print(\"Finished training {}\".format(n_components))" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Finished training 10\n", - "Finished training 50\n", - "Finished training 75\n", - "Finished training 100\n" + "Finished training 5\n", + "Finished training 3\n", + "Finished training 1\n" ] } ], "source": [ "from sklearn.ensemble import RandomForestClassifier\n", "\n", - "for n_estimators in [10, 50, 75, 100]:\n", + "for n_estimators in [10, 5, 3, 1]:\n", " rf = RandomForestClassifier(n_estimators=n_estimators)\n", " rf.fit(train_x, train_y)\n", " with open('rf_{}.pickle'.format(n_estimators), 'w') as handle:\n", " pickle.dump(rf, handle)\n", " \n", " del(rf) \n", - " print(\"Finished training {}\".format(n_estimators))\n", - " #print(\"N_estimators: {}; score: {}\".format(\n", - " # n_estimators, score(valid_x, valid_y)))" + " print(\"Finished training {}\".format(n_estimators))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Evaluating the Results" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": { "collapsed": false }, @@ -538,7 +535,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 2, "metadata": { "collapsed": false }, @@ -550,13 +547,14 @@ "Logistic Regression, C=1; Score: 0.89904155569\n", "Logistic Regression, C=0.1; Score: 0.89904155569\n", "Logistic Regression, C=0.01; Score: 0.89904155569\n", - "Logistic Regression, C=10; Score: 0.89904155569\n" + "Logistic Regression, C=0.001; Score: 0.89904155569\n", + "Logistic Regression, C=0.0001; Score: 0.89904155569\n" ] } ], "source": [ "import pickle\n", - "lr_params = [1, .1, .01, 10]\n", + "lr_params = [1, .1, .01, .001, .0001]\n", "\n", "for C in lr_params:\n", " with open('lr_{}.pickle'.format(C)) as handle:\n", @@ -571,7 +569,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "metadata": { "collapsed": false }, @@ -580,15 +578,16 @@ "name": "stdout", "output_type": "stream", "text": [ - "Linear Discriminant Analysis, components=342; Score: 0.897066249493\n", - "Linear Discriminant Analysis, components=250; Score: 0.897066249493\n", - "Linear Discriminant Analysis, components=150; Score: 0.897066249493\n", - "Linear Discriminant Analysis, components=75; Score: 0.897066249493\n" + "Linear Discriminant Analysis, components=342; Score: 0.896526629504\n", + "Linear Discriminant Analysis, components=150; Score: 0.896526629504\n", + "Linear Discriminant Analysis, components=20; Score: 0.896526629504\n", + "Linear Discriminant Analysis, components=5; Score: 0.896526629504\n", + "Linear Discriminant Analysis, components=1; Score: 0.896526629504\n" ] } ], "source": [ - "lda_components = [342, 250, 150, 75]\n", + "lda_components = [342, 150, 20, 5, 1]\n", "\n", "for n_components in lda_components:\n", " with open('lda_{}.pickle'.format(n_components)) as handle:\n", @@ -603,7 +602,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "metadata": { "collapsed": false }, @@ -612,15 +611,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "Random Forests, estimators: 10; Score: 0.934468350545\n", - "Random Forests, estimators: 50; Score: 0.936468409953\n", - "Random Forests, estimators: 75; Score: 0.936324841332\n", - "Random Forests, estimators: 100; Score: 0.936740695268\n" + "Random Forests, estimators: 10; Score: 0.934577264671\n", + "Random Forests, estimators: 5; Score: 0.93108211135\n", + "Random Forests, estimators: 3; Score: 0.926601780251\n", + "Random Forests, estimators: 1; Score: 0.915037080309\n" ] } ], "source": [ - "rf_estimators = [10, 50, 75, 100]\n", + "rf_estimators = [10, 5, 3, 1]\n", "\n", "for estimators in rf_estimators:\n", " with open('rf_{}.pickle'.format(estimators)) as handle:\n", @@ -632,6 +631,236 @@ " estimators, score\n", " ))" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Column Significance" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", + "train = pd.read_csv('processed_train.csv', index_col=0).dropna(axis=1)\n", + "valid = pd.read_csv('processed_validate.csv', index_col=0).dropna(axis=1)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "activity_columns = ('Activity', list(filter(\n", + " lambda x: 'activity' in x,\n", + " train.columns)))\n", + "dcurrency_columns = ('Disbursal Currency', list(filter(\n", + " lambda x: 'disbursal_currency' in x,\n", + " train.columns)))\n", + "country_columns = ('Country', list(filter(\n", + " lambda x: 'country' in x,\n", + " train.columns)))\n", + "sector_columns = ('Sector', list(filter(\n", + " lambda x: 'sector' in x,\n", + " train.columns)))\n", + "repayment_columns = ('Repayment', list(filter(\n", + " lambda x: 'repayment' in x,\n", + " train.columns)))\n", + "nborrowers_columns = ('Number of Borrowers', ['num_borrowers'])\n", + "gratio_columns = ('Gender Ratio', ['gender_ratio'])\n", + "nlenders_columns = ('Lender Count', ['lender_count'])\n", + "damount_columns = ('Disbursal Amount', ['disbursal_amount'])\n", + "\n", + "colgroups = [\n", + " activity_columns, dcurrency_columns, country_columns,\n", + " sector_columns, repayment_columns, nborrowers_columns,\n", + " gratio_columns, nlenders_columns, damount_columns\n", + "]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Removing columns: Activity\n", + "Score: 93.569\n", + "\n", + "Removing columns: Disbursal Currency\n", + "Score: 93.458\n", + "\n", + "Removing columns: Country\n", + "Score: 93.381\n", + "\n", + "Removing columns: Sector\n", + "Score: 93.628\n", + "\n", + "Removing columns: Repayment\n", + "Score: 93.180\n", + "\n", + "Removing columns: Number of Borrowers\n", + "Score: 93.450\n", + "\n", + "Removing columns: Gender Ratio\n", + "Score: 93.422\n", + "\n", + "Removing columns: Lender Count\n", + "Score: 90.606\n", + "\n", + "Removing columns: Disbursal Amount\n", + "Score: 92.342\n", + "\n" + ] + } + ], + "source": [ + "from sklearn.ensemble import RandomForestClassifier\n", + "\n", + "def validate_column_group(train, valid, colgroup):\n", + " sub_group = train.drop(colgroup, axis=1)\n", + " train_x = sub_group.drop('bad_loan', axis=1)\n", + " train_y = sub_group['bad_loan']\n", + " \n", + " rf = RandomForestClassifier(n_estimators=10)\n", + " rf.fit(train_x, train_y)\n", + " \n", + " valid_subgroup = valid.drop(colgroup, axis=1)\n", + " valid_x = valid_subgroup.drop('bad_loan', axis=1)\n", + " valid_y = valid_subgroup['bad_loan']\n", + " score = rf.score(valid_x, valid_y)\n", + " \n", + " return score\n", + " \n", + "for name, colgroup in colgroups:\n", + " score = validate_column_group(train, valid, colgroup)\n", + " \n", + " print 'Removing columns: {}'.format(name)\n", + " print 'Score: {:.3f}'.format(score*100)\n", + " print" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAF5CAYAAADpvZJuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3XmYVNWd//H3t7obsKFYlAQRQZgYgaCi3W4EjAvKogE1\nJJMhGrPML4YokiBoVBxxARMjgsagcSYzGmNkJpEYWSUuMRpEiN3uQkyiRgUlGoEuFqHpOr8/zi36\ndlHVXVX0Us39vJ6nnq4699y6p05X9/3ec89izjlEREQkWmJtXQARERFpfQoAREREIkgBgIiISAQp\nABAREYkgBQAiIiIRpABAREQkghQAiIiIRJACABERkQhSACAiIhJBCgBEREQiKO8AwMxONrNFZrbe\nzJJmNj6HfU41syoz+9jMXjezrxVWXBEREWkOhbQAdAZeAC4GmlxIwMz6A0uAx4GhwO3Az8zszAKO\nLSIiIs3A9mUxIDNLAuc65xY1kudmYKxz7uhQ2gKgm3PurIIPLiIiIgVrjT4AJwGPpaWtAIa1wrFF\nREQkg9JWOMbBwMa0tI1AVzPr6Jzbmb6DmR0EjAbeAj5u8RKKiIjsPzoB/YEVzrl/ZsvUGgFAIUYD\nv2zrQoiIiLRj5wMPZNvYGgHA+0CvtLReQE2mq//AW/7H/cBgwNG793dYsuSnLVTExn3+85N47727\nAAMmAannYZOCn+nbsqXnur3+sx9//JdIJn+VNR+cDDzd5Ptk0/Bz5r9/Y+rf+zvk8llb09SpU5k3\nb16rHnN/kEu95f63U1zfiZak71thVG+5W7t2LRdccAHsOZdm1hoBwCpgbFraqCA9m6DZfzBQQSy2\nnC996SwqKipapIBN+eIXxzJ//gckk2PwH+UDYExarrH4uk7fNhb4e5Z9AAYFPzNvN1uy57MfeeTh\nvPTSRiBT38mllJWVUleXKmdDudRhw8+Z//6NqX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Z9npbHu+7I4+8mSTZ+3OUZciX6fPrlqZIHvQHI1JcnscH5r2c\nc2+kPXJqznbO1eCviE9MpQX32CtD2V7Dn+gPy3Cc9ftQ/pfwTfGZrMV/tnC5DgIGAq8GSR/g79uH\nHVtAOXbhW1JEJAsFACJFxDn3F+CXwH1mdp6Z9TezE8zsyqAfQK5uB640s3PMbCBwJ9A9dJyt+E6D\n88zsQjP7FzM71swmm9lXQ++TT6sCwPXARDO7zswGmdlRZnZFcMy/AouA/zKz4WY2FLgf3wdgUbD/\nk8AnzOyKoEyXAGPyLAPAW8DnzOyQIMgQkTQKAESKQ/h+9teB+/An6HX4XvXHAW/n8X63Ar8A7gWe\nAWqC96k/oHP/AdwIXIlvEViOvyXwZjhbHsfEOfcH4Ev4zn7PA48Bx4eyfB3fp2AxsBLf5H+2c64u\n2H8dcHHweAH/uW/JpwyBa4H+wN8AdQQUycAa9qMRERGRKFALgIiISAQpABCRnJnZK8HMg+mPGjOb\n2NblE5Hc6RaAiOQsmKgo07A8gI3OuXyGDIpIG1IAICIiEkG6BSAiIhJBCgBEREQiSAGAiIhIBCkA\nEBERiSAFACIiIhGkAEBERCSCFACIiIhE0P8H1E6XE3i3H2oAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline\n", + "train.groupby('lender_count')['bad_loan'].mean().plot(style='o');" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkUAAAFkCAYAAAAuZk/PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3XmYXXWd5/H3JwJB0EBjJMEWRKSNcaOhBEK3RJwIYWvo\nGVEspRu3oVFcJo7KtGM3ND5NCz4sokZBVGSxZhDa1gYkCiqgbJogDRKCo8HIkkgUEwQSlvzmj3Nu\nc3K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i/qYeCL\nwDZtNa8Erqu3sQT4cLdf+0iNG7A1cDXVLNsq4JfA52n7n5PxNm7rGK+ngb9t1AzL7yTV/wzNr3/3\nfw78Tbdf/0iMGfBC4AfAQ/V7ZBFVAHjOeB2z+rWcX//ePV7/Hn6HOhD12vvMD4SVJEnCc4okSZIA\nQ5EkSRJgKJIkSQIMRZIkSYChSJIkCTAUSZIkAYYiSZIkwFAkSZIEGIokSZIAQ5EkSRJgKJIkSQLg\n/wP64vtuq3uIGQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "train['lender_count'].plot(kind='hist', bins=200);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, want to get an idea of how well this model will perform in production:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "from sklearn.ensemble import RandomForestClassifier\n", + "import pickle\n", + "\n", + "train = pd.read_csv('processed_train.csv', index_col=0).dropna(axis=1)\n", + "valid = pd.read_csv('processed_validate.csv', index_col=0).dropna(axis=1)\n", + "\n", + "full = pd.concat((train, valid))\n", + "full_x = full.drop('bad_loan', axis=1)\n", + "full_y = full['bad_loan']\n", + "rf = RandomForestClassifier(n_estimators=10)\n", + "\n", + "rf.fit(full_x, full_y)\n", + "\n", + "with open('rf_validated.pickle', 'w') as handle:\n", + " pickle.dump(rf, handle)" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Test accuracy: 93.651%\n" + ] + } + ], + "source": [ + "import pandas as pd\n", + "import pickle\n", + "\n", + "test = pd.read_csv('processed_test.csv', index_col=0).dropna(axis=1)\n", + "test_x = test.drop('bad_loan', axis=1)\n", + "test_y = test['bad_loan']\n", + "with open('rf_validated.pickle') as handle:\n", + " rf = pickle.load(handle)\n", + " score = rf.score(test_x, test_y)\n", + " \n", + " print 'Test accuracy: {:.3f}%'.format(score*100)" + ] } ], "metadata": {