Created
January 9, 2018 08:25
-
-
Save p59082644/802d907d10b3cba4d6ab225716d9065d to your computer and use it in GitHub Desktop.
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": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"%matplotlib inline\n", | |
"import pandas as pd\n", | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"from sklearn import preprocessing" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"train = pd.read_csv('./train.csv')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"enc = preprocessing.LabelEncoder()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style>\n", | |
" .dataframe thead tr:only-child th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: left;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>age</th>\n", | |
" <th>workclass</th>\n", | |
" <th>fnlwgt</th>\n", | |
" <th>education</th>\n", | |
" <th>education_num</th>\n", | |
" <th>marital_status</th>\n", | |
" <th>occupation</th>\n", | |
" <th>relationship</th>\n", | |
" <th>race</th>\n", | |
" <th>sex</th>\n", | |
" <th>capital_gain</th>\n", | |
" <th>capital_loss</th>\n", | |
" <th>hours_per_week</th>\n", | |
" <th>native_country</th>\n", | |
" <th>income</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>39</td>\n", | |
" <td>State-gov</td>\n", | |
" <td>77516</td>\n", | |
" <td>Bachelors</td>\n", | |
" <td>13</td>\n", | |
" <td>Never-married</td>\n", | |
" <td>Adm-clerical</td>\n", | |
" <td>Not-in-family</td>\n", | |
" <td>White</td>\n", | |
" <td>Male</td>\n", | |
" <td>2174</td>\n", | |
" <td>0</td>\n", | |
" <td>40</td>\n", | |
" <td>United-States</td>\n", | |
" <td><=50K</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>50</td>\n", | |
" <td>Self-emp-not-inc</td>\n", | |
" <td>83311</td>\n", | |
" <td>Bachelors</td>\n", | |
" <td>13</td>\n", | |
" <td>Married-civ-spouse</td>\n", | |
" <td>Exec-managerial</td>\n", | |
" <td>Husband</td>\n", | |
" <td>White</td>\n", | |
" <td>Male</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>13</td>\n", | |
" <td>United-States</td>\n", | |
" <td><=50K</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>38</td>\n", | |
" <td>Private</td>\n", | |
" <td>215646</td>\n", | |
" <td>HS-grad</td>\n", | |
" <td>9</td>\n", | |
" <td>Divorced</td>\n", | |
" <td>Handlers-cleaners</td>\n", | |
" <td>Not-in-family</td>\n", | |
" <td>White</td>\n", | |
" <td>Male</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>40</td>\n", | |
" <td>United-States</td>\n", | |
" <td><=50K</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" age workclass fnlwgt education education_num \\\n", | |
"0 39 State-gov 77516 Bachelors 13 \n", | |
"1 50 Self-emp-not-inc 83311 Bachelors 13 \n", | |
"2 38 Private 215646 HS-grad 9 \n", | |
"\n", | |
" marital_status occupation relationship race sex \\\n", | |
"0 Never-married Adm-clerical Not-in-family White Male \n", | |
"1 Married-civ-spouse Exec-managerial Husband White Male \n", | |
"2 Divorced Handlers-cleaners Not-in-family White Male \n", | |
"\n", | |
" capital_gain capital_loss hours_per_week native_country income \n", | |
"0 2174 0 40 United-States <=50K \n", | |
"1 0 0 13 United-States <=50K \n", | |
"2 0 0 40 United-States <=50K " | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"train.head(3)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"train['income'] = enc.fit_transform(train['income'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"X_train =pd.read_csv('./X_train')\n", | |
"\n", | |
"y_train = train['income']" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"/usr/local/lib/python3.5/dist-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.\n", | |
" \"This module will be removed in 0.20.\", DeprecationWarning)\n" | |
] | |
} | |
], | |
"source": [ | |
"from xgboost import XGBClassifier\n", | |
"from sklearn.metrics import accuracy_score\n", | |
"\n", | |
"X_test = pd.read_csv('./X_test')\n", | |
"y_test = pd.read_csv('./correct_answer.csv')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"from sklearn.model_selection import GridSearchCV" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model = XGBClassifier()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"param_grid = dict({'max_depth':(6,7,8,9,10), \n", | |
" 'n_estimators':(list(range(200,300,1)))})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"grid = GridSearchCV(cv=10,estimator=model, param_grid=param_grid,refit=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": { | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Best: 0.874297 using {'max_depth': 6, 'n_estimators': 203}\n", | |
"0.874021 (0.003667) with: {'max_depth': 6, 'n_estimators': 200}\n", | |
"0.874113 (0.003366) with: {'max_depth': 6, 'n_estimators': 201}\n", | |
"0.874175 (0.003395) with: {'max_depth': 6, 'n_estimators': 202}\n", | |
"0.874298 (0.003439) with: {'max_depth': 6, 'n_estimators': 203}\n", | |
"0.873990 (0.003502) with: {'max_depth': 6, 'n_estimators': 204}\n", | |
"0.874052 (0.003351) with: {'max_depth': 6, 'n_estimators': 205}\n", | |
"0.874083 (0.003400) with: {'max_depth': 6, 'n_estimators': 206}\n", | |
"0.874113 (0.003462) with: {'max_depth': 6, 'n_estimators': 207}\n", | |
"0.873775 (0.003525) with: {'max_depth': 6, 'n_estimators': 208}\n", | |
"0.874021 (0.003723) with: {'max_depth': 6, 'n_estimators': 209}\n", | |
"0.873929 (0.003816) with: {'max_depth': 6, 'n_estimators': 210}\n", | |
"0.873929 (0.003798) with: {'max_depth': 6, 'n_estimators': 211}\n", | |
"0.874021 (0.003899) with: {'max_depth': 6, 'n_estimators': 212}\n", | |
"0.874052 (0.003840) with: {'max_depth': 6, 'n_estimators': 213}\n", | |
"0.874021 (0.003657) with: {'max_depth': 6, 'n_estimators': 214}\n", | |
"0.874113 (0.003628) with: {'max_depth': 6, 'n_estimators': 215}\n", | |
"0.873990 (0.003585) with: {'max_depth': 6, 'n_estimators': 216}\n", | |
"0.874021 (0.003379) with: {'max_depth': 6, 'n_estimators': 217}\n", | |
"0.873898 (0.003416) with: {'max_depth': 6, 'n_estimators': 218}\n", | |
"0.873990 (0.003443) with: {'max_depth': 6, 'n_estimators': 219}\n", | |
"0.873868 (0.003407) with: {'max_depth': 6, 'n_estimators': 220}\n", | |
"0.873714 (0.003412) with: {'max_depth': 6, 'n_estimators': 221}\n", | |
"0.873745 (0.003419) with: {'max_depth': 6, 'n_estimators': 222}\n", | |
"0.873806 (0.003346) with: {'max_depth': 6, 'n_estimators': 223}\n", | |
"0.873806 (0.003388) with: {'max_depth': 6, 'n_estimators': 224}\n", | |
"0.873775 (0.003423) with: {'max_depth': 6, 'n_estimators': 225}\n", | |
"0.873837 (0.003431) with: {'max_depth': 6, 'n_estimators': 226}\n", | |
"0.873745 (0.003503) with: {'max_depth': 6, 'n_estimators': 227}\n", | |
"0.873775 (0.003488) with: {'max_depth': 6, 'n_estimators': 228}\n", | |
"0.873591 (0.003511) with: {'max_depth': 6, 'n_estimators': 229}\n", | |
"0.873653 (0.003415) with: {'max_depth': 6, 'n_estimators': 230}\n", | |
"0.873622 (0.003462) with: {'max_depth': 6, 'n_estimators': 231}\n", | |
"0.873530 (0.003458) with: {'max_depth': 6, 'n_estimators': 232}\n", | |
"0.873407 (0.003370) with: {'max_depth': 6, 'n_estimators': 233}\n", | |
"0.873438 (0.003335) with: {'max_depth': 6, 'n_estimators': 234}\n", | |
"0.873407 (0.003320) with: {'max_depth': 6, 'n_estimators': 235}\n", | |
"0.873407 (0.003291) with: {'max_depth': 6, 'n_estimators': 236}\n", | |
"0.873468 (0.003451) with: {'max_depth': 6, 'n_estimators': 237}\n", | |
"0.873591 (0.003479) with: {'max_depth': 6, 'n_estimators': 238}\n", | |
"0.873591 (0.003476) with: {'max_depth': 6, 'n_estimators': 239}\n", | |
"0.873591 (0.003366) with: {'max_depth': 6, 'n_estimators': 240}\n", | |
"0.873591 (0.003465) with: {'max_depth': 6, 'n_estimators': 241}\n", | |
"0.873530 (0.003548) with: {'max_depth': 6, 'n_estimators': 242}\n", | |
"0.873622 (0.003619) with: {'max_depth': 6, 'n_estimators': 243}\n", | |
"0.873560 (0.003709) with: {'max_depth': 6, 'n_estimators': 244}\n", | |
"0.873468 (0.003792) with: {'max_depth': 6, 'n_estimators': 245}\n", | |
"0.873345 (0.003900) with: {'max_depth': 6, 'n_estimators': 246}\n", | |
"0.873407 (0.003880) with: {'max_depth': 6, 'n_estimators': 247}\n", | |
"0.873284 (0.003886) with: {'max_depth': 6, 'n_estimators': 248}\n", | |
"0.873376 (0.003972) with: {'max_depth': 6, 'n_estimators': 249}\n", | |
"0.873468 (0.003917) with: {'max_depth': 6, 'n_estimators': 250}\n", | |
"0.873438 (0.003906) with: {'max_depth': 6, 'n_estimators': 251}\n", | |
"0.873499 (0.003887) with: {'max_depth': 6, 'n_estimators': 252}\n", | |
"0.873376 (0.003842) with: {'max_depth': 6, 'n_estimators': 253}\n", | |
"0.873253 (0.003893) with: {'max_depth': 6, 'n_estimators': 254}\n", | |
"0.873284 (0.003847) with: {'max_depth': 6, 'n_estimators': 255}\n", | |
"0.873223 (0.003805) with: {'max_depth': 6, 'n_estimators': 256}\n", | |
"0.873223 (0.003740) with: {'max_depth': 6, 'n_estimators': 257}\n", | |
"0.873591 (0.003920) with: {'max_depth': 6, 'n_estimators': 258}\n", | |
"0.873407 (0.004045) with: {'max_depth': 6, 'n_estimators': 259}\n", | |
"0.873499 (0.004076) with: {'max_depth': 6, 'n_estimators': 260}\n", | |
"0.873407 (0.003981) with: {'max_depth': 6, 'n_estimators': 261}\n", | |
"0.873315 (0.004020) with: {'max_depth': 6, 'n_estimators': 262}\n", | |
"0.873253 (0.004017) with: {'max_depth': 6, 'n_estimators': 263}\n", | |
"0.873376 (0.004160) with: {'max_depth': 6, 'n_estimators': 264}\n", | |
"0.873315 (0.004257) with: {'max_depth': 6, 'n_estimators': 265}\n", | |
"0.873253 (0.004324) with: {'max_depth': 6, 'n_estimators': 266}\n", | |
"0.873376 (0.004527) with: {'max_depth': 6, 'n_estimators': 267}\n", | |
"0.873376 (0.004552) with: {'max_depth': 6, 'n_estimators': 268}\n", | |
"0.873253 (0.004468) with: {'max_depth': 6, 'n_estimators': 269}\n", | |
"0.873284 (0.004498) with: {'max_depth': 6, 'n_estimators': 270}\n", | |
"0.873192 (0.004343) with: {'max_depth': 6, 'n_estimators': 271}\n", | |
"0.873223 (0.004184) with: {'max_depth': 6, 'n_estimators': 272}\n", | |
"0.873376 (0.004135) with: {'max_depth': 6, 'n_estimators': 273}\n", | |
"0.873345 (0.004168) with: {'max_depth': 6, 'n_estimators': 274}\n", | |
"0.873284 (0.004120) with: {'max_depth': 6, 'n_estimators': 275}\n", | |
"0.873315 (0.004086) with: {'max_depth': 6, 'n_estimators': 276}\n", | |
"0.873315 (0.004099) with: {'max_depth': 6, 'n_estimators': 277}\n", | |
"0.873376 (0.003910) with: {'max_depth': 6, 'n_estimators': 278}\n", | |
"0.873376 (0.003834) with: {'max_depth': 6, 'n_estimators': 279}\n", | |
"0.873376 (0.003834) with: {'max_depth': 6, 'n_estimators': 280}\n", | |
"0.873376 (0.003829) with: {'max_depth': 6, 'n_estimators': 281}\n", | |
"0.873376 (0.003637) with: {'max_depth': 6, 'n_estimators': 282}\n", | |
"0.873407 (0.003608) with: {'max_depth': 6, 'n_estimators': 283}\n", | |
"0.873315 (0.003677) with: {'max_depth': 6, 'n_estimators': 284}\n", | |
"0.873161 (0.003627) with: {'max_depth': 6, 'n_estimators': 285}\n", | |
"0.873253 (0.003625) with: {'max_depth': 6, 'n_estimators': 286}\n", | |
"0.873284 (0.003648) with: {'max_depth': 6, 'n_estimators': 287}\n", | |
"0.873284 (0.003810) with: {'max_depth': 6, 'n_estimators': 288}\n", | |
"0.873253 (0.003681) with: {'max_depth': 6, 'n_estimators': 289}\n", | |
"0.873100 (0.003721) with: {'max_depth': 6, 'n_estimators': 290}\n", | |
"0.873130 (0.003864) with: {'max_depth': 6, 'n_estimators': 291}\n", | |
"0.873192 (0.003682) with: {'max_depth': 6, 'n_estimators': 292}\n", | |
"0.873223 (0.003646) with: {'max_depth': 6, 'n_estimators': 293}\n", | |
"0.873253 (0.003605) with: {'max_depth': 6, 'n_estimators': 294}\n", | |
"0.873223 (0.003501) with: {'max_depth': 6, 'n_estimators': 295}\n", | |
"0.873253 (0.003480) with: {'max_depth': 6, 'n_estimators': 296}\n", | |
"0.873131 (0.003503) with: {'max_depth': 6, 'n_estimators': 297}\n", | |
"0.872946 (0.003524) with: {'max_depth': 6, 'n_estimators': 298}\n", | |
"0.872946 (0.003616) with: {'max_depth': 6, 'n_estimators': 299}\n", | |
"0.872854 (0.004156) with: {'max_depth': 7, 'n_estimators': 200}\n", | |
"0.872946 (0.004210) with: {'max_depth': 7, 'n_estimators': 201}\n", | |
"0.872977 (0.004155) with: {'max_depth': 7, 'n_estimators': 202}\n", | |
"0.873161 (0.003914) with: {'max_depth': 7, 'n_estimators': 203}\n", | |
"0.873223 (0.003862) with: {'max_depth': 7, 'n_estimators': 204}\n", | |
"0.873346 (0.003784) with: {'max_depth': 7, 'n_estimators': 205}\n", | |
"0.873438 (0.003747) with: {'max_depth': 7, 'n_estimators': 206}\n", | |
"0.873438 (0.003749) with: {'max_depth': 7, 'n_estimators': 207}\n", | |
"0.873376 (0.003496) with: {'max_depth': 7, 'n_estimators': 208}\n", | |
"0.873376 (0.003496) with: {'max_depth': 7, 'n_estimators': 209}\n", | |
"0.873499 (0.003437) with: {'max_depth': 7, 'n_estimators': 210}\n", | |
"0.873438 (0.003492) with: {'max_depth': 7, 'n_estimators': 211}\n", | |
"0.873100 (0.003386) with: {'max_depth': 7, 'n_estimators': 212}\n", | |
"0.873161 (0.003445) with: {'max_depth': 7, 'n_estimators': 213}\n", | |
"0.873069 (0.003362) with: {'max_depth': 7, 'n_estimators': 214}\n", | |
"0.873315 (0.003635) with: {'max_depth': 7, 'n_estimators': 215}\n", | |
"0.873253 (0.003802) with: {'max_depth': 7, 'n_estimators': 216}\n", | |
"0.873161 (0.003963) with: {'max_depth': 7, 'n_estimators': 217}\n", | |
"0.873192 (0.003805) with: {'max_depth': 7, 'n_estimators': 218}\n", | |
"0.873038 (0.003824) with: {'max_depth': 7, 'n_estimators': 219}\n", | |
"0.873100 (0.003776) with: {'max_depth': 7, 'n_estimators': 220}\n", | |
"0.873131 (0.003745) with: {'max_depth': 7, 'n_estimators': 221}\n", | |
"0.873038 (0.003676) with: {'max_depth': 7, 'n_estimators': 222}\n", | |
"0.873131 (0.003778) with: {'max_depth': 7, 'n_estimators': 223}\n", | |
"0.873131 (0.003684) with: {'max_depth': 7, 'n_estimators': 224}\n", | |
"0.873161 (0.003576) with: {'max_depth': 7, 'n_estimators': 225}\n", | |
"0.873008 (0.003737) with: {'max_depth': 7, 'n_estimators': 226}\n", | |
"0.872854 (0.003703) with: {'max_depth': 7, 'n_estimators': 227}\n", | |
"0.872731 (0.003739) with: {'max_depth': 7, 'n_estimators': 228}\n", | |
"0.872762 (0.003792) with: {'max_depth': 7, 'n_estimators': 229}\n", | |
"0.872793 (0.003788) with: {'max_depth': 7, 'n_estimators': 230}\n", | |
"0.872854 (0.003700) with: {'max_depth': 7, 'n_estimators': 231}\n", | |
"0.872946 (0.003862) with: {'max_depth': 7, 'n_estimators': 232}\n", | |
"0.872885 (0.003786) with: {'max_depth': 7, 'n_estimators': 233}\n", | |
"0.872823 (0.003587) with: {'max_depth': 7, 'n_estimators': 234}\n", | |
"0.872731 (0.003615) with: {'max_depth': 7, 'n_estimators': 235}\n", | |
"0.872823 (0.003568) with: {'max_depth': 7, 'n_estimators': 236}\n", | |
"0.872885 (0.003439) with: {'max_depth': 7, 'n_estimators': 237}\n", | |
"0.872793 (0.003260) with: {'max_depth': 7, 'n_estimators': 238}\n", | |
"0.872854 (0.003252) with: {'max_depth': 7, 'n_estimators': 239}\n", | |
"0.872793 (0.003202) with: {'max_depth': 7, 'n_estimators': 240}\n", | |
"0.872762 (0.003244) with: {'max_depth': 7, 'n_estimators': 241}\n", | |
"0.872608 (0.003289) with: {'max_depth': 7, 'n_estimators': 242}\n", | |
"0.872455 (0.003310) with: {'max_depth': 7, 'n_estimators': 243}\n", | |
"0.872608 (0.003351) with: {'max_depth': 7, 'n_estimators': 244}\n", | |
"0.872670 (0.003550) with: {'max_depth': 7, 'n_estimators': 245}\n", | |
"0.872578 (0.003537) with: {'max_depth': 7, 'n_estimators': 246}\n", | |
"0.872608 (0.003614) with: {'max_depth': 7, 'n_estimators': 247}\n", | |
"0.872793 (0.003640) with: {'max_depth': 7, 'n_estimators': 248}\n", | |
"0.872731 (0.003726) with: {'max_depth': 7, 'n_estimators': 249}\n", | |
"0.872977 (0.003829) with: {'max_depth': 7, 'n_estimators': 250}\n", | |
"0.872977 (0.003821) with: {'max_depth': 7, 'n_estimators': 251}\n", | |
"0.872823 (0.003841) with: {'max_depth': 7, 'n_estimators': 252}\n", | |
"0.872762 (0.003825) with: {'max_depth': 7, 'n_estimators': 253}\n", | |
"0.872670 (0.003926) with: {'max_depth': 7, 'n_estimators': 254}\n", | |
"0.872578 (0.003821) with: {'max_depth': 7, 'n_estimators': 255}\n", | |
"0.872424 (0.003913) with: {'max_depth': 7, 'n_estimators': 256}\n", | |
"0.872486 (0.004038) with: {'max_depth': 7, 'n_estimators': 257}\n", | |
"0.872455 (0.004031) with: {'max_depth': 7, 'n_estimators': 258}\n", | |
"0.872363 (0.004179) with: {'max_depth': 7, 'n_estimators': 259}\n", | |
"0.872271 (0.004199) with: {'max_depth': 7, 'n_estimators': 260}\n", | |
"0.872486 (0.004128) with: {'max_depth': 7, 'n_estimators': 261}\n", | |
"0.872455 (0.004167) with: {'max_depth': 7, 'n_estimators': 262}\n", | |
"0.872393 (0.004136) with: {'max_depth': 7, 'n_estimators': 263}\n", | |
"0.872455 (0.004143) with: {'max_depth': 7, 'n_estimators': 264}\n", | |
"0.872424 (0.004131) with: {'max_depth': 7, 'n_estimators': 265}\n", | |
"0.872455 (0.004158) with: {'max_depth': 7, 'n_estimators': 266}\n", | |
"0.872332 (0.004165) with: {'max_depth': 7, 'n_estimators': 267}\n", | |
"0.872178 (0.004181) with: {'max_depth': 7, 'n_estimators': 268}\n", | |
"0.872056 (0.004284) with: {'max_depth': 7, 'n_estimators': 269}\n", | |
"0.872086 (0.004213) with: {'max_depth': 7, 'n_estimators': 270}\n", | |
"0.872056 (0.004138) with: {'max_depth': 7, 'n_estimators': 271}\n", | |
"0.871994 (0.004194) with: {'max_depth': 7, 'n_estimators': 272}\n", | |
"0.872117 (0.004217) with: {'max_depth': 7, 'n_estimators': 273}\n", | |
"0.872148 (0.004519) with: {'max_depth': 7, 'n_estimators': 274}\n", | |
"0.872148 (0.004366) with: {'max_depth': 7, 'n_estimators': 275}\n", | |
"0.872148 (0.004407) with: {'max_depth': 7, 'n_estimators': 276}\n", | |
"0.872117 (0.004323) with: {'max_depth': 7, 'n_estimators': 277}\n", | |
"0.872117 (0.004270) with: {'max_depth': 7, 'n_estimators': 278}\n", | |
"0.871994 (0.004248) with: {'max_depth': 7, 'n_estimators': 279}\n", | |
"0.872025 (0.004177) with: {'max_depth': 7, 'n_estimators': 280}\n", | |
"0.872056 (0.004142) with: {'max_depth': 7, 'n_estimators': 281}\n", | |
"0.872117 (0.004204) with: {'max_depth': 7, 'n_estimators': 282}\n", | |
"0.872178 (0.004232) with: {'max_depth': 7, 'n_estimators': 283}\n", | |
"0.872117 (0.004110) with: {'max_depth': 7, 'n_estimators': 284}\n", | |
"0.872025 (0.004142) with: {'max_depth': 7, 'n_estimators': 285}\n", | |
"0.871902 (0.004107) with: {'max_depth': 7, 'n_estimators': 286}\n", | |
"0.871841 (0.003864) with: {'max_depth': 7, 'n_estimators': 287}\n", | |
"0.871779 (0.003840) with: {'max_depth': 7, 'n_estimators': 288}\n", | |
"0.871687 (0.003923) with: {'max_depth': 7, 'n_estimators': 289}\n", | |
"0.871749 (0.003953) with: {'max_depth': 7, 'n_estimators': 290}\n", | |
"0.871595 (0.003989) with: {'max_depth': 7, 'n_estimators': 291}\n", | |
"0.871534 (0.003912) with: {'max_depth': 7, 'n_estimators': 292}\n", | |
"0.871626 (0.003797) with: {'max_depth': 7, 'n_estimators': 293}\n", | |
"0.871656 (0.003837) with: {'max_depth': 7, 'n_estimators': 294}\n", | |
"0.871749 (0.003817) with: {'max_depth': 7, 'n_estimators': 295}\n", | |
"0.871749 (0.003755) with: {'max_depth': 7, 'n_estimators': 296}\n", | |
"0.871749 (0.003681) with: {'max_depth': 7, 'n_estimators': 297}\n", | |
"0.871810 (0.003629) with: {'max_depth': 7, 'n_estimators': 298}\n", | |
"0.871810 (0.003614) with: {'max_depth': 7, 'n_estimators': 299}\n", | |
"0.872885 (0.003811) with: {'max_depth': 8, 'n_estimators': 200}\n", | |
"0.872793 (0.003529) with: {'max_depth': 8, 'n_estimators': 201}\n", | |
"0.872670 (0.003549) with: {'max_depth': 8, 'n_estimators': 202}\n", | |
"0.872670 (0.003553) with: {'max_depth': 8, 'n_estimators': 203}\n", | |
"0.872608 (0.003550) with: {'max_depth': 8, 'n_estimators': 204}\n", | |
"0.872608 (0.003631) with: {'max_depth': 8, 'n_estimators': 205}\n", | |
"0.872639 (0.003478) with: {'max_depth': 8, 'n_estimators': 206}\n", | |
"0.872823 (0.003525) with: {'max_depth': 8, 'n_estimators': 207}\n", | |
"0.872731 (0.003614) with: {'max_depth': 8, 'n_estimators': 208}\n", | |
"0.872701 (0.003651) with: {'max_depth': 8, 'n_estimators': 209}\n", | |
"0.872639 (0.003737) with: {'max_depth': 8, 'n_estimators': 210}\n", | |
"0.872608 (0.003904) with: {'max_depth': 8, 'n_estimators': 211}\n", | |
"0.872608 (0.004074) with: {'max_depth': 8, 'n_estimators': 212}\n", | |
"0.872547 (0.004007) with: {'max_depth': 8, 'n_estimators': 213}\n", | |
"0.872639 (0.004063) with: {'max_depth': 8, 'n_estimators': 214}\n", | |
"0.872608 (0.003971) with: {'max_depth': 8, 'n_estimators': 215}\n", | |
"0.872670 (0.003886) with: {'max_depth': 8, 'n_estimators': 216}\n", | |
"0.872608 (0.003885) with: {'max_depth': 8, 'n_estimators': 217}\n", | |
"0.872608 (0.003873) with: {'max_depth': 8, 'n_estimators': 218}\n", | |
"0.872547 (0.003814) with: {'max_depth': 8, 'n_estimators': 219}\n", | |
"0.872486 (0.003688) with: {'max_depth': 8, 'n_estimators': 220}\n", | |
"0.872578 (0.003596) with: {'max_depth': 8, 'n_estimators': 221}\n", | |
"0.872363 (0.003416) with: {'max_depth': 8, 'n_estimators': 222}\n", | |
"0.872271 (0.003514) with: {'max_depth': 8, 'n_estimators': 223}\n", | |
"0.872332 (0.003348) with: {'max_depth': 8, 'n_estimators': 224}\n", | |
"0.872301 (0.003276) with: {'max_depth': 8, 'n_estimators': 225}\n", | |
"0.872240 (0.003286) with: {'max_depth': 8, 'n_estimators': 226}\n", | |
"0.872209 (0.003408) with: {'max_depth': 8, 'n_estimators': 227}\n", | |
"0.872301 (0.003428) with: {'max_depth': 8, 'n_estimators': 228}\n", | |
"0.872363 (0.003283) with: {'max_depth': 8, 'n_estimators': 229}\n", | |
"0.872209 (0.003438) with: {'max_depth': 8, 'n_estimators': 230}\n", | |
"0.872148 (0.003510) with: {'max_depth': 8, 'n_estimators': 231}\n", | |
"0.872117 (0.003577) with: {'max_depth': 8, 'n_estimators': 232}\n", | |
"0.872178 (0.003525) with: {'max_depth': 8, 'n_estimators': 233}\n", | |
"0.872209 (0.003606) with: {'max_depth': 8, 'n_estimators': 234}\n", | |
"0.871963 (0.003611) with: {'max_depth': 8, 'n_estimators': 235}\n", | |
"0.872025 (0.003579) with: {'max_depth': 8, 'n_estimators': 236}\n", | |
"0.872056 (0.003618) with: {'max_depth': 8, 'n_estimators': 237}\n", | |
"0.872148 (0.003586) with: {'max_depth': 8, 'n_estimators': 238}\n", | |
"0.872148 (0.003520) with: {'max_depth': 8, 'n_estimators': 239}\n", | |
"0.872086 (0.003641) with: {'max_depth': 8, 'n_estimators': 240}\n", | |
"0.871871 (0.003666) with: {'max_depth': 8, 'n_estimators': 241}\n", | |
"0.871933 (0.003808) with: {'max_depth': 8, 'n_estimators': 242}\n", | |
"0.871902 (0.003863) with: {'max_depth': 8, 'n_estimators': 243}\n", | |
"0.871810 (0.003776) with: {'max_depth': 8, 'n_estimators': 244}\n", | |
"0.871779 (0.003690) with: {'max_depth': 8, 'n_estimators': 245}\n", | |
"0.871810 (0.003685) with: {'max_depth': 8, 'n_estimators': 246}\n", | |
"0.871779 (0.003595) with: {'max_depth': 8, 'n_estimators': 247}\n", | |
"0.871718 (0.003458) with: {'max_depth': 8, 'n_estimators': 248}\n", | |
"0.871748 (0.003420) with: {'max_depth': 8, 'n_estimators': 249}\n", | |
"0.871656 (0.003614) with: {'max_depth': 8, 'n_estimators': 250}\n", | |
"0.871534 (0.003534) with: {'max_depth': 8, 'n_estimators': 251}\n", | |
"0.871718 (0.003696) with: {'max_depth': 8, 'n_estimators': 252}\n", | |
"0.871626 (0.003678) with: {'max_depth': 8, 'n_estimators': 253}\n", | |
"0.871534 (0.003691) with: {'max_depth': 8, 'n_estimators': 254}\n", | |
"0.871687 (0.003670) with: {'max_depth': 8, 'n_estimators': 255}\n", | |
"0.871626 (0.003696) with: {'max_depth': 8, 'n_estimators': 256}\n", | |
"0.871472 (0.003788) with: {'max_depth': 8, 'n_estimators': 257}\n", | |
"0.871380 (0.003417) with: {'max_depth': 8, 'n_estimators': 258}\n", | |
"0.871349 (0.003363) with: {'max_depth': 8, 'n_estimators': 259}\n", | |
"0.871288 (0.003413) with: {'max_depth': 8, 'n_estimators': 260}\n", | |
"0.871349 (0.003405) with: {'max_depth': 8, 'n_estimators': 261}\n", | |
"0.871349 (0.003435) with: {'max_depth': 8, 'n_estimators': 262}\n", | |
"0.871042 (0.003530) with: {'max_depth': 8, 'n_estimators': 263}\n", | |
"0.871042 (0.003609) with: {'max_depth': 8, 'n_estimators': 264}\n", | |
"0.870981 (0.003583) with: {'max_depth': 8, 'n_estimators': 265}\n", | |
"0.870981 (0.003318) with: {'max_depth': 8, 'n_estimators': 266}\n", | |
"0.870919 (0.003225) with: {'max_depth': 8, 'n_estimators': 267}\n", | |
"0.870919 (0.003230) with: {'max_depth': 8, 'n_estimators': 268}\n", | |
"0.870981 (0.003287) with: {'max_depth': 8, 'n_estimators': 269}\n", | |
"0.871073 (0.003183) with: {'max_depth': 8, 'n_estimators': 270}\n", | |
"0.871196 (0.003089) with: {'max_depth': 8, 'n_estimators': 271}\n", | |
"0.871380 (0.003106) with: {'max_depth': 8, 'n_estimators': 272}\n", | |
"0.871257 (0.003233) with: {'max_depth': 8, 'n_estimators': 273}\n", | |
"0.871257 (0.003384) with: {'max_depth': 8, 'n_estimators': 274}\n", | |
"0.871257 (0.003491) with: {'max_depth': 8, 'n_estimators': 275}\n", | |
"0.871319 (0.003505) with: {'max_depth': 8, 'n_estimators': 276}\n", | |
"0.871349 (0.003599) with: {'max_depth': 8, 'n_estimators': 277}\n", | |
"0.871349 (0.003504) with: {'max_depth': 8, 'n_estimators': 278}\n", | |
"0.871196 (0.003419) with: {'max_depth': 8, 'n_estimators': 279}\n", | |
"0.871165 (0.003310) with: {'max_depth': 8, 'n_estimators': 280}\n", | |
"0.871165 (0.003272) with: {'max_depth': 8, 'n_estimators': 281}\n", | |
"0.871104 (0.003300) with: {'max_depth': 8, 'n_estimators': 282}\n", | |
"0.871104 (0.003379) with: {'max_depth': 8, 'n_estimators': 283}\n", | |
"0.871042 (0.003197) with: {'max_depth': 8, 'n_estimators': 284}\n", | |
"0.871134 (0.003254) with: {'max_depth': 8, 'n_estimators': 285}\n", | |
"0.871104 (0.003184) with: {'max_depth': 8, 'n_estimators': 286}\n", | |
"0.871073 (0.003209) with: {'max_depth': 8, 'n_estimators': 287}\n", | |
"0.871104 (0.003313) with: {'max_depth': 8, 'n_estimators': 288}\n", | |
"0.871165 (0.003337) with: {'max_depth': 8, 'n_estimators': 289}\n", | |
"0.871073 (0.003212) with: {'max_depth': 8, 'n_estimators': 290}\n", | |
"0.871073 (0.003270) with: {'max_depth': 8, 'n_estimators': 291}\n", | |
"0.870981 (0.003231) with: {'max_depth': 8, 'n_estimators': 292}\n", | |
"0.871073 (0.003149) with: {'max_depth': 8, 'n_estimators': 293}\n", | |
"0.870950 (0.003128) with: {'max_depth': 8, 'n_estimators': 294}\n", | |
"0.870889 (0.003132) with: {'max_depth': 8, 'n_estimators': 295}\n", | |
"0.870950 (0.003167) with: {'max_depth': 8, 'n_estimators': 296}\n", | |
"0.871073 (0.003048) with: {'max_depth': 8, 'n_estimators': 297}\n", | |
"0.871104 (0.003120) with: {'max_depth': 8, 'n_estimators': 298}\n", | |
"0.871104 (0.003129) with: {'max_depth': 8, 'n_estimators': 299}\n", | |
"0.871134 (0.003857) with: {'max_depth': 9, 'n_estimators': 200}\n", | |
"0.871042 (0.003829) with: {'max_depth': 9, 'n_estimators': 201}\n", | |
"0.870981 (0.003841) with: {'max_depth': 9, 'n_estimators': 202}\n", | |
"0.871073 (0.003903) with: {'max_depth': 9, 'n_estimators': 203}\n", | |
"0.870981 (0.003941) with: {'max_depth': 9, 'n_estimators': 204}\n", | |
"0.870981 (0.003965) with: {'max_depth': 9, 'n_estimators': 205}\n", | |
"0.870950 (0.003718) with: {'max_depth': 9, 'n_estimators': 206}\n", | |
"0.870981 (0.003780) with: {'max_depth': 9, 'n_estimators': 207}\n", | |
"0.871042 (0.003832) with: {'max_depth': 9, 'n_estimators': 208}\n", | |
"0.871011 (0.003904) with: {'max_depth': 9, 'n_estimators': 209}\n", | |
"0.870919 (0.003889) with: {'max_depth': 9, 'n_estimators': 210}\n", | |
"0.870858 (0.004013) with: {'max_depth': 9, 'n_estimators': 211}\n", | |
"0.871134 (0.004172) with: {'max_depth': 9, 'n_estimators': 212}\n", | |
"0.870919 (0.004045) with: {'max_depth': 9, 'n_estimators': 213}\n", | |
"0.870981 (0.004025) with: {'max_depth': 9, 'n_estimators': 214}\n", | |
"0.870981 (0.004004) with: {'max_depth': 9, 'n_estimators': 215}\n", | |
"0.870981 (0.003999) with: {'max_depth': 9, 'n_estimators': 216}\n", | |
"0.870827 (0.004022) with: {'max_depth': 9, 'n_estimators': 217}\n", | |
"0.870919 (0.004254) with: {'max_depth': 9, 'n_estimators': 218}\n", | |
"0.870981 (0.004299) with: {'max_depth': 9, 'n_estimators': 219}\n", | |
"0.870981 (0.004244) with: {'max_depth': 9, 'n_estimators': 220}\n", | |
"0.870950 (0.004203) with: {'max_depth': 9, 'n_estimators': 221}\n", | |
"0.870643 (0.004133) with: {'max_depth': 9, 'n_estimators': 222}\n", | |
"0.870735 (0.004128) with: {'max_depth': 9, 'n_estimators': 223}\n", | |
"0.870704 (0.004228) with: {'max_depth': 9, 'n_estimators': 224}\n", | |
"0.870704 (0.004221) with: {'max_depth': 9, 'n_estimators': 225}\n", | |
"0.870551 (0.004259) with: {'max_depth': 9, 'n_estimators': 226}\n", | |
"0.870612 (0.004183) with: {'max_depth': 9, 'n_estimators': 227}\n", | |
"0.870428 (0.004056) with: {'max_depth': 9, 'n_estimators': 228}\n", | |
"0.870305 (0.004138) with: {'max_depth': 9, 'n_estimators': 229}\n", | |
"0.870213 (0.004109) with: {'max_depth': 9, 'n_estimators': 230}\n", | |
"0.870366 (0.004160) with: {'max_depth': 9, 'n_estimators': 231}\n", | |
"0.870428 (0.004117) with: {'max_depth': 9, 'n_estimators': 232}\n", | |
"0.870520 (0.004125) with: {'max_depth': 9, 'n_estimators': 233}\n", | |
"0.870581 (0.004127) with: {'max_depth': 9, 'n_estimators': 234}\n", | |
"0.870643 (0.004206) with: {'max_depth': 9, 'n_estimators': 235}\n", | |
"0.870612 (0.004205) with: {'max_depth': 9, 'n_estimators': 236}\n", | |
"0.870520 (0.004064) with: {'max_depth': 9, 'n_estimators': 237}\n", | |
"0.870244 (0.004010) with: {'max_depth': 9, 'n_estimators': 238}\n", | |
"0.870274 (0.003957) with: {'max_depth': 9, 'n_estimators': 239}\n", | |
"0.870305 (0.003801) with: {'max_depth': 9, 'n_estimators': 240}\n", | |
"0.870397 (0.003690) with: {'max_depth': 9, 'n_estimators': 241}\n", | |
"0.870428 (0.003769) with: {'max_depth': 9, 'n_estimators': 242}\n", | |
"0.870489 (0.003766) with: {'max_depth': 9, 'n_estimators': 243}\n", | |
"0.870581 (0.004096) with: {'max_depth': 9, 'n_estimators': 244}\n", | |
"0.870766 (0.004203) with: {'max_depth': 9, 'n_estimators': 245}\n", | |
"0.870735 (0.004189) with: {'max_depth': 9, 'n_estimators': 246}\n", | |
"0.870612 (0.004343) with: {'max_depth': 9, 'n_estimators': 247}\n", | |
"0.870796 (0.004253) with: {'max_depth': 9, 'n_estimators': 248}\n", | |
"0.870981 (0.004091) with: {'max_depth': 9, 'n_estimators': 249}\n", | |
"0.870950 (0.004144) with: {'max_depth': 9, 'n_estimators': 250}\n", | |
"0.870981 (0.004125) with: {'max_depth': 9, 'n_estimators': 251}\n", | |
"0.871011 (0.004124) with: {'max_depth': 9, 'n_estimators': 252}\n", | |
"0.870796 (0.004102) with: {'max_depth': 9, 'n_estimators': 253}\n", | |
"0.870766 (0.004048) with: {'max_depth': 9, 'n_estimators': 254}\n", | |
"0.870612 (0.003957) with: {'max_depth': 9, 'n_estimators': 255}\n", | |
"0.870520 (0.003831) with: {'max_depth': 9, 'n_estimators': 256}\n", | |
"0.870458 (0.003912) with: {'max_depth': 9, 'n_estimators': 257}\n", | |
"0.870366 (0.003883) with: {'max_depth': 9, 'n_estimators': 258}\n", | |
"0.870243 (0.003789) with: {'max_depth': 9, 'n_estimators': 259}\n", | |
"0.870121 (0.003807) with: {'max_depth': 9, 'n_estimators': 260}\n", | |
"0.870151 (0.003839) with: {'max_depth': 9, 'n_estimators': 261}\n", | |
"0.870274 (0.003954) with: {'max_depth': 9, 'n_estimators': 262}\n", | |
"0.870151 (0.003999) with: {'max_depth': 9, 'n_estimators': 263}\n", | |
"0.870028 (0.004060) with: {'max_depth': 9, 'n_estimators': 264}\n", | |
"0.870182 (0.003804) with: {'max_depth': 9, 'n_estimators': 265}\n", | |
"0.870182 (0.003843) with: {'max_depth': 9, 'n_estimators': 266}\n", | |
"0.870243 (0.004042) with: {'max_depth': 9, 'n_estimators': 267}\n", | |
"0.870274 (0.004112) with: {'max_depth': 9, 'n_estimators': 268}\n", | |
"0.870366 (0.004181) with: {'max_depth': 9, 'n_estimators': 269}\n", | |
"0.870336 (0.004189) with: {'max_depth': 9, 'n_estimators': 270}\n", | |
"0.870366 (0.004193) with: {'max_depth': 9, 'n_estimators': 271}\n", | |
"0.870366 (0.004209) with: {'max_depth': 9, 'n_estimators': 272}\n", | |
"0.870182 (0.004312) with: {'max_depth': 9, 'n_estimators': 273}\n", | |
"0.870366 (0.004457) with: {'max_depth': 9, 'n_estimators': 274}\n", | |
"0.870397 (0.004379) with: {'max_depth': 9, 'n_estimators': 275}\n", | |
"0.870213 (0.004268) with: {'max_depth': 9, 'n_estimators': 276}\n", | |
"0.870213 (0.004286) with: {'max_depth': 9, 'n_estimators': 277}\n", | |
"0.870182 (0.004261) with: {'max_depth': 9, 'n_estimators': 278}\n", | |
"0.870059 (0.004289) with: {'max_depth': 9, 'n_estimators': 279}\n", | |
"0.870028 (0.004261) with: {'max_depth': 9, 'n_estimators': 280}\n", | |
"0.870028 (0.004110) with: {'max_depth': 9, 'n_estimators': 281}\n", | |
"0.870028 (0.004080) with: {'max_depth': 9, 'n_estimators': 282}\n", | |
"0.869936 (0.004045) with: {'max_depth': 9, 'n_estimators': 283}\n", | |
"0.869906 (0.004092) with: {'max_depth': 9, 'n_estimators': 284}\n", | |
"0.869783 (0.003819) with: {'max_depth': 9, 'n_estimators': 285}\n", | |
"0.869752 (0.003823) with: {'max_depth': 9, 'n_estimators': 286}\n", | |
"0.869844 (0.003794) with: {'max_depth': 9, 'n_estimators': 287}\n", | |
"0.869752 (0.003749) with: {'max_depth': 9, 'n_estimators': 288}\n", | |
"0.869875 (0.003791) with: {'max_depth': 9, 'n_estimators': 289}\n", | |
"0.869967 (0.003773) with: {'max_depth': 9, 'n_estimators': 290}\n", | |
"0.870151 (0.003869) with: {'max_depth': 9, 'n_estimators': 291}\n", | |
"0.870059 (0.003781) with: {'max_depth': 9, 'n_estimators': 292}\n", | |
"0.869906 (0.003769) with: {'max_depth': 9, 'n_estimators': 293}\n", | |
"0.869752 (0.003729) with: {'max_depth': 9, 'n_estimators': 294}\n", | |
"0.869660 (0.003743) with: {'max_depth': 9, 'n_estimators': 295}\n", | |
"0.869537 (0.003732) with: {'max_depth': 9, 'n_estimators': 296}\n", | |
"0.869445 (0.003749) with: {'max_depth': 9, 'n_estimators': 297}\n", | |
"0.869322 (0.003968) with: {'max_depth': 9, 'n_estimators': 298}\n", | |
"0.869230 (0.003888) with: {'max_depth': 9, 'n_estimators': 299}\n", | |
"0.871411 (0.004356) with: {'max_depth': 10, 'n_estimators': 200}\n", | |
"0.871319 (0.004395) with: {'max_depth': 10, 'n_estimators': 201}\n", | |
"0.871288 (0.004352) with: {'max_depth': 10, 'n_estimators': 202}\n", | |
"0.871411 (0.004323) with: {'max_depth': 10, 'n_estimators': 203}\n", | |
"0.871288 (0.004268) with: {'max_depth': 10, 'n_estimators': 204}\n", | |
"0.871257 (0.004352) with: {'max_depth': 10, 'n_estimators': 205}\n", | |
"0.871319 (0.004280) with: {'max_depth': 10, 'n_estimators': 206}\n", | |
"0.871257 (0.004129) with: {'max_depth': 10, 'n_estimators': 207}\n", | |
"0.871288 (0.004099) with: {'max_depth': 10, 'n_estimators': 208}\n", | |
"0.871288 (0.004044) with: {'max_depth': 10, 'n_estimators': 209}\n", | |
"0.871318 (0.004119) with: {'max_depth': 10, 'n_estimators': 210}\n", | |
"0.871319 (0.003986) with: {'max_depth': 10, 'n_estimators': 211}\n", | |
"0.871472 (0.003814) with: {'max_depth': 10, 'n_estimators': 212}\n", | |
"0.871564 (0.004148) with: {'max_depth': 10, 'n_estimators': 213}\n", | |
"0.871533 (0.004119) with: {'max_depth': 10, 'n_estimators': 214}\n", | |
"0.871349 (0.003928) with: {'max_depth': 10, 'n_estimators': 215}\n", | |
"0.871411 (0.004192) with: {'max_depth': 10, 'n_estimators': 216}\n", | |
"0.871472 (0.004133) with: {'max_depth': 10, 'n_estimators': 217}\n", | |
"0.871472 (0.004217) with: {'max_depth': 10, 'n_estimators': 218}\n", | |
"0.871349 (0.004186) with: {'max_depth': 10, 'n_estimators': 219}\n", | |
"0.871441 (0.003994) with: {'max_depth': 10, 'n_estimators': 220}\n", | |
"0.871318 (0.003982) with: {'max_depth': 10, 'n_estimators': 221}\n", | |
"0.871349 (0.004079) with: {'max_depth': 10, 'n_estimators': 222}\n", | |
"0.871288 (0.004109) with: {'max_depth': 10, 'n_estimators': 223}\n", | |
"0.871472 (0.004147) with: {'max_depth': 10, 'n_estimators': 224}\n", | |
"0.871656 (0.004145) with: {'max_depth': 10, 'n_estimators': 225}\n", | |
"0.871626 (0.004192) with: {'max_depth': 10, 'n_estimators': 226}\n", | |
"0.871687 (0.004322) with: {'max_depth': 10, 'n_estimators': 227}\n", | |
"0.871626 (0.004216) with: {'max_depth': 10, 'n_estimators': 228}\n", | |
"0.871687 (0.004385) with: {'max_depth': 10, 'n_estimators': 229}\n", | |
"0.871595 (0.004388) with: {'max_depth': 10, 'n_estimators': 230}\n", | |
"0.871595 (0.004471) with: {'max_depth': 10, 'n_estimators': 231}\n", | |
"0.871534 (0.004461) with: {'max_depth': 10, 'n_estimators': 232}\n", | |
"0.871626 (0.004488) with: {'max_depth': 10, 'n_estimators': 233}\n", | |
"0.871595 (0.004338) with: {'max_depth': 10, 'n_estimators': 234}\n", | |
"0.871626 (0.004246) with: {'max_depth': 10, 'n_estimators': 235}\n", | |
"0.871411 (0.004025) with: {'max_depth': 10, 'n_estimators': 236}\n", | |
"0.871380 (0.003944) with: {'max_depth': 10, 'n_estimators': 237}\n", | |
"0.871472 (0.004063) with: {'max_depth': 10, 'n_estimators': 238}\n", | |
"0.871503 (0.004067) with: {'max_depth': 10, 'n_estimators': 239}\n", | |
"0.871564 (0.004073) with: {'max_depth': 10, 'n_estimators': 240}\n", | |
"0.871718 (0.004188) with: {'max_depth': 10, 'n_estimators': 241}\n", | |
"0.871810 (0.004175) with: {'max_depth': 10, 'n_estimators': 242}\n", | |
"0.871841 (0.004240) with: {'max_depth': 10, 'n_estimators': 243}\n", | |
"0.871626 (0.004465) with: {'max_depth': 10, 'n_estimators': 244}\n", | |
"0.871534 (0.004267) with: {'max_depth': 10, 'n_estimators': 245}\n", | |
"0.871349 (0.004265) with: {'max_depth': 10, 'n_estimators': 246}\n", | |
"0.871288 (0.004285) with: {'max_depth': 10, 'n_estimators': 247}\n", | |
"0.871288 (0.004284) with: {'max_depth': 10, 'n_estimators': 248}\n", | |
"0.871288 (0.004201) with: {'max_depth': 10, 'n_estimators': 249}\n", | |
"0.871257 (0.004200) with: {'max_depth': 10, 'n_estimators': 250}\n", | |
"0.871073 (0.004153) with: {'max_depth': 10, 'n_estimators': 251}\n", | |
"0.871257 (0.004174) with: {'max_depth': 10, 'n_estimators': 252}\n", | |
"0.871011 (0.004167) with: {'max_depth': 10, 'n_estimators': 253}\n", | |
"0.870981 (0.004060) with: {'max_depth': 10, 'n_estimators': 254}\n", | |
"0.871073 (0.004108) with: {'max_depth': 10, 'n_estimators': 255}\n", | |
"0.871103 (0.004206) with: {'max_depth': 10, 'n_estimators': 256}\n", | |
"0.870889 (0.004178) with: {'max_depth': 10, 'n_estimators': 257}\n", | |
"0.870796 (0.004236) with: {'max_depth': 10, 'n_estimators': 258}\n", | |
"0.870919 (0.004178) with: {'max_depth': 10, 'n_estimators': 259}\n", | |
"0.870735 (0.004009) with: {'max_depth': 10, 'n_estimators': 260}\n", | |
"0.870489 (0.004307) with: {'max_depth': 10, 'n_estimators': 261}\n", | |
"0.870305 (0.004320) with: {'max_depth': 10, 'n_estimators': 262}\n", | |
"0.870428 (0.004277) with: {'max_depth': 10, 'n_estimators': 263}\n", | |
"0.870274 (0.003989) with: {'max_depth': 10, 'n_estimators': 264}\n", | |
"0.870029 (0.004141) with: {'max_depth': 10, 'n_estimators': 265}\n", | |
"0.870059 (0.004264) with: {'max_depth': 10, 'n_estimators': 266}\n", | |
"0.869906 (0.004045) with: {'max_depth': 10, 'n_estimators': 267}\n", | |
"0.870090 (0.003829) with: {'max_depth': 10, 'n_estimators': 268}\n", | |
"0.870059 (0.003746) with: {'max_depth': 10, 'n_estimators': 269}\n", | |
"0.870121 (0.003913) with: {'max_depth': 10, 'n_estimators': 270}\n", | |
"0.870182 (0.003977) with: {'max_depth': 10, 'n_estimators': 271}\n", | |
"0.870151 (0.003836) with: {'max_depth': 10, 'n_estimators': 272}\n", | |
"0.870090 (0.003847) with: {'max_depth': 10, 'n_estimators': 273}\n", | |
"0.870059 (0.003811) with: {'max_depth': 10, 'n_estimators': 274}\n", | |
"0.870029 (0.003767) with: {'max_depth': 10, 'n_estimators': 275}\n", | |
"0.870029 (0.003807) with: {'max_depth': 10, 'n_estimators': 276}\n", | |
"0.869844 (0.003943) with: {'max_depth': 10, 'n_estimators': 277}\n", | |
"0.870121 (0.003949) with: {'max_depth': 10, 'n_estimators': 278}\n", | |
"0.870274 (0.003884) with: {'max_depth': 10, 'n_estimators': 279}\n", | |
"0.870213 (0.004089) with: {'max_depth': 10, 'n_estimators': 280}\n", | |
"0.870182 (0.003965) with: {'max_depth': 10, 'n_estimators': 281}\n", | |
"0.869998 (0.003908) with: {'max_depth': 10, 'n_estimators': 282}\n", | |
"0.869691 (0.004029) with: {'max_depth': 10, 'n_estimators': 283}\n", | |
"0.869568 (0.003986) with: {'max_depth': 10, 'n_estimators': 284}\n", | |
"0.869568 (0.003917) with: {'max_depth': 10, 'n_estimators': 285}\n", | |
"0.869384 (0.003982) with: {'max_depth': 10, 'n_estimators': 286}\n", | |
"0.869384 (0.004068) with: {'max_depth': 10, 'n_estimators': 287}\n", | |
"0.869384 (0.004123) with: {'max_depth': 10, 'n_estimators': 288}\n", | |
"0.869445 (0.004172) with: {'max_depth': 10, 'n_estimators': 289}\n", | |
"0.869629 (0.004230) with: {'max_depth': 10, 'n_estimators': 290}\n", | |
"0.869599 (0.004322) with: {'max_depth': 10, 'n_estimators': 291}\n", | |
"0.869691 (0.004368) with: {'max_depth': 10, 'n_estimators': 292}\n", | |
"0.869783 (0.004413) with: {'max_depth': 10, 'n_estimators': 293}\n", | |
"0.869629 (0.004456) with: {'max_depth': 10, 'n_estimators': 294}\n", | |
"0.869476 (0.004394) with: {'max_depth': 10, 'n_estimators': 295}\n", | |
"0.869476 (0.004401) with: {'max_depth': 10, 'n_estimators': 296}\n", | |
"0.869445 (0.004159) with: {'max_depth': 10, 'n_estimators': 297}\n", | |
"0.869445 (0.004391) with: {'max_depth': 10, 'n_estimators': 298}\n", | |
"0.869414 (0.004419) with: {'max_depth': 10, 'n_estimators': 299}\n" | |
] | |
}, | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"/usr/local/lib/python3.5/dist-packages/sklearn/model_selection/_search.py:747: DeprecationWarning: The grid_scores_ attribute was deprecated in version 0.18 in favor of the more elaborate cv_results_ attribute. The grid_scores_ attribute will not be available from 0.20\n", | |
" DeprecationWarning)\n" | |
] | |
} | |
], | |
"source": [ | |
"grid_result = grid.fit(X_train,y_train)\n", | |
"\n", | |
"# summarize results\n", | |
"print(\"Best: %f using %s\" % (grid_result.best_score_, grid_result.best_params_))\n", | |
"\n", | |
"for params, mean_score, scores in grid_result.grid_scores_:\n", | |
" \n", | |
" print(\"%f (%f) with: %r\" % (scores.mean(), scores.std(), params))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"0.87556046925864506" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"X_test = pd.read_csv('./X_test')\n", | |
"\n", | |
"y_test = pd.read_csv('./correct_answer.csv')\n", | |
"\n", | |
"test_label = grid.predict(X_test)\n", | |
"\n", | |
"accuracy_score(test_label,y_test['label'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"res = pd.DataFrame({\n", | |
" 'id':range(1,len(test_label)+1)\n", | |
" ,'label':test_label\n", | |
"})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"res.to_csv('110.csv',index=None)" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.2" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment