imports


In [1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline

In [2]:
from fastai.imports import *
from fastai.structured import *

from pandas_summary import DataFrameSummary
from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier
from IPython.display import display
import xgboost as xgb
from sklearn import metrics

In [3]:
PATH = os.getcwd();
PATH


Out[3]:
'D:\\Github\\fastai\\courses\\ml1'

In [4]:
df_raw  = pd.read_csv(f'{PATH}\\AV_Mckin\\train_encoded.csv', low_memory= False)
df_test = pd.read_csv(f'{PATH}\\AV_Mckin\\test_encoded.csv', low_memory=False)

init


In [15]:
df_raw = pd.read_csv(f'{PATH}\\AV_Mckin\\train_ajEneEa.csv', low_memory=False)
df_test = pd.read_csv(f'{PATH}\\AV_Mckin\\test_v2akXPA.csv', low_memory=False)

In [16]:
df_raw.shape, df_test.shape


Out[16]:
((43400, 12), (18601, 11))

In [17]:
df_raw.head(2)


Out[17]:
id gender age hypertension heart_disease ever_married work_type Residence_type avg_glucose_level bmi smoking_status stroke
0 30669 Male 3.0 0 0 No children Rural 95.12 18.0 NaN 0
1 30468 Male 58.0 1 0 Yes Private Urban 87.96 39.2 never smoked 0

In [18]:
target = df_raw.stroke.values;
df_raw.info()


<class 'pandas.core.frame.DataFrame'>
RangeIndex: 43400 entries, 0 to 43399
Data columns (total 12 columns):
id                   43400 non-null int64
gender               43400 non-null object
age                  43400 non-null float64
hypertension         43400 non-null int64
heart_disease        43400 non-null int64
ever_married         43400 non-null object
work_type            43400 non-null object
Residence_type       43400 non-null object
avg_glucose_level    43400 non-null float64
bmi                  41938 non-null float64
smoking_status       30108 non-null object
stroke               43400 non-null int64
dtypes: float64(3), int64(4), object(5)
memory usage: 4.0+ MB

In [19]:
# This way we have randomness and are able to reproduce the behaviour within this cell.
np.random.seed(13)
from sklearn.model_selection import KFold

def impact_coding(data, feature, target='y'):
    '''
    In this implementation we get the values and the dictionary as two different steps.
    This is just because initially we were ignoring the dictionary as a result variable.
    
    In this implementation the KFolds use shuffling. If you want reproducibility the cv 
    could be moved to a parameter.
    '''
    n_folds = 10
    n_inner_folds = 5
    impact_coded = pd.Series()
    
    oof_default_mean = data[target].mean() # Gobal mean to use by default (you could further tune this)
    kf = KFold(n_splits=n_folds, shuffle=True)
    oof_mean_cv = pd.DataFrame()
    split = 0
    for infold, oof in kf.split(data[feature]):
            impact_coded_cv = pd.Series()
            kf_inner = KFold(n_splits=n_inner_folds, shuffle=True)
            inner_split = 0
            inner_oof_mean_cv = pd.DataFrame()
            oof_default_inner_mean = data.iloc[infold][target].mean()
            for infold_inner, oof_inner in kf_inner.split(data.iloc[infold]):
                # The mean to apply to the inner oof split (a 1/n_folds % based on the rest)
                oof_mean = data.iloc[infold_inner].groupby(by=feature)[target].mean()
                impact_coded_cv = impact_coded_cv.append(data.iloc[infold].apply(
                            lambda x: oof_mean[x[feature]]
                                      if x[feature] in oof_mean.index
                                      else oof_default_inner_mean
                            , axis=1))

                # Also populate mapping (this has all group -> mean for all inner CV folds)
                inner_oof_mean_cv = inner_oof_mean_cv.join(pd.DataFrame(oof_mean), rsuffix=inner_split, how='outer')
                inner_oof_mean_cv.fillna(value=oof_default_inner_mean, inplace=True)
                inner_split += 1

            # Also populate mapping
            oof_mean_cv = oof_mean_cv.join(pd.DataFrame(inner_oof_mean_cv), rsuffix=split, how='outer')
            oof_mean_cv.fillna(value=oof_default_mean, inplace=True)
            split += 1
            
            impact_coded = impact_coded.append(data.iloc[oof].apply(
                            lambda x: inner_oof_mean_cv.loc[x[feature]].mean()
                                      if x[feature] in inner_oof_mean_cv.index
                                      else oof_default_mean
                            , axis=1))

    return impact_coded, oof_mean_cv.mean(axis=1), oof_default_mean

In [20]:
features = df_raw.columns
numeric_features = []
categorical_features = []

for dtype, feature in zip(df_raw.dtypes, df_raw.columns):
    if dtype == object:
        #print(column)
        #print(train_data[column].describe())
        categorical_features.append(feature)
    else:
        numeric_features.append(feature)
categorical_features


Out[20]:
['gender', 'ever_married', 'work_type', 'Residence_type', 'smoking_status']

In [22]:
%%time
# Apply the encoding to training and test data, and preserve the mapping
impact_coding_map = {}
for f in categorical_features:
    print("Impact coding for {}".format(f))
    df_raw["impact_encoded_{}".format(f)], impact_coding_mapping, default_coding = impact_coding(df_raw, f,'stroke')
    impact_coding_map[f] = (impact_coding_mapping, default_coding)
    mapping, default_mean = impact_coding_map[f]
    df_test["impact_encoded_{}".format(f)] = df_test.apply(lambda x: mapping[x[f]]
                                                                         if x[f] in mapping
                                                                         else default_mean
                                                               , axis=1)


Impact coding for gender
Impact coding for ever_married
Impact coding for work_type
Impact coding for Residence_type
Impact coding for smoking_status
Wall time: 5min 5s

In [167]:
df_raw.to_csv(f'{PATH}\\AV_Mckin\\train_encoded.csv',index = False)
df_test.to_csv(f'{PATH}\\AV_Mckin\\test_encoded.csv',index = False)

In [175]:
categorical_features_indices1 = np.where(df_raw.dtypes == 'category')[0]

In [176]:
categorical_features_indices1


Out[176]:
array([ 1,  5,  6,  7, 10], dtype=int64)

In [33]:
df_raw.fillna(method='bfill',inplace=True)

In [41]:
df_raw.drop('stroke',axis=1,inplace=True)

In [179]:
from sklearn.model_selection import train_test_split
X_train, X_validation, y_train, y_validation = train_test_split(df_raw, target, train_size=0.8, random_state=1234)


C:\ProgramData\Anaconda3\lib\site-packages\sklearn\model_selection\_split.py:2026: FutureWarning: From version 0.21, test_size will always complement train_size unless both are specified.
  FutureWarning)

In [188]:
#importing library and building model
from catboost import CatBoostClassifier
model=CatBoostClassifier(iterations=1000, depth=12, learning_rate=0.01, loss_function='CrossEntropy',\
                         )
model.fit(X_train, y_train,cat_features=categorical_features_indices,eval_set=(X_validation, y_validation))


0:	learn: 0.6738563	test: 0.6739994	best: 0.6739994 (0)	total: 37.1ms	remaining: 37.1s
1:	learn: 0.6551678	test: 0.6554512	best: 0.6554512 (1)	total: 69.9ms	remaining: 34.9s
2:	learn: 0.6370616	test: 0.6374821	best: 0.6374821 (2)	total: 133ms	remaining: 44.3s
3:	learn: 0.6194853	test: 0.6200452	best: 0.6200452 (3)	total: 215ms	remaining: 53.6s
4:	learn: 0.6021464	test: 0.6028698	best: 0.6028698 (4)	total: 250ms	remaining: 49.7s
5:	learn: 0.5857035	test: 0.5865596	best: 0.5865596 (5)	total: 298ms	remaining: 49.3s
6:	learn: 0.5697805	test: 0.5707694	best: 0.5707694 (6)	total: 317ms	remaining: 45s
7:	learn: 0.5543658	test: 0.5554862	best: 0.5554862 (7)	total: 341ms	remaining: 42.2s
8:	learn: 0.5394454	test: 0.5406960	best: 0.5406960 (8)	total: 364ms	remaining: 40.1s
9:	learn: 0.5236859	test: 0.5249893	best: 0.5249893 (9)	total: 544ms	remaining: 53.9s
10:	learn: 0.5097526	test: 0.5111858	best: 0.5111858 (10)	total: 578ms	remaining: 52s
11:	learn: 0.4962037	test: 0.4977545	best: 0.4977545 (11)	total: 614ms	remaining: 50.5s
12:	learn: 0.4828746	test: 0.4845738	best: 0.4845738 (12)	total: 646ms	remaining: 49s
13:	learn: 0.4702702	test: 0.4720943	best: 0.4720943 (13)	total: 665ms	remaining: 46.8s
14:	learn: 0.4580780	test: 0.4600267	best: 0.4600267 (14)	total: 703ms	remaining: 46.2s
15:	learn: 0.4462900	test: 0.4483609	best: 0.4483609 (15)	total: 746ms	remaining: 45.9s
16:	learn: 0.4318369	test: 0.4339914	best: 0.4339914 (16)	total: 814ms	remaining: 47s
17:	learn: 0.4207660	test: 0.4230501	best: 0.4230501 (17)	total: 873ms	remaining: 47.6s
18:	learn: 0.4099076	test: 0.4122759	best: 0.4122759 (18)	total: 931ms	remaining: 48.1s
19:	learn: 0.3997011	test: 0.4021876	best: 0.4021876 (19)	total: 956ms	remaining: 46.9s
20:	learn: 0.3871030	test: 0.3896708	best: 0.3896708 (20)	total: 1.01s	remaining: 47.2s
21:	learn: 0.3770035	test: 0.3796318	best: 0.3796318 (21)	total: 1.05s	remaining: 46.6s
22:	learn: 0.3664070	test: 0.3690990	best: 0.3690990 (22)	total: 1.14s	remaining: 48.4s
23:	learn: 0.3576152	test: 0.3604253	best: 0.3604253 (23)	total: 1.17s	remaining: 47.6s
24:	learn: 0.3490189	test: 0.3519351	best: 0.3519351 (24)	total: 1.22s	remaining: 47.4s
25:	learn: 0.3408253	test: 0.3438548	best: 0.3438548 (25)	total: 1.24s	remaining: 46.3s
26:	learn: 0.3329049	test: 0.3360464	best: 0.3360464 (26)	total: 1.26s	remaining: 45.5s
27:	learn: 0.3239162	test: 0.3271061	best: 0.3271061 (27)	total: 1.37s	remaining: 47.6s
28:	learn: 0.3165556	test: 0.3198565	best: 0.3198565 (28)	total: 1.41s	remaining: 47.2s
29:	learn: 0.3090638	test: 0.3124848	best: 0.3124848 (29)	total: 1.47s	remaining: 47.4s
30:	learn: 0.3021955	test: 0.3057252	best: 0.3057252 (30)	total: 1.49s	remaining: 46.5s
31:	learn: 0.2953496	test: 0.2989618	best: 0.2989618 (31)	total: 1.52s	remaining: 46.1s
32:	learn: 0.2887746	test: 0.2925140	best: 0.2925140 (32)	total: 1.61s	remaining: 47.2s
33:	learn: 0.2825788	test: 0.2864237	best: 0.2864237 (33)	total: 1.63s	remaining: 46.3s
34:	learn: 0.2748712	test: 0.2787620	best: 0.2787620 (34)	total: 1.82s	remaining: 50.3s
35:	learn: 0.2686504	test: 0.2726457	best: 0.2726457 (35)	total: 1.89s	remaining: 50.6s
36:	learn: 0.2625004	test: 0.2665723	best: 0.2665723 (36)	total: 1.97s	remaining: 51.3s
37:	learn: 0.2571619	test: 0.2613358	best: 0.2613358 (37)	total: 2s	remaining: 50.7s
38:	learn: 0.2519992	test: 0.2562741	best: 0.2562741 (38)	total: 2.02s	remaining: 49.9s
39:	learn: 0.2467179	test: 0.2510920	best: 0.2510920 (39)	total: 2.09s	remaining: 50.1s
40:	learn: 0.2418966	test: 0.2463696	best: 0.2463696 (40)	total: 2.12s	remaining: 49.5s
41:	learn: 0.2372334	test: 0.2418041	best: 0.2418041 (41)	total: 2.14s	remaining: 48.9s
42:	learn: 0.2311663	test: 0.2358127	best: 0.2358127 (42)	total: 2.27s	remaining: 50.4s
43:	learn: 0.2268310	test: 0.2315754	best: 0.2315754 (43)	total: 2.42s	remaining: 52.6s
44:	learn: 0.2209481	test: 0.2257536	best: 0.2257536 (44)	total: 2.5s	remaining: 53.1s
45:	learn: 0.2164112	test: 0.2212976	best: 0.2212976 (45)	total: 2.54s	remaining: 52.7s
46:	learn: 0.2125595	test: 0.2175383	best: 0.2175383 (46)	total: 2.56s	remaining: 51.9s
47:	learn: 0.2088283	test: 0.2138975	best: 0.2138975 (47)	total: 2.59s	remaining: 51.5s
48:	learn: 0.2052210	test: 0.2103808	best: 0.2103808 (48)	total: 2.61s	remaining: 50.7s
49:	learn: 0.2004706	test: 0.2057088	best: 0.2057088 (49)	total: 2.73s	remaining: 51.8s
50:	learn: 0.1971245	test: 0.2024510	best: 0.2024510 (50)	total: 2.75s	remaining: 51.2s
51:	learn: 0.1938856	test: 0.1992993	best: 0.1992993 (51)	total: 2.78s	remaining: 50.7s
52:	learn: 0.1905338	test: 0.1960350	best: 0.1960350 (52)	total: 2.83s	remaining: 50.7s
53:	learn: 0.1875029	test: 0.1930895	best: 0.1930895 (53)	total: 2.87s	remaining: 50.2s
54:	learn: 0.1845316	test: 0.1902096	best: 0.1902096 (54)	total: 2.93s	remaining: 50.3s
55:	learn: 0.1816886	test: 0.1874505	best: 0.1874505 (55)	total: 2.97s	remaining: 50s
56:	learn: 0.1789364	test: 0.1847811	best: 0.1847811 (56)	total: 2.99s	remaining: 49.4s
57:	learn: 0.1762706	test: 0.1821972	best: 0.1821972 (57)	total: 3.01s	remaining: 49s
58:	learn: 0.1734814	test: 0.1794779	best: 0.1794779 (58)	total: 3.13s	remaining: 49.9s
59:	learn: 0.1708254	test: 0.1768989	best: 0.1768989 (59)	total: 3.22s	remaining: 50.5s
60:	learn: 0.1681351	test: 0.1742762	best: 0.1742762 (60)	total: 3.29s	remaining: 50.7s
61:	learn: 0.1653899	test: 0.1715981	best: 0.1715981 (61)	total: 3.39s	remaining: 51.3s
62:	learn: 0.1620593	test: 0.1683358	best: 0.1683358 (62)	total: 3.5s	remaining: 52.1s
63:	learn: 0.1597399	test: 0.1660940	best: 0.1660940 (63)	total: 3.55s	remaining: 52s
64:	learn: 0.1571642	test: 0.1635844	best: 0.1635844 (64)	total: 3.6s	remaining: 51.8s
65:	learn: 0.1551524	test: 0.1616476	best: 0.1616476 (65)	total: 3.62s	remaining: 51.3s
66:	learn: 0.1532032	test: 0.1597718	best: 0.1597718 (66)	total: 3.67s	remaining: 51.2s
67:	learn: 0.1504616	test: 0.1570920	best: 0.1570920 (67)	total: 3.85s	remaining: 52.8s
68:	learn: 0.1482068	test: 0.1549019	best: 0.1549019 (68)	total: 3.95s	remaining: 53.3s
69:	learn: 0.1459786	test: 0.1527293	best: 0.1527293 (69)	total: 4.04s	remaining: 53.7s
70:	learn: 0.1439956	test: 0.1508087	best: 0.1508087 (70)	total: 4.13s	remaining: 54s
71:	learn: 0.1416835	test: 0.1485436	best: 0.1485436 (71)	total: 4.95s	remaining: 1m 3s
72:	learn: 0.1401167	test: 0.1470457	best: 0.1470457 (72)	total: 4.97s	remaining: 1m 3s
73:	learn: 0.1384810	test: 0.1454801	best: 0.1454801 (73)	total: 5.05s	remaining: 1m 3s
74:	learn: 0.1364256	test: 0.1434740	best: 0.1434740 (74)	total: 5.13s	remaining: 1m 3s
75:	learn: 0.1350085	test: 0.1421235	best: 0.1421235 (75)	total: 5.17s	remaining: 1m 2s
76:	learn: 0.1336285	test: 0.1408089	best: 0.1408089 (76)	total: 5.23s	remaining: 1m 2s
77:	learn: 0.1322016	test: 0.1394331	best: 0.1394331 (77)	total: 5.28s	remaining: 1m 2s
78:	learn: 0.1309077	test: 0.1382038	best: 0.1382038 (78)	total: 5.31s	remaining: 1m 1s
79:	learn: 0.1295996	test: 0.1369666	best: 0.1369666 (79)	total: 5.37s	remaining: 1m 1s
80:	learn: 0.1283806	test: 0.1358109	best: 0.1358109 (80)	total: 5.4s	remaining: 1m 1s
81:	learn: 0.1271939	test: 0.1346876	best: 0.1346876 (81)	total: 5.44s	remaining: 1m
82:	learn: 0.1256660	test: 0.1332022	best: 0.1332022 (82)	total: 5.5s	remaining: 1m
83:	learn: 0.1242873	test: 0.1318768	best: 0.1318768 (83)	total: 5.55s	remaining: 1m
84:	learn: 0.1229625	test: 0.1306018	best: 0.1306018 (84)	total: 5.62s	remaining: 1m
85:	learn: 0.1218652	test: 0.1295564	best: 0.1295564 (85)	total: 5.65s	remaining: 1m
86:	learn: 0.1207198	test: 0.1284824	best: 0.1284824 (86)	total: 6.26s	remaining: 1m 5s
87:	learn: 0.1197438	test: 0.1275649	best: 0.1275649 (87)	total: 6.29s	remaining: 1m 5s
88:	learn: 0.1187954	test: 0.1266743	best: 0.1266743 (88)	total: 6.31s	remaining: 1m 4s
89:	learn: 0.1177489	test: 0.1256835	best: 0.1256835 (89)	total: 6.41s	remaining: 1m 4s
90:	learn: 0.1167875	test: 0.1247841	best: 0.1247841 (90)	total: 6.48s	remaining: 1m 4s
91:	learn: 0.1152823	test: 0.1233156	best: 0.1233156 (91)	total: 6.58s	remaining: 1m 4s
92:	learn: 0.1143253	test: 0.1224149	best: 0.1224149 (92)	total: 6.64s	remaining: 1m 4s
93:	learn: 0.1135190	test: 0.1216629	best: 0.1216629 (93)	total: 6.66s	remaining: 1m 4s
94:	learn: 0.1126218	test: 0.1208184	best: 0.1208184 (94)	total: 6.7s	remaining: 1m 3s
95:	learn: 0.1115510	test: 0.1197845	best: 0.1197845 (95)	total: 6.74s	remaining: 1m 3s
96:	learn: 0.1108163	test: 0.1191022	best: 0.1191022 (96)	total: 6.81s	remaining: 1m 3s
97:	learn: 0.1101019	test: 0.1184398	best: 0.1184398 (97)	total: 6.83s	remaining: 1m 2s
98:	learn: 0.1093209	test: 0.1177131	best: 0.1177131 (98)	total: 6.87s	remaining: 1m 2s
99:	learn: 0.1085727	test: 0.1170199	best: 0.1170199 (99)	total: 6.93s	remaining: 1m 2s
100:	learn: 0.1079177	test: 0.1164152	best: 0.1164152 (100)	total: 6.95s	remaining: 1m 1s
101:	learn: 0.1072200	test: 0.1157661	best: 0.1157661 (101)	total: 7.09s	remaining: 1m 2s
102:	learn: 0.1065167	test: 0.1151161	best: 0.1151161 (102)	total: 7.14s	remaining: 1m 2s
103:	learn: 0.1055718	test: 0.1142073	best: 0.1142073 (103)	total: 7.22s	remaining: 1m 2s
104:	learn: 0.1047498	test: 0.1134175	best: 0.1134175 (104)	total: 7.31s	remaining: 1m 2s
105:	learn: 0.1041669	test: 0.1128897	best: 0.1128897 (105)	total: 7.37s	remaining: 1m 2s
106:	learn: 0.1034334	test: 0.1121938	best: 0.1121938 (106)	total: 7.42s	remaining: 1m 1s
107:	learn: 0.1027472	test: 0.1115432	best: 0.1115432 (107)	total: 7.51s	remaining: 1m 2s
108:	learn: 0.1020736	test: 0.1109033	best: 0.1109033 (108)	total: 7.59s	remaining: 1m 2s
109:	learn: 0.1015774	test: 0.1104523	best: 0.1104523 (109)	total: 7.61s	remaining: 1m 1s
110:	learn: 0.1008709	test: 0.1097814	best: 0.1097814 (110)	total: 7.65s	remaining: 1m 1s
111:	learn: 0.1001855	test: 0.1091336	best: 0.1091336 (111)	total: 7.71s	remaining: 1m 1s
112:	learn: 0.0994640	test: 0.1084396	best: 0.1084396 (112)	total: 7.88s	remaining: 1m 1s
113:	learn: 0.0989585	test: 0.1079802	best: 0.1079802 (113)	total: 7.93s	remaining: 1m 1s
114:	learn: 0.0985014	test: 0.1075644	best: 0.1075644 (114)	total: 7.97s	remaining: 1m 1s
115:	learn: 0.0980884	test: 0.1071934	best: 0.1071934 (115)	total: 7.99s	remaining: 1m
116:	learn: 0.0973895	test: 0.1065339	best: 0.1065339 (116)	total: 8.05s	remaining: 1m
117:	learn: 0.0970016	test: 0.1061870	best: 0.1061870 (117)	total: 8.07s	remaining: 1m
118:	learn: 0.0963937	test: 0.1056033	best: 0.1056033 (118)	total: 8.1s	remaining: 60s
119:	learn: 0.0957020	test: 0.1049415	best: 0.1049415 (119)	total: 8.15s	remaining: 59.7s
120:	learn: 0.0953495	test: 0.1046290	best: 0.1046290 (120)	total: 8.19s	remaining: 59.5s
121:	learn: 0.0948860	test: 0.1041987	best: 0.1041987 (121)	total: 8.3s	remaining: 59.7s
122:	learn: 0.0943139	test: 0.1036534	best: 0.1036534 (122)	total: 8.41s	remaining: 60s
123:	learn: 0.0937704	test: 0.1031311	best: 0.1031311 (123)	total: 8.46s	remaining: 59.8s
124:	learn: 0.0933003	test: 0.1026908	best: 0.1026908 (124)	total: 8.54s	remaining: 59.8s
125:	learn: 0.0927977	test: 0.1022197	best: 0.1022197 (125)	total: 8.64s	remaining: 59.9s
126:	learn: 0.0925042	test: 0.1019637	best: 0.1019637 (126)	total: 8.68s	remaining: 59.7s
127:	learn: 0.0920600	test: 0.1015485	best: 0.1015485 (127)	total: 8.73s	remaining: 59.5s
128:	learn: 0.0916041	test: 0.1011240	best: 0.1011240 (128)	total: 8.83s	remaining: 59.6s
129:	learn: 0.0911947	test: 0.1007428	best: 0.1007428 (129)	total: 8.87s	remaining: 59.3s
130:	learn: 0.0908579	test: 0.1004311	best: 0.1004311 (130)	total: 8.9s	remaining: 59s
131:	learn: 0.0905473	test: 0.1001543	best: 0.1001543 (131)	total: 8.94s	remaining: 58.8s
132:	learn: 0.0900276	test: 0.0996606	best: 0.0996606 (132)	total: 8.99s	remaining: 58.6s
133:	learn: 0.0894717	test: 0.0991225	best: 0.0991225 (133)	total: 9.08s	remaining: 58.7s
134:	learn: 0.0891075	test: 0.0987862	best: 0.0987862 (134)	total: 9.14s	remaining: 58.6s
135:	learn: 0.0888339	test: 0.0985525	best: 0.0985525 (135)	total: 9.25s	remaining: 58.7s
136:	learn: 0.0884781	test: 0.0982248	best: 0.0982248 (136)	total: 9.29s	remaining: 58.5s
137:	learn: 0.0882111	test: 0.0979922	best: 0.0979922 (137)	total: 9.36s	remaining: 58.4s
138:	learn: 0.0880059	test: 0.0978220	best: 0.0978220 (138)	total: 9.41s	remaining: 58.3s
139:	learn: 0.0875105	test: 0.0973650	best: 0.0973650 (139)	total: 9.71s	remaining: 59.6s
140:	learn: 0.0871974	test: 0.0970729	best: 0.0970729 (140)	total: 9.76s	remaining: 59.4s
141:	learn: 0.0869103	test: 0.0968066	best: 0.0968066 (141)	total: 9.79s	remaining: 59.2s
142:	learn: 0.0864967	test: 0.0964204	best: 0.0964204 (142)	total: 9.86s	remaining: 59.1s
143:	learn: 0.0862868	test: 0.0962432	best: 0.0962432 (143)	total: 9.89s	remaining: 58.8s
144:	learn: 0.0861220	test: 0.0961074	best: 0.0961074 (144)	total: 9.92s	remaining: 58.5s
145:	learn: 0.0858373	test: 0.0958437	best: 0.0958437 (145)	total: 10.2s	remaining: 59.5s
146:	learn: 0.0855449	test: 0.0955709	best: 0.0955709 (146)	total: 10.2s	remaining: 59.2s
147:	learn: 0.0853558	test: 0.0954132	best: 0.0954132 (147)	total: 10.3s	remaining: 59.1s
148:	learn: 0.0850333	test: 0.0951156	best: 0.0951156 (148)	total: 10.3s	remaining: 59s
149:	learn: 0.0847927	test: 0.0948966	best: 0.0948966 (149)	total: 10.4s	remaining: 58.8s
150:	learn: 0.0844375	test: 0.0945600	best: 0.0945600 (150)	total: 10.4s	remaining: 58.7s
151:	learn: 0.0840757	test: 0.0942256	best: 0.0942256 (151)	total: 10.6s	remaining: 59.2s
152:	learn: 0.0839483	test: 0.0941241	best: 0.0941241 (152)	total: 10.6s	remaining: 59s
153:	learn: 0.0837360	test: 0.0939398	best: 0.0939398 (153)	total: 10.7s	remaining: 58.9s
154:	learn: 0.0834883	test: 0.0937053	best: 0.0937053 (154)	total: 10.8s	remaining: 58.8s
155:	learn: 0.0832749	test: 0.0935156	best: 0.0935156 (155)	total: 10.9s	remaining: 58.7s
156:	learn: 0.0830976	test: 0.0933562	best: 0.0933562 (156)	total: 10.9s	remaining: 58.5s
157:	learn: 0.0829704	test: 0.0932522	best: 0.0932522 (157)	total: 11s	remaining: 58.4s
158:	learn: 0.0826606	test: 0.0929595	best: 0.0929595 (158)	total: 11s	remaining: 58.3s
159:	learn: 0.0823652	test: 0.0926752	best: 0.0926752 (159)	total: 11.1s	remaining: 58.5s
160:	learn: 0.0821015	test: 0.0924482	best: 0.0924482 (160)	total: 11.4s	remaining: 59.3s
161:	learn: 0.0819636	test: 0.0923445	best: 0.0923445 (161)	total: 11.4s	remaining: 59.1s
162:	learn: 0.0817985	test: 0.0922017	best: 0.0922017 (162)	total: 11.5s	remaining: 59.1s
163:	learn: 0.0816794	test: 0.0921086	best: 0.0921086 (163)	total: 11.6s	remaining: 59s
164:	learn: 0.0814931	test: 0.0919454	best: 0.0919454 (164)	total: 11.6s	remaining: 58.9s
165:	learn: 0.0813151	test: 0.0917953	best: 0.0917953 (165)	total: 11.9s	remaining: 59.6s
166:	learn: 0.0812316	test: 0.0917336	best: 0.0917336 (166)	total: 11.9s	remaining: 59.3s
167:	learn: 0.0810237	test: 0.0915420	best: 0.0915420 (167)	total: 11.9s	remaining: 59.2s
168:	learn: 0.0808926	test: 0.0914226	best: 0.0914226 (168)	total: 12s	remaining: 59.2s
169:	learn: 0.0806889	test: 0.0912335	best: 0.0912335 (169)	total: 12.2s	remaining: 59.7s
170:	learn: 0.0805131	test: 0.0910703	best: 0.0910703 (170)	total: 12.3s	remaining: 59.6s
171:	learn: 0.0803582	test: 0.0909262	best: 0.0909262 (171)	total: 12.3s	remaining: 59.4s
172:	learn: 0.0802885	test: 0.0908766	best: 0.0908766 (172)	total: 12.4s	remaining: 59.1s
173:	learn: 0.0802204	test: 0.0908283	best: 0.0908283 (173)	total: 12.4s	remaining: 58.8s
174:	learn: 0.0800898	test: 0.0907133	best: 0.0907133 (174)	total: 12.4s	remaining: 58.6s
175:	learn: 0.0799844	test: 0.0906255	best: 0.0906255 (175)	total: 12.5s	remaining: 58.5s
176:	learn: 0.0797806	test: 0.0904461	best: 0.0904461 (176)	total: 12.6s	remaining: 58.6s
177:	learn: 0.0796947	test: 0.0903856	best: 0.0903856 (177)	total: 12.7s	remaining: 58.4s
178:	learn: 0.0795913	test: 0.0902953	best: 0.0902953 (178)	total: 12.7s	remaining: 58.2s
179:	learn: 0.0793722	test: 0.0901465	best: 0.0901465 (179)	total: 13.3s	remaining: 1m
180:	learn: 0.0792816	test: 0.0900687	best: 0.0900687 (180)	total: 13.3s	remaining: 1m
181:	learn: 0.0792274	test: 0.0900324	best: 0.0900324 (181)	total: 13.3s	remaining: 59.9s
182:	learn: 0.0790337	test: 0.0898653	best: 0.0898653 (182)	total: 13.5s	remaining: 1m
183:	learn: 0.0789600	test: 0.0898095	best: 0.0898095 (183)	total: 13.5s	remaining: 59.9s
184:	learn: 0.0788005	test: 0.0896710	best: 0.0896710 (184)	total: 13.6s	remaining: 59.8s
185:	learn: 0.0786495	test: 0.0895354	best: 0.0895354 (185)	total: 13.6s	remaining: 59.7s
186:	learn: 0.0785715	test: 0.0894692	best: 0.0894692 (186)	total: 13.7s	remaining: 59.4s
187:	learn: 0.0784749	test: 0.0893838	best: 0.0893838 (187)	total: 13.7s	remaining: 59.3s
188:	learn: 0.0784309	test: 0.0893562	best: 0.0893562 (188)	total: 13.8s	remaining: 59s
189:	learn: 0.0783716	test: 0.0893128	best: 0.0893128 (189)	total: 13.8s	remaining: 58.8s
190:	learn: 0.0782588	test: 0.0892136	best: 0.0892136 (190)	total: 13.9s	remaining: 58.7s
191:	learn: 0.0781435	test: 0.0891121	best: 0.0891121 (191)	total: 14s	remaining: 59.1s
192:	learn: 0.0779856	test: 0.0889622	best: 0.0889622 (192)	total: 14.1s	remaining: 59.1s
193:	learn: 0.0778036	test: 0.0888403	best: 0.0888403 (193)	total: 14.3s	remaining: 59.6s
194:	learn: 0.0777052	test: 0.0887526	best: 0.0887526 (194)	total: 14.4s	remaining: 59.4s
195:	learn: 0.0776438	test: 0.0887083	best: 0.0887083 (195)	total: 14.4s	remaining: 59.2s
196:	learn: 0.0775521	test: 0.0886236	best: 0.0886236 (196)	total: 14.5s	remaining: 59.1s
197:	learn: 0.0774682	test: 0.0885470	best: 0.0885470 (197)	total: 14.5s	remaining: 58.9s
198:	learn: 0.0774356	test: 0.0885286	best: 0.0885286 (198)	total: 14.6s	remaining: 58.6s
199:	learn: 0.0772974	test: 0.0884110	best: 0.0884110 (199)	total: 15.3s	remaining: 1m 1s
200:	learn: 0.0772500	test: 0.0883804	best: 0.0883804 (200)	total: 15.4s	remaining: 1m 1s
201:	learn: 0.0771896	test: 0.0883296	best: 0.0883296 (201)	total: 15.4s	remaining: 1m
202:	learn: 0.0771442	test: 0.0883006	best: 0.0883006 (202)	total: 15.4s	remaining: 1m
203:	learn: 0.0770066	test: 0.0882033	best: 0.0882033 (203)	total: 15.7s	remaining: 1m 1s
204:	learn: 0.0769245	test: 0.0881290	best: 0.0881290 (204)	total: 15.7s	remaining: 1m
205:	learn: 0.0767774	test: 0.0880209	best: 0.0880209 (205)	total: 15.9s	remaining: 1m 1s
206:	learn: 0.0766590	test: 0.0879210	best: 0.0879210 (206)	total: 16s	remaining: 1m 1s
207:	learn: 0.0765972	test: 0.0878800	best: 0.0878800 (207)	total: 16.1s	remaining: 1m 1s
208:	learn: 0.0765730	test: 0.0878683	best: 0.0878683 (208)	total: 16.1s	remaining: 1m 1s
209:	learn: 0.0764997	test: 0.0878037	best: 0.0878037 (209)	total: 16.2s	remaining: 1m
210:	learn: 0.0763605	test: 0.0876917	best: 0.0876917 (210)	total: 17s	remaining: 1m 3s
211:	learn: 0.0763384	test: 0.0876815	best: 0.0876815 (211)	total: 17.1s	remaining: 1m 3s
212:	learn: 0.0762407	test: 0.0875943	best: 0.0875943 (212)	total: 17.1s	remaining: 1m 3s
213:	learn: 0.0761279	test: 0.0874988	best: 0.0874988 (213)	total: 17.3s	remaining: 1m 3s
214:	learn: 0.0760967	test: 0.0874787	best: 0.0874787 (214)	total: 17.4s	remaining: 1m 3s
215:	learn: 0.0760640	test: 0.0874600	best: 0.0874600 (215)	total: 17.5s	remaining: 1m 3s
216:	learn: 0.0759704	test: 0.0873782	best: 0.0873782 (216)	total: 17.6s	remaining: 1m 3s
217:	learn: 0.0759124	test: 0.0873347	best: 0.0873347 (217)	total: 17.6s	remaining: 1m 3s
218:	learn: 0.0757366	test: 0.0872603	best: 0.0872603 (218)	total: 18.3s	remaining: 1m 5s
219:	learn: 0.0756689	test: 0.0871967	best: 0.0871967 (219)	total: 18.4s	remaining: 1m 5s
220:	learn: 0.0755760	test: 0.0871234	best: 0.0871234 (220)	total: 18.5s	remaining: 1m 5s
221:	learn: 0.0754819	test: 0.0870761	best: 0.0870761 (221)	total: 19.5s	remaining: 1m 8s
222:	learn: 0.0754557	test: 0.0870606	best: 0.0870606 (222)	total: 19.6s	remaining: 1m 8s
223:	learn: 0.0754291	test: 0.0870462	best: 0.0870462 (223)	total: 19.7s	remaining: 1m 8s
224:	learn: 0.0753865	test: 0.0870137	best: 0.0870137 (224)	total: 19.8s	remaining: 1m 8s
225:	learn: 0.0752465	test: 0.0869403	best: 0.0869403 (225)	total: 20.6s	remaining: 1m 10s
226:	learn: 0.0751637	test: 0.0868605	best: 0.0868605 (226)	total: 20.6s	remaining: 1m 10s
227:	learn: 0.0750765	test: 0.0868153	best: 0.0868153 (227)	total: 21.3s	remaining: 1m 12s
228:	learn: 0.0749712	test: 0.0867468	best: 0.0867468 (228)	total: 21.9s	remaining: 1m 13s
229:	learn: 0.0748637	test: 0.0866671	best: 0.0866671 (229)	total: 22.1s	remaining: 1m 13s
230:	learn: 0.0748518	test: 0.0866641	best: 0.0866641 (230)	total: 22.1s	remaining: 1m 13s
231:	learn: 0.0748144	test: 0.0866364	best: 0.0866364 (231)	total: 22.2s	remaining: 1m 13s
232:	learn: 0.0747981	test: 0.0866277	best: 0.0866277 (232)	total: 22.2s	remaining: 1m 13s
233:	learn: 0.0747229	test: 0.0865718	best: 0.0865718 (233)	total: 22.4s	remaining: 1m 13s
234:	learn: 0.0746901	test: 0.0865441	best: 0.0865441 (234)	total: 22.5s	remaining: 1m 13s
235:	learn: 0.0746605	test: 0.0865188	best: 0.0865188 (235)	total: 22.5s	remaining: 1m 12s
236:	learn: 0.0746179	test: 0.0864799	best: 0.0864799 (236)	total: 22.6s	remaining: 1m 12s
237:	learn: 0.0746080	test: 0.0864781	best: 0.0864781 (237)	total: 22.6s	remaining: 1m 12s
238:	learn: 0.0745511	test: 0.0864486	best: 0.0864486 (238)	total: 22.7s	remaining: 1m 12s
239:	learn: 0.0745238	test: 0.0864269	best: 0.0864269 (239)	total: 22.8s	remaining: 1m 12s
240:	learn: 0.0744126	test: 0.0863800	best: 0.0863800 (240)	total: 23.4s	remaining: 1m 13s
241:	learn: 0.0743595	test: 0.0863540	best: 0.0863540 (241)	total: 23.6s	remaining: 1m 13s
242:	learn: 0.0743509	test: 0.0863530	best: 0.0863530 (242)	total: 23.6s	remaining: 1m 13s
243:	learn: 0.0742712	test: 0.0863034	best: 0.0863034 (243)	total: 23.8s	remaining: 1m 13s
244:	learn: 0.0742538	test: 0.0862940	best: 0.0862940 (244)	total: 23.9s	remaining: 1m 13s
245:	learn: 0.0741982	test: 0.0862452	best: 0.0862452 (245)	total: 23.9s	remaining: 1m 13s
246:	learn: 0.0741587	test: 0.0862211	best: 0.0862211 (246)	total: 24s	remaining: 1m 13s
247:	learn: 0.0740912	test: 0.0861601	best: 0.0861601 (247)	total: 24.1s	remaining: 1m 13s
248:	learn: 0.0740034	test: 0.0861394	best: 0.0861394 (248)	total: 24.9s	remaining: 1m 15s
249:	learn: 0.0739358	test: 0.0860928	best: 0.0860928 (249)	total: 25s	remaining: 1m 15s
250:	learn: 0.0738917	test: 0.0860634	best: 0.0860634 (250)	total: 25.5s	remaining: 1m 15s
251:	learn: 0.0738407	test: 0.0860257	best: 0.0860257 (251)	total: 25.5s	remaining: 1m 15s
252:	learn: 0.0738345	test: 0.0860260	best: 0.0860257 (251)	total: 25.6s	remaining: 1m 15s
253:	learn: 0.0738145	test: 0.0860196	best: 0.0860196 (253)	total: 25.7s	remaining: 1m 15s
254:	learn: 0.0738087	test: 0.0860201	best: 0.0860196 (253)	total: 25.7s	remaining: 1m 15s
255:	learn: 0.0737665	test: 0.0859893	best: 0.0859893 (255)	total: 25.8s	remaining: 1m 14s
256:	learn: 0.0737609	test: 0.0859899	best: 0.0859893 (255)	total: 25.8s	remaining: 1m 14s
257:	learn: 0.0737337	test: 0.0859703	best: 0.0859703 (257)	total: 25.9s	remaining: 1m 14s
258:	learn: 0.0736830	test: 0.0859262	best: 0.0859262 (258)	total: 26s	remaining: 1m 14s
259:	learn: 0.0736706	test: 0.0859220	best: 0.0859220 (259)	total: 26s	remaining: 1m 14s
260:	learn: 0.0735458	test: 0.0859067	best: 0.0859067 (260)	total: 26.9s	remaining: 1m 16s
261:	learn: 0.0734833	test: 0.0858910	best: 0.0858910 (261)	total: 27.7s	remaining: 1m 17s
262:	learn: 0.0734399	test: 0.0858512	best: 0.0858512 (262)	total: 27.7s	remaining: 1m 17s
263:	learn: 0.0733858	test: 0.0858267	best: 0.0858267 (263)	total: 27.8s	remaining: 1m 17s
264:	learn: 0.0732974	test: 0.0857757	best: 0.0857757 (264)	total: 28.6s	remaining: 1m 19s
265:	learn: 0.0732470	test: 0.0857369	best: 0.0857369 (265)	total: 28.6s	remaining: 1m 18s
266:	learn: 0.0731504	test: 0.0857222	best: 0.0857222 (266)	total: 29.3s	remaining: 1m 20s
267:	learn: 0.0730905	test: 0.0856901	best: 0.0856901 (267)	total: 29.5s	remaining: 1m 20s
268:	learn: 0.0730000	test: 0.0856532	best: 0.0856532 (268)	total: 30.1s	remaining: 1m 21s
269:	learn: 0.0729965	test: 0.0856547	best: 0.0856532 (268)	total: 30.1s	remaining: 1m 21s
270:	learn: 0.0729456	test: 0.0856256	best: 0.0856256 (270)	total: 30.2s	remaining: 1m 21s
271:	learn: 0.0728983	test: 0.0855926	best: 0.0855926 (271)	total: 30.3s	remaining: 1m 21s
272:	learn: 0.0728580	test: 0.0855687	best: 0.0855687 (272)	total: 30.5s	remaining: 1m 21s
273:	learn: 0.0728231	test: 0.0855389	best: 0.0855389 (273)	total: 30.5s	remaining: 1m 20s
274:	learn: 0.0728097	test: 0.0855376	best: 0.0855376 (274)	total: 30.6s	remaining: 1m 20s
275:	learn: 0.0727461	test: 0.0855011	best: 0.0855011 (275)	total: 30.9s	remaining: 1m 21s
276:	learn: 0.0726925	test: 0.0854625	best: 0.0854625 (276)	total: 31s	remaining: 1m 20s
277:	learn: 0.0726385	test: 0.0854240	best: 0.0854240 (277)	total: 31.8s	remaining: 1m 22s
278:	learn: 0.0725772	test: 0.0853972	best: 0.0853972 (278)	total: 32.5s	remaining: 1m 24s
279:	learn: 0.0725346	test: 0.0853840	best: 0.0853840 (279)	total: 32.7s	remaining: 1m 24s
280:	learn: 0.0724894	test: 0.0853636	best: 0.0853636 (280)	total: 33s	remaining: 1m 24s
281:	learn: 0.0724469	test: 0.0853587	best: 0.0853587 (281)	total: 33.4s	remaining: 1m 24s
282:	learn: 0.0724234	test: 0.0853358	best: 0.0853358 (282)	total: 33.4s	remaining: 1m 24s
283:	learn: 0.0723898	test: 0.0853422	best: 0.0853358 (282)	total: 34.3s	remaining: 1m 26s
284:	learn: 0.0723292	test: 0.0853276	best: 0.0853276 (284)	total: 34.6s	remaining: 1m 26s
285:	learn: 0.0722624	test: 0.0853163	best: 0.0853163 (285)	total: 35.3s	remaining: 1m 28s
286:	learn: 0.0722543	test: 0.0853120	best: 0.0853120 (286)	total: 35.4s	remaining: 1m 27s
287:	learn: 0.0721468	test: 0.0852799	best: 0.0852799 (287)	total: 36.1s	remaining: 1m 29s
288:	learn: 0.0720779	test: 0.0852696	best: 0.0852696 (288)	total: 36.4s	remaining: 1m 29s
289:	learn: 0.0720218	test: 0.0852343	best: 0.0852343 (289)	total: 36.9s	remaining: 1m 30s
290:	learn: 0.0719895	test: 0.0852102	best: 0.0852102 (290)	total: 37s	remaining: 1m 30s
291:	learn: 0.0719842	test: 0.0852082	best: 0.0852082 (291)	total: 37s	remaining: 1m 29s
292:	learn: 0.0719788	test: 0.0852059	best: 0.0852059 (292)	total: 37.1s	remaining: 1m 29s
293:	learn: 0.0719728	test: 0.0852050	best: 0.0852050 (293)	total: 37.1s	remaining: 1m 29s
294:	learn: 0.0719607	test: 0.0852007	best: 0.0852007 (294)	total: 37.3s	remaining: 1m 29s
295:	learn: 0.0718690	test: 0.0851889	best: 0.0851889 (295)	total: 38.2s	remaining: 1m 30s
296:	learn: 0.0718259	test: 0.0851756	best: 0.0851756 (296)	total: 39s	remaining: 1m 32s
297:	learn: 0.0717731	test: 0.0851646	best: 0.0851646 (297)	total: 39.3s	remaining: 1m 32s
298:	learn: 0.0717227	test: 0.0851439	best: 0.0851439 (298)	total: 40s	remaining: 1m 33s
299:	learn: 0.0716675	test: 0.0851106	best: 0.0851106 (299)	total: 40.9s	remaining: 1m 35s
300:	learn: 0.0716389	test: 0.0850812	best: 0.0850812 (300)	total: 41s	remaining: 1m 35s
301:	learn: 0.0716227	test: 0.0850739	best: 0.0850739 (301)	total: 41.2s	remaining: 1m 35s
302:	learn: 0.0716217	test: 0.0850756	best: 0.0850739 (301)	total: 41.2s	remaining: 1m 34s
303:	learn: 0.0716029	test: 0.0850694	best: 0.0850694 (303)	total: 41.4s	remaining: 1m 34s
304:	learn: 0.0714780	test: 0.0850425	best: 0.0850425 (304)	total: 42s	remaining: 1m 35s
305:	learn: 0.0714636	test: 0.0850443	best: 0.0850425 (304)	total: 42.2s	remaining: 1m 35s
306:	learn: 0.0713871	test: 0.0850059	best: 0.0850059 (306)	total: 42.9s	remaining: 1m 36s
307:	learn: 0.0713736	test: 0.0850118	best: 0.0850059 (306)	total: 42.9s	remaining: 1m 36s
308:	learn: 0.0713468	test: 0.0849880	best: 0.0849880 (308)	total: 43.1s	remaining: 1m 36s
309:	learn: 0.0713126	test: 0.0849897	best: 0.0849880 (308)	total: 43.5s	remaining: 1m 36s
310:	learn: 0.0712745	test: 0.0849822	best: 0.0849822 (310)	total: 43.6s	remaining: 1m 36s
311:	learn: 0.0712655	test: 0.0849731	best: 0.0849731 (311)	total: 43.7s	remaining: 1m 36s
312:	learn: 0.0711761	test: 0.0849839	best: 0.0849731 (311)	total: 44.5s	remaining: 1m 37s
313:	learn: 0.0710745	test: 0.0849865	best: 0.0849731 (311)	total: 45.2s	remaining: 1m 38s
314:	learn: 0.0710447	test: 0.0849918	best: 0.0849731 (311)	total: 45.4s	remaining: 1m 38s
315:	learn: 0.0710272	test: 0.0849759	best: 0.0849731 (311)	total: 45.5s	remaining: 1m 38s
316:	learn: 0.0709646	test: 0.0849638	best: 0.0849638 (316)	total: 46.3s	remaining: 1m 39s
317:	learn: 0.0709536	test: 0.0849549	best: 0.0849549 (317)	total: 46.4s	remaining: 1m 39s
318:	learn: 0.0709271	test: 0.0849621	best: 0.0849549 (317)	total: 46.5s	remaining: 1m 39s
319:	learn: 0.0708761	test: 0.0849514	best: 0.0849514 (319)	total: 47.2s	remaining: 1m 40s
320:	learn: 0.0708554	test: 0.0849308	best: 0.0849308 (320)	total: 47.2s	remaining: 1m 39s
321:	learn: 0.0708459	test: 0.0849205	best: 0.0849205 (321)	total: 47.3s	remaining: 1m 39s
322:	learn: 0.0708162	test: 0.0849035	best: 0.0849035 (322)	total: 47.4s	remaining: 1m 39s
323:	learn: 0.0707843	test: 0.0848901	best: 0.0848901 (323)	total: 47.7s	remaining: 1m 39s
324:	learn: 0.0707693	test: 0.0848818	best: 0.0848818 (324)	total: 48.1s	remaining: 1m 39s
325:	learn: 0.0706971	test: 0.0848564	best: 0.0848564 (325)	total: 48.7s	remaining: 1m 40s
326:	learn: 0.0706901	test: 0.0848493	best: 0.0848493 (326)	total: 48.8s	remaining: 1m 40s
327:	learn: 0.0706522	test: 0.0848462	best: 0.0848462 (327)	total: 49.5s	remaining: 1m 41s
328:	learn: 0.0706208	test: 0.0848251	best: 0.0848251 (328)	total: 49.6s	remaining: 1m 41s
329:	learn: 0.0706108	test: 0.0848281	best: 0.0848251 (328)	total: 49.7s	remaining: 1m 40s
330:	learn: 0.0705829	test: 0.0848134	best: 0.0848134 (330)	total: 49.8s	remaining: 1m 40s
331:	learn: 0.0705032	test: 0.0847914	best: 0.0847914 (331)	total: 50.5s	remaining: 1m 41s
332:	learn: 0.0705000	test: 0.0847891	best: 0.0847891 (332)	total: 50.6s	remaining: 1m 41s
333:	learn: 0.0704752	test: 0.0847809	best: 0.0847809 (333)	total: 50.9s	remaining: 1m 41s
334:	learn: 0.0704701	test: 0.0847769	best: 0.0847769 (334)	total: 50.9s	remaining: 1m 41s
335:	learn: 0.0704379	test: 0.0847687	best: 0.0847687 (335)	total: 51.1s	remaining: 1m 40s
336:	learn: 0.0704210	test: 0.0847587	best: 0.0847587 (336)	total: 51.3s	remaining: 1m 40s
337:	learn: 0.0704054	test: 0.0847600	best: 0.0847587 (336)	total: 52.2s	remaining: 1m 42s
338:	learn: 0.0703687	test: 0.0847424	best: 0.0847424 (338)	total: 53.1s	remaining: 1m 43s
339:	learn: 0.0703386	test: 0.0847447	best: 0.0847424 (338)	total: 53.2s	remaining: 1m 43s
340:	learn: 0.0703242	test: 0.0847323	best: 0.0847323 (340)	total: 53.2s	remaining: 1m 42s
341:	learn: 0.0702925	test: 0.0847387	best: 0.0847323 (340)	total: 53.5s	remaining: 1m 42s
342:	learn: 0.0702806	test: 0.0847277	best: 0.0847277 (342)	total: 53.6s	remaining: 1m 42s
343:	learn: 0.0702615	test: 0.0847323	best: 0.0847277 (342)	total: 54s	remaining: 1m 42s
344:	learn: 0.0701849	test: 0.0847262	best: 0.0847262 (344)	total: 54.7s	remaining: 1m 43s
345:	learn: 0.0701661	test: 0.0847268	best: 0.0847262 (344)	total: 54.9s	remaining: 1m 43s
346:	learn: 0.0701534	test: 0.0847146	best: 0.0847146 (346)	total: 54.9s	remaining: 1m 43s
347:	learn: 0.0700199	test: 0.0847115	best: 0.0847115 (347)	total: 55.7s	remaining: 1m 44s
348:	learn: 0.0699735	test: 0.0846984	best: 0.0846984 (348)	total: 56.4s	remaining: 1m 45s
349:	learn: 0.0699535	test: 0.0846995	best: 0.0846984 (348)	total: 57.3s	remaining: 1m 46s
350:	learn: 0.0698802	test: 0.0847079	best: 0.0846984 (348)	total: 58.1s	remaining: 1m 47s
351:	learn: 0.0698582	test: 0.0847024	best: 0.0846984 (348)	total: 58.4s	remaining: 1m 47s
352:	learn: 0.0697782	test: 0.0846854	best: 0.0846854 (352)	total: 59.2s	remaining: 1m 48s
353:	learn: 0.0696754	test: 0.0846784	best: 0.0846784 (353)	total: 60s	remaining: 1m 49s
354:	learn: 0.0696734	test: 0.0846781	best: 0.0846781 (354)	total: 1m	remaining: 1m 49s
355:	learn: 0.0696232	test: 0.0846626	best: 0.0846626 (355)	total: 1m	remaining: 1m 50s
356:	learn: 0.0696020	test: 0.0846492	best: 0.0846492 (356)	total: 1m	remaining: 1m 49s
357:	learn: 0.0695891	test: 0.0846569	best: 0.0846492 (356)	total: 1m 1s	remaining: 1m 49s
358:	learn: 0.0695829	test: 0.0846608	best: 0.0846492 (356)	total: 1m 1s	remaining: 1m 49s
359:	learn: 0.0695547	test: 0.0846459	best: 0.0846459 (359)	total: 1m 1s	remaining: 1m 49s
360:	learn: 0.0695235	test: 0.0846416	best: 0.0846416 (360)	total: 1m 1s	remaining: 1m 49s
361:	learn: 0.0695040	test: 0.0846301	best: 0.0846301 (361)	total: 1m 1s	remaining: 1m 48s
362:	learn: 0.0694810	test: 0.0846122	best: 0.0846122 (362)	total: 1m 1s	remaining: 1m 48s
363:	learn: 0.0694710	test: 0.0846072	best: 0.0846072 (363)	total: 1m 2s	remaining: 1m 48s
364:	learn: 0.0694598	test: 0.0845972	best: 0.0845972 (364)	total: 1m 2s	remaining: 1m 48s
365:	learn: 0.0694352	test: 0.0846027	best: 0.0845972 (364)	total: 1m 2s	remaining: 1m 49s
366:	learn: 0.0693739	test: 0.0845991	best: 0.0845972 (364)	total: 1m 3s	remaining: 1m 49s
367:	learn: 0.0693292	test: 0.0845963	best: 0.0845963 (367)	total: 1m 4s	remaining: 1m 50s
368:	learn: 0.0693138	test: 0.0845958	best: 0.0845958 (368)	total: 1m 4s	remaining: 1m 50s
369:	learn: 0.0692605	test: 0.0845851	best: 0.0845851 (369)	total: 1m 4s	remaining: 1m 50s
370:	learn: 0.0692461	test: 0.0845777	best: 0.0845777 (370)	total: 1m 5s	remaining: 1m 50s
371:	learn: 0.0692202	test: 0.0845714	best: 0.0845714 (371)	total: 1m 5s	remaining: 1m 50s
372:	learn: 0.0691919	test: 0.0845742	best: 0.0845714 (371)	total: 1m 6s	remaining: 1m 51s
373:	learn: 0.0691371	test: 0.0845681	best: 0.0845681 (373)	total: 1m 6s	remaining: 1m 51s
374:	learn: 0.0690961	test: 0.0845688	best: 0.0845681 (373)	total: 1m 7s	remaining: 1m 52s
375:	learn: 0.0690751	test: 0.0845574	best: 0.0845574 (375)	total: 1m 7s	remaining: 1m 52s
376:	learn: 0.0689768	test: 0.0845485	best: 0.0845485 (376)	total: 1m 8s	remaining: 1m 53s
377:	learn: 0.0689755	test: 0.0845468	best: 0.0845468 (377)	total: 1m 8s	remaining: 1m 52s
378:	learn: 0.0689644	test: 0.0845354	best: 0.0845354 (378)	total: 1m 8s	remaining: 1m 52s
379:	learn: 0.0689569	test: 0.0845325	best: 0.0845325 (379)	total: 1m 8s	remaining: 1m 51s
380:	learn: 0.0689185	test: 0.0845137	best: 0.0845137 (380)	total: 1m 9s	remaining: 1m 52s
381:	learn: 0.0688595	test: 0.0845242	best: 0.0845137 (380)	total: 1m 9s	remaining: 1m 52s
382:	learn: 0.0688495	test: 0.0845119	best: 0.0845119 (382)	total: 1m 9s	remaining: 1m 52s
383:	learn: 0.0688480	test: 0.0845114	best: 0.0845114 (383)	total: 1m 9s	remaining: 1m 51s
384:	learn: 0.0688089	test: 0.0845024	best: 0.0845024 (384)	total: 1m 10s	remaining: 1m 52s
385:	learn: 0.0688013	test: 0.0844944	best: 0.0844944 (385)	total: 1m 10s	remaining: 1m 52s
386:	learn: 0.0687913	test: 0.0844890	best: 0.0844890 (386)	total: 1m 10s	remaining: 1m 51s
387:	learn: 0.0687810	test: 0.0844831	best: 0.0844831 (387)	total: 1m 10s	remaining: 1m 51s
388:	learn: 0.0687679	test: 0.0844721	best: 0.0844721 (388)	total: 1m 10s	remaining: 1m 51s
389:	learn: 0.0687264	test: 0.0844768	best: 0.0844721 (388)	total: 1m 11s	remaining: 1m 52s
390:	learn: 0.0687138	test: 0.0844709	best: 0.0844709 (390)	total: 1m 11s	remaining: 1m 51s
391:	learn: 0.0687114	test: 0.0844711	best: 0.0844709 (390)	total: 1m 11s	remaining: 1m 51s
392:	learn: 0.0687000	test: 0.0844736	best: 0.0844709 (390)	total: 1m 12s	remaining: 1m 51s
393:	learn: 0.0686407	test: 0.0844561	best: 0.0844561 (393)	total: 1m 12s	remaining: 1m 52s
394:	learn: 0.0686391	test: 0.0844539	best: 0.0844539 (394)	total: 1m 13s	remaining: 1m 51s
395:	learn: 0.0686306	test: 0.0844429	best: 0.0844429 (395)	total: 1m 13s	remaining: 1m 51s
396:	learn: 0.0686179	test: 0.0844513	best: 0.0844429 (395)	total: 1m 13s	remaining: 1m 51s
397:	learn: 0.0686164	test: 0.0844494	best: 0.0844429 (395)	total: 1m 13s	remaining: 1m 50s
398:	learn: 0.0685791	test: 0.0844507	best: 0.0844429 (395)	total: 1m 13s	remaining: 1m 50s
399:	learn: 0.0685695	test: 0.0844587	best: 0.0844429 (395)	total: 1m 13s	remaining: 1m 50s
400:	learn: 0.0685259	test: 0.0844711	best: 0.0844429 (395)	total: 1m 14s	remaining: 1m 51s
401:	learn: 0.0684858	test: 0.0844785	best: 0.0844429 (395)	total: 1m 15s	remaining: 1m 52s
402:	learn: 0.0684657	test: 0.0844695	best: 0.0844429 (395)	total: 1m 16s	remaining: 1m 53s
403:	learn: 0.0684645	test: 0.0844689	best: 0.0844429 (395)	total: 1m 16s	remaining: 1m 52s
404:	learn: 0.0683909	test: 0.0844857	best: 0.0844429 (395)	total: 1m 17s	remaining: 1m 53s
405:	learn: 0.0683846	test: 0.0844798	best: 0.0844429 (395)	total: 1m 17s	remaining: 1m 53s
406:	learn: 0.0683658	test: 0.0844764	best: 0.0844429 (395)	total: 1m 17s	remaining: 1m 53s
407:	learn: 0.0683455	test: 0.0844678	best: 0.0844429 (395)	total: 1m 17s	remaining: 1m 53s
408:	learn: 0.0683204	test: 0.0844668	best: 0.0844429 (395)	total: 1m 18s	remaining: 1m 53s
409:	learn: 0.0683119	test: 0.0844628	best: 0.0844429 (395)	total: 1m 18s	remaining: 1m 52s
410:	learn: 0.0683039	test: 0.0844669	best: 0.0844429 (395)	total: 1m 18s	remaining: 1m 52s
411:	learn: 0.0682912	test: 0.0844755	best: 0.0844429 (395)	total: 1m 18s	remaining: 1m 52s
412:	learn: 0.0682711	test: 0.0844816	best: 0.0844429 (395)	total: 1m 19s	remaining: 1m 53s
413:	learn: 0.0682452	test: 0.0844731	best: 0.0844429 (395)	total: 1m 19s	remaining: 1m 53s
414:	learn: 0.0682353	test: 0.0844767	best: 0.0844429 (395)	total: 1m 19s	remaining: 1m 52s
415:	learn: 0.0682002	test: 0.0844725	best: 0.0844429 (395)	total: 1m 20s	remaining: 1m 53s
416:	learn: 0.0681801	test: 0.0844760	best: 0.0844429 (395)	total: 1m 20s	remaining: 1m 53s
417:	learn: 0.0681687	test: 0.0844723	best: 0.0844429 (395)	total: 1m 21s	remaining: 1m 52s
418:	learn: 0.0681144	test: 0.0844531	best: 0.0844429 (395)	total: 1m 21s	remaining: 1m 53s
419:	learn: 0.0680315	test: 0.0844599	best: 0.0844429 (395)	total: 1m 22s	remaining: 1m 53s
420:	learn: 0.0680281	test: 0.0844564	best: 0.0844429 (395)	total: 1m 22s	remaining: 1m 53s
421:	learn: 0.0679833	test: 0.0844628	best: 0.0844429 (395)	total: 1m 23s	remaining: 1m 54s
422:	learn: 0.0679715	test: 0.0844566	best: 0.0844429 (395)	total: 1m 23s	remaining: 1m 53s
423:	learn: 0.0679622	test: 0.0844525	best: 0.0844429 (395)	total: 1m 23s	remaining: 1m 53s
424:	learn: 0.0679544	test: 0.0844451	best: 0.0844429 (395)	total: 1m 23s	remaining: 1m 53s
425:	learn: 0.0679116	test: 0.0844458	best: 0.0844429 (395)	total: 1m 24s	remaining: 1m 54s
426:	learn: 0.0679008	test: 0.0844429	best: 0.0844429 (395)	total: 1m 24s	remaining: 1m 53s
427:	learn: 0.0678938	test: 0.0844351	best: 0.0844351 (427)	total: 1m 24s	remaining: 1m 53s
428:	learn: 0.0678906	test: 0.0844311	best: 0.0844311 (428)	total: 1m 24s	remaining: 1m 53s
429:	learn: 0.0678854	test: 0.0844326	best: 0.0844311 (428)	total: 1m 25s	remaining: 1m 52s
430:	learn: 0.0678843	test: 0.0844311	best: 0.0844311 (430)	total: 1m 25s	remaining: 1m 52s
431:	learn: 0.0678529	test: 0.0844287	best: 0.0844287 (431)	total: 1m 26s	remaining: 1m 53s
432:	learn: 0.0678487	test: 0.0844241	best: 0.0844241 (432)	total: 1m 26s	remaining: 1m 52s
433:	learn: 0.0678278	test: 0.0844109	best: 0.0844109 (433)	total: 1m 26s	remaining: 1m 52s
434:	learn: 0.0677970	test: 0.0844001	best: 0.0844001 (434)	total: 1m 27s	remaining: 1m 53s
435:	learn: 0.0677878	test: 0.0843920	best: 0.0843920 (435)	total: 1m 27s	remaining: 1m 52s
436:	learn: 0.0677805	test: 0.0843845	best: 0.0843845 (436)	total: 1m 27s	remaining: 1m 52s
437:	learn: 0.0677710	test: 0.0843826	best: 0.0843826 (437)	total: 1m 27s	remaining: 1m 52s
438:	learn: 0.0677640	test: 0.0843763	best: 0.0843763 (438)	total: 1m 27s	remaining: 1m 51s
439:	learn: 0.0677323	test: 0.0843856	best: 0.0843763 (438)	total: 1m 28s	remaining: 1m 52s
440:	learn: 0.0677205	test: 0.0843789	best: 0.0843763 (438)	total: 1m 28s	remaining: 1m 52s
441:	learn: 0.0676836	test: 0.0843726	best: 0.0843726 (441)	total: 1m 29s	remaining: 1m 52s
442:	learn: 0.0676681	test: 0.0843661	best: 0.0843661 (442)	total: 1m 29s	remaining: 1m 52s
443:	learn: 0.0676231	test: 0.0843795	best: 0.0843661 (442)	total: 1m 30s	remaining: 1m 53s
444:	learn: 0.0675917	test: 0.0843868	best: 0.0843661 (442)	total: 1m 31s	remaining: 1m 53s
445:	learn: 0.0674977	test: 0.0843897	best: 0.0843661 (442)	total: 1m 31s	remaining: 1m 54s
446:	learn: 0.0674943	test: 0.0843856	best: 0.0843661 (442)	total: 1m 31s	remaining: 1m 53s
447:	learn: 0.0674892	test: 0.0843809	best: 0.0843661 (442)	total: 1m 32s	remaining: 1m 53s
448:	learn: 0.0674757	test: 0.0843791	best: 0.0843661 (442)	total: 1m 32s	remaining: 1m 53s
449:	learn: 0.0674089	test: 0.0843981	best: 0.0843661 (442)	total: 1m 32s	remaining: 1m 53s
450:	learn: 0.0674082	test: 0.0843972	best: 0.0843661 (442)	total: 1m 32s	remaining: 1m 53s
451:	learn: 0.0673779	test: 0.0844063	best: 0.0843661 (442)	total: 1m 33s	remaining: 1m 53s
452:	learn: 0.0673360	test: 0.0844203	best: 0.0843661 (442)	total: 1m 34s	remaining: 1m 53s
453:	learn: 0.0673300	test: 0.0844146	best: 0.0843661 (442)	total: 1m 34s	remaining: 1m 53s
454:	learn: 0.0672389	test: 0.0844236	best: 0.0843661 (442)	total: 1m 35s	remaining: 1m 53s
455:	learn: 0.0672378	test: 0.0844216	best: 0.0843661 (442)	total: 1m 35s	remaining: 1m 53s
456:	learn: 0.0671870	test: 0.0844218	best: 0.0843661 (442)	total: 1m 35s	remaining: 1m 53s
457:	learn: 0.0671809	test: 0.0844196	best: 0.0843661 (442)	total: 1m 36s	remaining: 1m 53s
458:	learn: 0.0671802	test: 0.0844181	best: 0.0843661 (442)	total: 1m 36s	remaining: 1m 53s
459:	learn: 0.0671579	test: 0.0844239	best: 0.0843661 (442)	total: 1m 36s	remaining: 1m 53s
460:	learn: 0.0671481	test: 0.0844255	best: 0.0843661 (442)	total: 1m 37s	remaining: 1m 53s
461:	learn: 0.0671280	test: 0.0844288	best: 0.0843661 (442)	total: 1m 37s	remaining: 1m 53s
462:	learn: 0.0671168	test: 0.0844225	best: 0.0843661 (442)	total: 1m 37s	remaining: 1m 52s
463:	learn: 0.0670844	test: 0.0844250	best: 0.0843661 (442)	total: 1m 38s	remaining: 1m 53s
464:	learn: 0.0670571	test: 0.0844208	best: 0.0843661 (442)	total: 1m 38s	remaining: 1m 53s
465:	learn: 0.0669860	test: 0.0844126	best: 0.0843661 (442)	total: 1m 39s	remaining: 1m 54s
466:	learn: 0.0669530	test: 0.0844231	best: 0.0843661 (442)	total: 1m 40s	remaining: 1m 54s
467:	learn: 0.0669354	test: 0.0844156	best: 0.0843661 (442)	total: 1m 40s	remaining: 1m 54s
468:	learn: 0.0669346	test: 0.0844145	best: 0.0843661 (442)	total: 1m 40s	remaining: 1m 54s
469:	learn: 0.0669340	test: 0.0844130	best: 0.0843661 (442)	total: 1m 40s	remaining: 1m 53s
470:	learn: 0.0669284	test: 0.0844085	best: 0.0843661 (442)	total: 1m 41s	remaining: 1m 53s
471:	learn: 0.0668549	test: 0.0844194	best: 0.0843661 (442)	total: 1m 41s	remaining: 1m 53s
472:	learn: 0.0668312	test: 0.0844227	best: 0.0843661 (442)	total: 1m 42s	remaining: 1m 54s
473:	learn: 0.0668046	test: 0.0844241	best: 0.0843661 (442)	total: 1m 42s	remaining: 1m 54s
474:	learn: 0.0667652	test: 0.0844230	best: 0.0843661 (442)	total: 1m 43s	remaining: 1m 54s
475:	learn: 0.0667294	test: 0.0844241	best: 0.0843661 (442)	total: 1m 44s	remaining: 1m 54s
476:	learn: 0.0667240	test: 0.0844164	best: 0.0843661 (442)	total: 1m 44s	remaining: 1m 54s
477:	learn: 0.0666711	test: 0.0844327	best: 0.0843661 (442)	total: 1m 45s	remaining: 1m 54s
478:	learn: 0.0666439	test: 0.0844238	best: 0.0843661 (442)	total: 1m 45s	remaining: 1m 54s
479:	learn: 0.0666228	test: 0.0844298	best: 0.0843661 (442)	total: 1m 45s	remaining: 1m 54s
480:	learn: 0.0666184	test: 0.0844245	best: 0.0843661 (442)	total: 1m 45s	remaining: 1m 54s
481:	learn: 0.0666102	test: 0.0844267	best: 0.0843661 (442)	total: 1m 45s	remaining: 1m 53s
482:	learn: 0.0665889	test: 0.0844276	best: 0.0843661 (442)	total: 1m 46s	remaining: 1m 53s
483:	learn: 0.0665032	test: 0.0844308	best: 0.0843661 (442)	total: 1m 47s	remaining: 1m 54s
484:	learn: 0.0663898	test: 0.0844549	best: 0.0843661 (442)	total: 1m 47s	remaining: 1m 54s
485:	learn: 0.0663684	test: 0.0844539	best: 0.0843661 (442)	total: 1m 48s	remaining: 1m 55s
486:	learn: 0.0663611	test: 0.0844478	best: 0.0843661 (442)	total: 1m 48s	remaining: 1m 54s
487:	learn: 0.0663598	test: 0.0844477	best: 0.0843661 (442)	total: 1m 48s	remaining: 1m 54s
488:	learn: 0.0663557	test: 0.0844428	best: 0.0843661 (442)	total: 1m 49s	remaining: 1m 53s
489:	learn: 0.0663325	test: 0.0844510	best: 0.0843661 (442)	total: 1m 49s	remaining: 1m 54s
490:	learn: 0.0663250	test: 0.0844443	best: 0.0843661 (442)	total: 1m 49s	remaining: 1m 53s
491:	learn: 0.0663196	test: 0.0844431	best: 0.0843661 (442)	total: 1m 50s	remaining: 1m 53s
492:	learn: 0.0663193	test: 0.0844416	best: 0.0843661 (442)	total: 1m 50s	remaining: 1m 53s
493:	learn: 0.0663124	test: 0.0844387	best: 0.0843661 (442)	total: 1m 50s	remaining: 1m 52s
494:	learn: 0.0663115	test: 0.0844364	best: 0.0843661 (442)	total: 1m 50s	remaining: 1m 52s
495:	learn: 0.0663022	test: 0.0844383	best: 0.0843661 (442)	total: 1m 50s	remaining: 1m 52s
496:	learn: 0.0662045	test: 0.0844542	best: 0.0843661 (442)	total: 1m 51s	remaining: 1m 52s
497:	learn: 0.0662029	test: 0.0844535	best: 0.0843661 (442)	total: 1m 51s	remaining: 1m 52s
498:	learn: 0.0661867	test: 0.0844413	best: 0.0843661 (442)	total: 1m 52s	remaining: 1m 52s
499:	learn: 0.0661252	test: 0.0844549	best: 0.0843661 (442)	total: 1m 53s	remaining: 1m 53s
500:	learn: 0.0661121	test: 0.0844519	best: 0.0843661 (442)	total: 1m 54s	remaining: 1m 53s
501:	learn: 0.0661073	test: 0.0844482	best: 0.0843661 (442)	total: 1m 54s	remaining: 1m 53s
502:	learn: 0.0660835	test: 0.0844432	best: 0.0843661 (442)	total: 1m 55s	remaining: 1m 53s
503:	learn: 0.0660665	test: 0.0844383	best: 0.0843661 (442)	total: 1m 55s	remaining: 1m 53s
504:	learn: 0.0660660	test: 0.0844371	best: 0.0843661 (442)	total: 1m 55s	remaining: 1m 53s
505:	learn: 0.0660492	test: 0.0844287	best: 0.0843661 (442)	total: 1m 55s	remaining: 1m 52s
506:	learn: 0.0660486	test: 0.0844267	best: 0.0843661 (442)	total: 1m 55s	remaining: 1m 52s
507:	learn: 0.0660373	test: 0.0844306	best: 0.0843661 (442)	total: 1m 56s	remaining: 1m 52s
508:	learn: 0.0659921	test: 0.0844307	best: 0.0843661 (442)	total: 1m 56s	remaining: 1m 52s
509:	learn: 0.0659289	test: 0.0844255	best: 0.0843661 (442)	total: 1m 57s	remaining: 1m 53s
510:	learn: 0.0659114	test: 0.0844200	best: 0.0843661 (442)	total: 1m 57s	remaining: 1m 52s
511:	learn: 0.0658928	test: 0.0844154	best: 0.0843661 (442)	total: 1m 58s	remaining: 1m 52s
512:	learn: 0.0658296	test: 0.0844184	best: 0.0843661 (442)	total: 1m 58s	remaining: 1m 52s
513:	learn: 0.0658257	test: 0.0844185	best: 0.0843661 (442)	total: 1m 58s	remaining: 1m 52s
514:	learn: 0.0658090	test: 0.0844201	best: 0.0843661 (442)	total: 1m 58s	remaining: 1m 52s
515:	learn: 0.0658056	test: 0.0844179	best: 0.0843661 (442)	total: 1m 59s	remaining: 1m 51s
516:	learn: 0.0657703	test: 0.0844209	best: 0.0843661 (442)	total: 1m 59s	remaining: 1m 51s
517:	learn: 0.0657437	test: 0.0844222	best: 0.0843661 (442)	total: 2m	remaining: 1m 52s
518:	learn: 0.0657391	test: 0.0844195	best: 0.0843661 (442)	total: 2m	remaining: 1m 51s
519:	learn: 0.0656972	test: 0.0844096	best: 0.0843661 (442)	total: 2m 1s	remaining: 1m 52s
520:	learn: 0.0656699	test: 0.0844109	best: 0.0843661 (442)	total: 2m 2s	remaining: 1m 52s
521:	learn: 0.0656243	test: 0.0844203	best: 0.0843661 (442)	total: 2m 3s	remaining: 1m 52s
522:	learn: 0.0656212	test: 0.0844162	best: 0.0843661 (442)	total: 2m 3s	remaining: 1m 52s
523:	learn: 0.0655712	test: 0.0844201	best: 0.0843661 (442)	total: 2m 4s	remaining: 1m 52s
524:	learn: 0.0655694	test: 0.0844173	best: 0.0843661 (442)	total: 2m 4s	remaining: 1m 52s
525:	learn: 0.0654980	test: 0.0844077	best: 0.0843661 (442)	total: 2m 4s	remaining: 1m 52s
526:	learn: 0.0654963	test: 0.0844067	best: 0.0843661 (442)	total: 2m 4s	remaining: 1m 51s
527:	learn: 0.0654194	test: 0.0844080	best: 0.0843661 (442)	total: 2m 5s	remaining: 1m 52s
528:	learn: 0.0653810	test: 0.0844088	best: 0.0843661 (442)	total: 2m 6s	remaining: 1m 52s
529:	learn: 0.0652986	test: 0.0844173	best: 0.0843661 (442)	total: 2m 7s	remaining: 1m 52s
530:	learn: 0.0652966	test: 0.0844146	best: 0.0843661 (442)	total: 2m 7s	remaining: 1m 52s
531:	learn: 0.0652883	test: 0.0844158	best: 0.0843661 (442)	total: 2m 7s	remaining: 1m 52s
532:	learn: 0.0652879	test: 0.0844144	best: 0.0843661 (442)	total: 2m 7s	remaining: 1m 51s
533:	learn: 0.0652589	test: 0.0844143	best: 0.0843661 (442)	total: 2m 8s	remaining: 1m 52s
534:	learn: 0.0652328	test: 0.0844121	best: 0.0843661 (442)	total: 2m 9s	remaining: 1m 52s
535:	learn: 0.0652312	test: 0.0844102	best: 0.0843661 (442)	total: 2m 9s	remaining: 1m 51s
536:	learn: 0.0652056	test: 0.0844121	best: 0.0843661 (442)	total: 2m 10s	remaining: 1m 52s
537:	learn: 0.0651912	test: 0.0844029	best: 0.0843661 (442)	total: 2m 10s	remaining: 1m 51s
538:	learn: 0.0651710	test: 0.0844043	best: 0.0843661 (442)	total: 2m 10s	remaining: 1m 51s
539:	learn: 0.0651532	test: 0.0843974	best: 0.0843661 (442)	total: 2m 11s	remaining: 1m 52s
540:	learn: 0.0651319	test: 0.0844038	best: 0.0843661 (442)	total: 2m 12s	remaining: 1m 52s
541:	learn: 0.0650814	test: 0.0844090	best: 0.0843661 (442)	total: 2m 12s	remaining: 1m 52s
542:	learn: 0.0650788	test: 0.0844049	best: 0.0843661 (442)	total: 2m 13s	remaining: 1m 51s
543:	learn: 0.0650176	test: 0.0844132	best: 0.0843661 (442)	total: 2m 13s	remaining: 1m 52s
544:	learn: 0.0650017	test: 0.0844048	best: 0.0843661 (442)	total: 2m 14s	remaining: 1m 52s
545:	learn: 0.0649454	test: 0.0844144	best: 0.0843661 (442)	total: 2m 14s	remaining: 1m 52s
546:	learn: 0.0649362	test: 0.0844130	best: 0.0843661 (442)	total: 2m 16s	remaining: 1m 52s
547:	learn: 0.0648674	test: 0.0844155	best: 0.0843661 (442)	total: 2m 16s	remaining: 1m 52s
548:	learn: 0.0648622	test: 0.0844103	best: 0.0843661 (442)	total: 2m 16s	remaining: 1m 52s
549:	learn: 0.0648021	test: 0.0844121	best: 0.0843661 (442)	total: 2m 17s	remaining: 1m 52s
550:	learn: 0.0647620	test: 0.0844098	best: 0.0843661 (442)	total: 2m 18s	remaining: 1m 52s
551:	learn: 0.0647022	test: 0.0844086	best: 0.0843661 (442)	total: 2m 19s	remaining: 1m 52s
552:	learn: 0.0647015	test: 0.0844075	best: 0.0843661 (442)	total: 2m 19s	remaining: 1m 52s
553:	learn: 0.0647011	test: 0.0844060	best: 0.0843661 (442)	total: 2m 19s	remaining: 1m 52s
554:	learn: 0.0646931	test: 0.0844048	best: 0.0843661 (442)	total: 2m 19s	remaining: 1m 51s
555:	learn: 0.0646929	test: 0.0844032	best: 0.0843661 (442)	total: 2m 19s	remaining: 1m 51s
556:	learn: 0.0646614	test: 0.0844088	best: 0.0843661 (442)	total: 2m 20s	remaining: 1m 51s
557:	learn: 0.0646561	test: 0.0844048	best: 0.0843661 (442)	total: 2m 20s	remaining: 1m 51s
558:	learn: 0.0646440	test: 0.0844095	best: 0.0843661 (442)	total: 2m 20s	remaining: 1m 51s
559:	learn: 0.0645846	test: 0.0844070	best: 0.0843661 (442)	total: 2m 21s	remaining: 1m 51s
560:	learn: 0.0645828	test: 0.0844078	best: 0.0843661 (442)	total: 2m 21s	remaining: 1m 50s
561:	learn: 0.0645215	test: 0.0844066	best: 0.0843661 (442)	total: 2m 22s	remaining: 1m 51s
562:	learn: 0.0645163	test: 0.0844069	best: 0.0843661 (442)	total: 2m 22s	remaining: 1m 50s
563:	learn: 0.0645135	test: 0.0844028	best: 0.0843661 (442)	total: 2m 22s	remaining: 1m 50s
564:	learn: 0.0644212	test: 0.0844042	best: 0.0843661 (442)	total: 2m 23s	remaining: 1m 50s
565:	learn: 0.0644083	test: 0.0844017	best: 0.0843661 (442)	total: 2m 23s	remaining: 1m 50s
566:	learn: 0.0644080	test: 0.0844001	best: 0.0843661 (442)	total: 2m 23s	remaining: 1m 49s
567:	learn: 0.0644078	test: 0.0843985	best: 0.0843661 (442)	total: 2m 23s	remaining: 1m 49s
568:	learn: 0.0643869	test: 0.0844015	best: 0.0843661 (442)	total: 2m 24s	remaining: 1m 49s
569:	learn: 0.0643846	test: 0.0843980	best: 0.0843661 (442)	total: 2m 24s	remaining: 1m 49s
570:	learn: 0.0643740	test: 0.0843985	best: 0.0843661 (442)	total: 2m 25s	remaining: 1m 49s
571:	learn: 0.0643712	test: 0.0843990	best: 0.0843661 (442)	total: 2m 25s	remaining: 1m 48s
572:	learn: 0.0643689	test: 0.0843974	best: 0.0843661 (442)	total: 2m 25s	remaining: 1m 48s
573:	learn: 0.0643665	test: 0.0843950	best: 0.0843661 (442)	total: 2m 25s	remaining: 1m 48s
574:	learn: 0.0643552	test: 0.0843911	best: 0.0843661 (442)	total: 2m 26s	remaining: 1m 48s
575:	learn: 0.0643395	test: 0.0843871	best: 0.0843661 (442)	total: 2m 26s	remaining: 1m 48s
576:	learn: 0.0643050	test: 0.0843918	best: 0.0843661 (442)	total: 2m 27s	remaining: 1m 48s
577:	learn: 0.0642955	test: 0.0843834	best: 0.0843661 (442)	total: 2m 28s	remaining: 1m 48s
578:	learn: 0.0642936	test: 0.0843791	best: 0.0843661 (442)	total: 2m 28s	remaining: 1m 48s
579:	learn: 0.0642933	test: 0.0843774	best: 0.0843661 (442)	total: 2m 28s	remaining: 1m 47s
580:	learn: 0.0642498	test: 0.0843682	best: 0.0843661 (442)	total: 2m 29s	remaining: 1m 47s
581:	learn: 0.0642406	test: 0.0843689	best: 0.0843661 (442)	total: 2m 29s	remaining: 1m 47s
582:	learn: 0.0642384	test: 0.0843658	best: 0.0843658 (582)	total: 2m 29s	remaining: 1m 47s
583:	learn: 0.0642349	test: 0.0843672	best: 0.0843658 (582)	total: 2m 29s	remaining: 1m 46s
584:	learn: 0.0642307	test: 0.0843644	best: 0.0843644 (584)	total: 2m 29s	remaining: 1m 46s
585:	learn: 0.0642303	test: 0.0843631	best: 0.0843631 (585)	total: 2m 29s	remaining: 1m 45s
586:	learn: 0.0642202	test: 0.0843624	best: 0.0843624 (586)	total: 2m 30s	remaining: 1m 45s
587:	learn: 0.0642169	test: 0.0843652	best: 0.0843624 (586)	total: 2m 30s	remaining: 1m 45s
588:	learn: 0.0641778	test: 0.0843646	best: 0.0843624 (586)	total: 2m 31s	remaining: 1m 45s
589:	learn: 0.0641760	test: 0.0843607	best: 0.0843607 (589)	total: 2m 31s	remaining: 1m 45s
590:	learn: 0.0641757	test: 0.0843595	best: 0.0843595 (590)	total: 2m 31s	remaining: 1m 44s
591:	learn: 0.0641732	test: 0.0843548	best: 0.0843548 (591)	total: 2m 31s	remaining: 1m 44s
592:	learn: 0.0641508	test: 0.0843549	best: 0.0843548 (591)	total: 2m 32s	remaining: 1m 44s
593:	learn: 0.0641503	test: 0.0843537	best: 0.0843537 (593)	total: 2m 32s	remaining: 1m 44s
594:	learn: 0.0641415	test: 0.0843453	best: 0.0843453 (594)	total: 2m 32s	remaining: 1m 43s
595:	learn: 0.0641414	test: 0.0843439	best: 0.0843439 (595)	total: 2m 32s	remaining: 1m 43s
596:	learn: 0.0641349	test: 0.0843435	best: 0.0843435 (596)	total: 2m 32s	remaining: 1m 42s
597:	learn: 0.0641190	test: 0.0843446	best: 0.0843435 (596)	total: 2m 33s	remaining: 1m 43s
598:	learn: 0.0640819	test: 0.0843526	best: 0.0843435 (596)	total: 2m 34s	remaining: 1m 43s
599:	learn: 0.0640806	test: 0.0843505	best: 0.0843435 (596)	total: 2m 34s	remaining: 1m 43s
600:	learn: 0.0640231	test: 0.0843550	best: 0.0843435 (596)	total: 2m 35s	remaining: 1m 43s
601:	learn: 0.0640214	test: 0.0843573	best: 0.0843435 (596)	total: 2m 35s	remaining: 1m 42s
602:	learn: 0.0640155	test: 0.0843581	best: 0.0843435 (596)	total: 2m 35s	remaining: 1m 42s
603:	learn: 0.0640147	test: 0.0843573	best: 0.0843435 (596)	total: 2m 35s	remaining: 1m 42s
604:	learn: 0.0640083	test: 0.0843606	best: 0.0843435 (596)	total: 2m 35s	remaining: 1m 41s
605:	learn: 0.0640081	test: 0.0843592	best: 0.0843435 (596)	total: 2m 36s	remaining: 1m 41s
606:	learn: 0.0640022	test: 0.0843551	best: 0.0843435 (596)	total: 2m 36s	remaining: 1m 41s
607:	learn: 0.0639872	test: 0.0843540	best: 0.0843435 (596)	total: 2m 36s	remaining: 1m 40s
608:	learn: 0.0639804	test: 0.0843567	best: 0.0843435 (596)	total: 2m 36s	remaining: 1m 40s
609:	learn: 0.0639584	test: 0.0843532	best: 0.0843435 (596)	total: 2m 37s	remaining: 1m 40s
610:	learn: 0.0639455	test: 0.0843496	best: 0.0843435 (596)	total: 2m 37s	remaining: 1m 40s
611:	learn: 0.0639424	test: 0.0843480	best: 0.0843435 (596)	total: 2m 37s	remaining: 1m 40s
612:	learn: 0.0638865	test: 0.0843415	best: 0.0843415 (612)	total: 2m 38s	remaining: 1m 40s
613:	learn: 0.0637995	test: 0.0843552	best: 0.0843415 (612)	total: 2m 39s	remaining: 1m 40s
614:	learn: 0.0637398	test: 0.0843563	best: 0.0843415 (612)	total: 2m 40s	remaining: 1m 40s
615:	learn: 0.0637381	test: 0.0843539	best: 0.0843415 (612)	total: 2m 40s	remaining: 1m 40s
616:	learn: 0.0637355	test: 0.0843500	best: 0.0843415 (612)	total: 2m 40s	remaining: 1m 39s
617:	learn: 0.0637324	test: 0.0843485	best: 0.0843415 (612)	total: 2m 40s	remaining: 1m 39s
618:	learn: 0.0637248	test: 0.0843480	best: 0.0843415 (612)	total: 2m 41s	remaining: 1m 39s
619:	learn: 0.0637091	test: 0.0843402	best: 0.0843402 (619)	total: 2m 41s	remaining: 1m 39s
620:	learn: 0.0636971	test: 0.0843399	best: 0.0843399 (620)	total: 2m 41s	remaining: 1m 38s
621:	learn: 0.0636953	test: 0.0843398	best: 0.0843398 (621)	total: 2m 41s	remaining: 1m 38s
622:	learn: 0.0636832	test: 0.0843356	best: 0.0843356 (622)	total: 2m 42s	remaining: 1m 38s
623:	learn: 0.0636830	test: 0.0843342	best: 0.0843342 (623)	total: 2m 42s	remaining: 1m 37s
624:	learn: 0.0636412	test: 0.0843460	best: 0.0843342 (623)	total: 2m 43s	remaining: 1m 37s
625:	learn: 0.0636012	test: 0.0843455	best: 0.0843342 (623)	total: 2m 43s	remaining: 1m 37s
626:	learn: 0.0635807	test: 0.0843484	best: 0.0843342 (623)	total: 2m 44s	remaining: 1m 38s
627:	learn: 0.0635474	test: 0.0843499	best: 0.0843342 (623)	total: 2m 45s	remaining: 1m 38s
628:	learn: 0.0635119	test: 0.0843551	best: 0.0843342 (623)	total: 2m 46s	remaining: 1m 37s
629:	learn: 0.0634905	test: 0.0843524	best: 0.0843342 (623)	total: 2m 46s	remaining: 1m 38s
630:	learn: 0.0634886	test: 0.0843504	best: 0.0843342 (623)	total: 2m 47s	remaining: 1m 37s
631:	learn: 0.0634434	test: 0.0843591	best: 0.0843342 (623)	total: 2m 47s	remaining: 1m 37s
632:	learn: 0.0634285	test: 0.0843609	best: 0.0843342 (623)	total: 2m 48s	remaining: 1m 37s
633:	learn: 0.0634245	test: 0.0843638	best: 0.0843342 (623)	total: 2m 48s	remaining: 1m 37s
634:	learn: 0.0634066	test: 0.0843664	best: 0.0843342 (623)	total: 2m 49s	remaining: 1m 37s
635:	learn: 0.0633961	test: 0.0843667	best: 0.0843342 (623)	total: 2m 49s	remaining: 1m 37s
636:	learn: 0.0633814	test: 0.0843630	best: 0.0843342 (623)	total: 2m 50s	remaining: 1m 37s
637:	learn: 0.0633670	test: 0.0843637	best: 0.0843342 (623)	total: 2m 51s	remaining: 1m 37s
638:	learn: 0.0633144	test: 0.0843637	best: 0.0843342 (623)	total: 2m 52s	remaining: 1m 37s
639:	learn: 0.0633110	test: 0.0843607	best: 0.0843342 (623)	total: 2m 52s	remaining: 1m 37s
640:	learn: 0.0633107	test: 0.0843595	best: 0.0843342 (623)	total: 2m 52s	remaining: 1m 36s
641:	learn: 0.0632600	test: 0.0843686	best: 0.0843342 (623)	total: 2m 53s	remaining: 1m 36s
642:	learn: 0.0632518	test: 0.0843648	best: 0.0843342 (623)	total: 2m 53s	remaining: 1m 36s
643:	learn: 0.0632309	test: 0.0843640	best: 0.0843342 (623)	total: 2m 54s	remaining: 1m 36s
644:	learn: 0.0632077	test: 0.0843602	best: 0.0843342 (623)	total: 2m 54s	remaining: 1m 36s
645:	learn: 0.0631907	test: 0.0843609	best: 0.0843342 (623)	total: 2m 55s	remaining: 1m 36s
646:	learn: 0.0631736	test: 0.0843620	best: 0.0843342 (623)	total: 2m 55s	remaining: 1m 35s
647:	learn: 0.0631734	test: 0.0843606	best: 0.0843342 (623)	total: 2m 55s	remaining: 1m 35s
648:	learn: 0.0631366	test: 0.0843689	best: 0.0843342 (623)	total: 2m 56s	remaining: 1m 35s
649:	learn: 0.0631363	test: 0.0843677	best: 0.0843342 (623)	total: 2m 56s	remaining: 1m 34s
650:	learn: 0.0631217	test: 0.0843670	best: 0.0843342 (623)	total: 2m 57s	remaining: 1m 34s
651:	learn: 0.0630981	test: 0.0843657	best: 0.0843342 (623)	total: 2m 58s	remaining: 1m 35s
652:	learn: 0.0630929	test: 0.0843619	best: 0.0843342 (623)	total: 2m 58s	remaining: 1m 34s
653:	learn: 0.0630748	test: 0.0843613	best: 0.0843342 (623)	total: 2m 59s	remaining: 1m 34s
654:	learn: 0.0630736	test: 0.0843605	best: 0.0843342 (623)	total: 2m 59s	remaining: 1m 34s
655:	learn: 0.0630663	test: 0.0843579	best: 0.0843342 (623)	total: 2m 59s	remaining: 1m 34s
656:	learn: 0.0630635	test: 0.0843583	best: 0.0843342 (623)	total: 2m 59s	remaining: 1m 33s
657:	learn: 0.0630634	test: 0.0843569	best: 0.0843342 (623)	total: 2m 59s	remaining: 1m 33s
658:	learn: 0.0630620	test: 0.0843556	best: 0.0843342 (623)	total: 2m 59s	remaining: 1m 32s
659:	learn: 0.0630512	test: 0.0843639	best: 0.0843342 (623)	total: 3m	remaining: 1m 32s
660:	learn: 0.0630483	test: 0.0843653	best: 0.0843342 (623)	total: 3m	remaining: 1m 32s
661:	learn: 0.0630110	test: 0.0843575	best: 0.0843342 (623)	total: 3m 1s	remaining: 1m 32s
662:	learn: 0.0630080	test: 0.0843572	best: 0.0843342 (623)	total: 3m 1s	remaining: 1m 32s
663:	learn: 0.0630051	test: 0.0843544	best: 0.0843342 (623)	total: 3m 1s	remaining: 1m 32s
664:	learn: 0.0629955	test: 0.0843569	best: 0.0843342 (623)	total: 3m 1s	remaining: 1m 31s
665:	learn: 0.0629893	test: 0.0843583	best: 0.0843342 (623)	total: 3m 2s	remaining: 1m 31s
666:	learn: 0.0629880	test: 0.0843577	best: 0.0843342 (623)	total: 3m 3s	remaining: 1m 31s
667:	learn: 0.0629848	test: 0.0843586	best: 0.0843342 (623)	total: 3m 3s	remaining: 1m 31s
668:	learn: 0.0629672	test: 0.0843603	best: 0.0843342 (623)	total: 3m 3s	remaining: 1m 30s
669:	learn: 0.0629641	test: 0.0843553	best: 0.0843342 (623)	total: 3m 3s	remaining: 1m 30s
670:	learn: 0.0629596	test: 0.0843545	best: 0.0843342 (623)	total: 3m 3s	remaining: 1m 30s
671:	learn: 0.0629578	test: 0.0843517	best: 0.0843342 (623)	total: 3m 3s	remaining: 1m 29s
672:	learn: 0.0629415	test: 0.0843575	best: 0.0843342 (623)	total: 3m 4s	remaining: 1m 29s
673:	learn: 0.0628971	test: 0.0843705	best: 0.0843342 (623)	total: 3m 5s	remaining: 1m 29s
674:	learn: 0.0628548	test: 0.0843623	best: 0.0843342 (623)	total: 3m 6s	remaining: 1m 29s
675:	learn: 0.0628434	test: 0.0843606	best: 0.0843342 (623)	total: 3m 7s	remaining: 1m 29s
676:	learn: 0.0628424	test: 0.0843603	best: 0.0843342 (623)	total: 3m 7s	remaining: 1m 29s
677:	learn: 0.0628208	test: 0.0843642	best: 0.0843342 (623)	total: 3m 8s	remaining: 1m 29s
678:	learn: 0.0627825	test: 0.0843768	best: 0.0843342 (623)	total: 3m 8s	remaining: 1m 29s
679:	learn: 0.0627731	test: 0.0843744	best: 0.0843342 (623)	total: 3m 9s	remaining: 1m 28s
680:	learn: 0.0627713	test: 0.0843733	best: 0.0843342 (623)	total: 3m 9s	remaining: 1m 28s
681:	learn: 0.0627689	test: 0.0843699	best: 0.0843342 (623)	total: 3m 9s	remaining: 1m 28s
682:	learn: 0.0627001	test: 0.0843745	best: 0.0843342 (623)	total: 3m 10s	remaining: 1m 28s
683:	learn: 0.0626659	test: 0.0843640	best: 0.0843342 (623)	total: 3m 10s	remaining: 1m 28s
684:	learn: 0.0626577	test: 0.0843657	best: 0.0843342 (623)	total: 3m 10s	remaining: 1m 27s
685:	learn: 0.0626575	test: 0.0843646	best: 0.0843342 (623)	total: 3m 10s	remaining: 1m 27s
686:	learn: 0.0626537	test: 0.0843642	best: 0.0843342 (623)	total: 3m 10s	remaining: 1m 26s
687:	learn: 0.0626364	test: 0.0843593	best: 0.0843342 (623)	total: 3m 11s	remaining: 1m 26s
688:	learn: 0.0626353	test: 0.0843575	best: 0.0843342 (623)	total: 3m 11s	remaining: 1m 26s
689:	learn: 0.0625949	test: 0.0843604	best: 0.0843342 (623)	total: 3m 12s	remaining: 1m 26s
690:	learn: 0.0625946	test: 0.0843593	best: 0.0843342 (623)	total: 3m 12s	remaining: 1m 26s
691:	learn: 0.0625936	test: 0.0843583	best: 0.0843342 (623)	total: 3m 12s	remaining: 1m 25s
692:	learn: 0.0625911	test: 0.0843569	best: 0.0843342 (623)	total: 3m 13s	remaining: 1m 25s
693:	learn: 0.0625581	test: 0.0843687	best: 0.0843342 (623)	total: 3m 13s	remaining: 1m 25s
694:	learn: 0.0625564	test: 0.0843678	best: 0.0843342 (623)	total: 3m 13s	remaining: 1m 25s
695:	learn: 0.0624991	test: 0.0843639	best: 0.0843342 (623)	total: 3m 14s	remaining: 1m 25s
696:	learn: 0.0624989	test: 0.0843628	best: 0.0843342 (623)	total: 3m 14s	remaining: 1m 24s
697:	learn: 0.0624899	test: 0.0843622	best: 0.0843342 (623)	total: 3m 15s	remaining: 1m 24s
698:	learn: 0.0624229	test: 0.0843715	best: 0.0843342 (623)	total: 3m 16s	remaining: 1m 24s
699:	learn: 0.0624225	test: 0.0843718	best: 0.0843342 (623)	total: 3m 16s	remaining: 1m 24s
700:	learn: 0.0624214	test: 0.0843706	best: 0.0843342 (623)	total: 3m 16s	remaining: 1m 23s
701:	learn: 0.0624146	test: 0.0843747	best: 0.0843342 (623)	total: 3m 16s	remaining: 1m 23s
702:	learn: 0.0623986	test: 0.0843855	best: 0.0843342 (623)	total: 3m 17s	remaining: 1m 23s
703:	learn: 0.0623717	test: 0.0843843	best: 0.0843342 (623)	total: 3m 18s	remaining: 1m 23s
704:	learn: 0.0623206	test: 0.0843860	best: 0.0843342 (623)	total: 3m 19s	remaining: 1m 23s
705:	learn: 0.0622809	test: 0.0843840	best: 0.0843342 (623)	total: 3m 20s	remaining: 1m 23s
706:	learn: 0.0622767	test: 0.0843835	best: 0.0843342 (623)	total: 3m 20s	remaining: 1m 23s
707:	learn: 0.0622678	test: 0.0843806	best: 0.0843342 (623)	total: 3m 20s	remaining: 1m 22s
708:	learn: 0.0622637	test: 0.0843802	best: 0.0843342 (623)	total: 3m 20s	remaining: 1m 22s
709:	learn: 0.0622624	test: 0.0843782	best: 0.0843342 (623)	total: 3m 20s	remaining: 1m 22s
710:	learn: 0.0622587	test: 0.0843790	best: 0.0843342 (623)	total: 3m 21s	remaining: 1m 21s
711:	learn: 0.0622571	test: 0.0843830	best: 0.0843342 (623)	total: 3m 21s	remaining: 1m 21s
712:	learn: 0.0622554	test: 0.0843802	best: 0.0843342 (623)	total: 3m 21s	remaining: 1m 20s
713:	learn: 0.0622007	test: 0.0843866	best: 0.0843342 (623)	total: 3m 21s	remaining: 1m 20s
714:	learn: 0.0621997	test: 0.0843862	best: 0.0843342 (623)	total: 3m 22s	remaining: 1m 20s
715:	learn: 0.0621714	test: 0.0843951	best: 0.0843342 (623)	total: 3m 22s	remaining: 1m 20s
716:	learn: 0.0621548	test: 0.0843995	best: 0.0843342 (623)	total: 3m 23s	remaining: 1m 20s
717:	learn: 0.0621451	test: 0.0844010	best: 0.0843342 (623)	total: 3m 24s	remaining: 1m 20s
718:	learn: 0.0621428	test: 0.0843989	best: 0.0843342 (623)	total: 3m 24s	remaining: 1m 19s
719:	learn: 0.0621371	test: 0.0843988	best: 0.0843342 (623)	total: 3m 24s	remaining: 1m 19s
720:	learn: 0.0621249	test: 0.0844059	best: 0.0843342 (623)	total: 3m 25s	remaining: 1m 19s
721:	learn: 0.0621015	test: 0.0844047	best: 0.0843342 (623)	total: 3m 26s	remaining: 1m 19s
722:	learn: 0.0620679	test: 0.0844023	best: 0.0843342 (623)	total: 3m 26s	remaining: 1m 19s
723:	learn: 0.0620373	test: 0.0843966	best: 0.0843342 (623)	total: 3m 27s	remaining: 1m 19s
724:	learn: 0.0620008	test: 0.0843882	best: 0.0843342 (623)	total: 3m 28s	remaining: 1m 19s
725:	learn: 0.0619936	test: 0.0843885	best: 0.0843342 (623)	total: 3m 28s	remaining: 1m 18s
726:	learn: 0.0619864	test: 0.0843871	best: 0.0843342 (623)	total: 3m 29s	remaining: 1m 18s
727:	learn: 0.0619483	test: 0.0843965	best: 0.0843342 (623)	total: 3m 30s	remaining: 1m 18s
728:	learn: 0.0619474	test: 0.0843950	best: 0.0843342 (623)	total: 3m 30s	remaining: 1m 18s
729:	learn: 0.0619469	test: 0.0843939	best: 0.0843342 (623)	total: 3m 30s	remaining: 1m 17s
730:	learn: 0.0619462	test: 0.0843923	best: 0.0843342 (623)	total: 3m 30s	remaining: 1m 17s
731:	learn: 0.0619394	test: 0.0843951	best: 0.0843342 (623)	total: 3m 30s	remaining: 1m 17s
732:	learn: 0.0619304	test: 0.0844013	best: 0.0843342 (623)	total: 3m 30s	remaining: 1m 16s
733:	learn: 0.0619300	test: 0.0844002	best: 0.0843342 (623)	total: 3m 30s	remaining: 1m 16s
734:	learn: 0.0619213	test: 0.0843978	best: 0.0843342 (623)	total: 3m 31s	remaining: 1m 16s
735:	learn: 0.0619038	test: 0.0843980	best: 0.0843342 (623)	total: 3m 32s	remaining: 1m 16s
736:	learn: 0.0618788	test: 0.0843998	best: 0.0843342 (623)	total: 3m 33s	remaining: 1m 16s
737:	learn: 0.0618454	test: 0.0844013	best: 0.0843342 (623)	total: 3m 33s	remaining: 1m 15s
738:	learn: 0.0618391	test: 0.0844016	best: 0.0843342 (623)	total: 3m 34s	remaining: 1m 15s
739:	learn: 0.0618243	test: 0.0844051	best: 0.0843342 (623)	total: 3m 34s	remaining: 1m 15s
740:	learn: 0.0618167	test: 0.0844034	best: 0.0843342 (623)	total: 3m 34s	remaining: 1m 14s
741:	learn: 0.0617763	test: 0.0844075	best: 0.0843342 (623)	total: 3m 35s	remaining: 1m 14s
742:	learn: 0.0617667	test: 0.0844126	best: 0.0843342 (623)	total: 3m 35s	remaining: 1m 14s
743:	learn: 0.0617216	test: 0.0844164	best: 0.0843342 (623)	total: 3m 36s	remaining: 1m 14s
744:	learn: 0.0616858	test: 0.0844338	best: 0.0843342 (623)	total: 3m 37s	remaining: 1m 14s
745:	learn: 0.0616852	test: 0.0844339	best: 0.0843342 (623)	total: 3m 37s	remaining: 1m 13s
746:	learn: 0.0616682	test: 0.0844372	best: 0.0843342 (623)	total: 3m 38s	remaining: 1m 13s
747:	learn: 0.0616380	test: 0.0844409	best: 0.0843342 (623)	total: 3m 38s	remaining: 1m 13s
748:	learn: 0.0616153	test: 0.0844374	best: 0.0843342 (623)	total: 3m 39s	remaining: 1m 13s
749:	learn: 0.0615935	test: 0.0844361	best: 0.0843342 (623)	total: 3m 39s	remaining: 1m 13s
750:	learn: 0.0615831	test: 0.0844345	best: 0.0843342 (623)	total: 3m 40s	remaining: 1m 13s
751:	learn: 0.0615199	test: 0.0844249	best: 0.0843342 (623)	total: 3m 41s	remaining: 1m 13s
752:	learn: 0.0615011	test: 0.0844307	best: 0.0843342 (623)	total: 3m 42s	remaining: 1m 13s
753:	learn: 0.0614978	test: 0.0844295	best: 0.0843342 (623)	total: 3m 42s	remaining: 1m 12s
754:	learn: 0.0614918	test: 0.0844268	best: 0.0843342 (623)	total: 3m 43s	remaining: 1m 12s
755:	learn: 0.0614916	test: 0.0844257	best: 0.0843342 (623)	total: 3m 43s	remaining: 1m 12s
756:	learn: 0.0614620	test: 0.0844336	best: 0.0843342 (623)	total: 3m 44s	remaining: 1m 12s
757:	learn: 0.0614281	test: 0.0844543	best: 0.0843342 (623)	total: 3m 45s	remaining: 1m 12s
758:	learn: 0.0614279	test: 0.0844532	best: 0.0843342 (623)	total: 3m 45s	remaining: 1m 11s
759:	learn: 0.0614270	test: 0.0844508	best: 0.0843342 (623)	total: 3m 45s	remaining: 1m 11s
760:	learn: 0.0614266	test: 0.0844497	best: 0.0843342 (623)	total: 3m 45s	remaining: 1m 10s
761:	learn: 0.0614111	test: 0.0844506	best: 0.0843342 (623)	total: 3m 46s	remaining: 1m 10s
762:	learn: 0.0614102	test: 0.0844490	best: 0.0843342 (623)	total: 3m 46s	remaining: 1m 10s
763:	learn: 0.0613833	test: 0.0844436	best: 0.0843342 (623)	total: 3m 47s	remaining: 1m 10s
764:	learn: 0.0613557	test: 0.0844415	best: 0.0843342 (623)	total: 3m 48s	remaining: 1m 10s
765:	learn: 0.0613537	test: 0.0844365	best: 0.0843342 (623)	total: 3m 48s	remaining: 1m 9s
766:	learn: 0.0613524	test: 0.0844366	best: 0.0843342 (623)	total: 3m 48s	remaining: 1m 9s
767:	learn: 0.0613456	test: 0.0844429	best: 0.0843342 (623)	total: 3m 48s	remaining: 1m 9s
768:	learn: 0.0612917	test: 0.0844377	best: 0.0843342 (623)	total: 3m 49s	remaining: 1m 8s
769:	learn: 0.0612499	test: 0.0844408	best: 0.0843342 (623)	total: 3m 50s	remaining: 1m 8s
770:	learn: 0.0612333	test: 0.0844451	best: 0.0843342 (623)	total: 3m 50s	remaining: 1m 8s
771:	learn: 0.0612325	test: 0.0844426	best: 0.0843342 (623)	total: 3m 50s	remaining: 1m 8s
772:	learn: 0.0611998	test: 0.0844354	best: 0.0843342 (623)	total: 3m 51s	remaining: 1m 8s
773:	learn: 0.0611694	test: 0.0844361	best: 0.0843342 (623)	total: 3m 52s	remaining: 1m 7s
774:	learn: 0.0611069	test: 0.0844441	best: 0.0843342 (623)	total: 3m 53s	remaining: 1m 7s
775:	learn: 0.0610951	test: 0.0844444	best: 0.0843342 (623)	total: 3m 53s	remaining: 1m 7s
776:	learn: 0.0610938	test: 0.0844420	best: 0.0843342 (623)	total: 3m 53s	remaining: 1m 7s
777:	learn: 0.0610936	test: 0.0844407	best: 0.0843342 (623)	total: 3m 53s	remaining: 1m 6s
778:	learn: 0.0610519	test: 0.0844387	best: 0.0843342 (623)	total: 3m 54s	remaining: 1m 6s
779:	learn: 0.0610238	test: 0.0844382	best: 0.0843342 (623)	total: 3m 55s	remaining: 1m 6s
780:	learn: 0.0610230	test: 0.0844363	best: 0.0843342 (623)	total: 3m 55s	remaining: 1m 5s
781:	learn: 0.0610106	test: 0.0844364	best: 0.0843342 (623)	total: 3m 55s	remaining: 1m 5s
782:	learn: 0.0609517	test: 0.0844442	best: 0.0843342 (623)	total: 3m 56s	remaining: 1m 5s
783:	learn: 0.0609436	test: 0.0844517	best: 0.0843342 (623)	total: 3m 56s	remaining: 1m 5s
784:	learn: 0.0609276	test: 0.0844676	best: 0.0843342 (623)	total: 3m 56s	remaining: 1m 4s
785:	learn: 0.0608929	test: 0.0844657	best: 0.0843342 (623)	total: 3m 57s	remaining: 1m 4s
786:	learn: 0.0608855	test: 0.0844642	best: 0.0843342 (623)	total: 3m 58s	remaining: 1m 4s
787:	learn: 0.0608744	test: 0.0844661	best: 0.0843342 (623)	total: 3m 59s	remaining: 1m 4s
788:	learn: 0.0608686	test: 0.0844640	best: 0.0843342 (623)	total: 3m 59s	remaining: 1m 4s
789:	learn: 0.0608582	test: 0.0844648	best: 0.0843342 (623)	total: 4m	remaining: 1m 3s
790:	learn: 0.0608477	test: 0.0844591	best: 0.0843342 (623)	total: 4m	remaining: 1m 3s
791:	learn: 0.0608473	test: 0.0844592	best: 0.0843342 (623)	total: 4m	remaining: 1m 3s
792:	learn: 0.0608120	test: 0.0844656	best: 0.0843342 (623)	total: 4m 1s	remaining: 1m 3s
793:	learn: 0.0607656	test: 0.0844747	best: 0.0843342 (623)	total: 4m 2s	remaining: 1m 2s
794:	learn: 0.0607630	test: 0.0844708	best: 0.0843342 (623)	total: 4m 2s	remaining: 1m 2s
795:	learn: 0.0607393	test: 0.0844647	best: 0.0843342 (623)	total: 4m 3s	remaining: 1m 2s
796:	learn: 0.0607075	test: 0.0844753	best: 0.0843342 (623)	total: 4m 4s	remaining: 1m 2s
797:	learn: 0.0606867	test: 0.0844730	best: 0.0843342 (623)	total: 4m 5s	remaining: 1m 2s
798:	learn: 0.0606856	test: 0.0844725	best: 0.0843342 (623)	total: 4m 5s	remaining: 1m 1s
799:	learn: 0.0606653	test: 0.0844659	best: 0.0843342 (623)	total: 4m 5s	remaining: 1m 1s
800:	learn: 0.0606260	test: 0.0844703	best: 0.0843342 (623)	total: 4m 5s	remaining: 1m 1s
801:	learn: 0.0606252	test: 0.0844679	best: 0.0843342 (623)	total: 4m 5s	remaining: 1m
802:	learn: 0.0606067	test: 0.0844692	best: 0.0843342 (623)	total: 4m 6s	remaining: 1m
803:	learn: 0.0606027	test: 0.0844692	best: 0.0843342 (623)	total: 4m 7s	remaining: 1m
804:	learn: 0.0606026	test: 0.0844680	best: 0.0843342 (623)	total: 4m 7s	remaining: 60s
805:	learn: 0.0605839	test: 0.0844640	best: 0.0843342 (623)	total: 4m 8s	remaining: 59.8s
806:	learn: 0.0605650	test: 0.0844679	best: 0.0843342 (623)	total: 4m 8s	remaining: 59.5s
807:	learn: 0.0605345	test: 0.0844732	best: 0.0843342 (623)	total: 4m 9s	remaining: 59.2s
808:	learn: 0.0605088	test: 0.0844798	best: 0.0843342 (623)	total: 4m 9s	remaining: 59s
809:	learn: 0.0604774	test: 0.0844876	best: 0.0843342 (623)	total: 4m 10s	remaining: 58.8s
810:	learn: 0.0604719	test: 0.0844897	best: 0.0843342 (623)	total: 4m 10s	remaining: 58.5s
811:	learn: 0.0603840	test: 0.0844948	best: 0.0843342 (623)	total: 4m 11s	remaining: 58.3s
812:	learn: 0.0603806	test: 0.0844926	best: 0.0843342 (623)	total: 4m 11s	remaining: 57.9s
813:	learn: 0.0603491	test: 0.0844875	best: 0.0843342 (623)	total: 4m 12s	remaining: 57.7s
814:	learn: 0.0603359	test: 0.0844885	best: 0.0843342 (623)	total: 4m 12s	remaining: 57.3s
815:	learn: 0.0603323	test: 0.0844862	best: 0.0843342 (623)	total: 4m 12s	remaining: 57s
816:	learn: 0.0603309	test: 0.0844851	best: 0.0843342 (623)	total: 4m 12s	remaining: 56.6s
817:	learn: 0.0602718	test: 0.0845027	best: 0.0843342 (623)	total: 4m 13s	remaining: 56.4s
818:	learn: 0.0602211	test: 0.0845112	best: 0.0843342 (623)	total: 4m 14s	remaining: 56.2s
819:	learn: 0.0602157	test: 0.0845101	best: 0.0843342 (623)	total: 4m 14s	remaining: 55.9s
820:	learn: 0.0602124	test: 0.0845114	best: 0.0843342 (623)	total: 4m 14s	remaining: 55.5s
821:	learn: 0.0601845	test: 0.0845127	best: 0.0843342 (623)	total: 4m 15s	remaining: 55.3s
822:	learn: 0.0601631	test: 0.0845180	best: 0.0843342 (623)	total: 4m 15s	remaining: 55s
823:	learn: 0.0601543	test: 0.0845222	best: 0.0843342 (623)	total: 4m 15s	remaining: 54.6s
824:	learn: 0.0601513	test: 0.0845217	best: 0.0843342 (623)	total: 4m 15s	remaining: 54.3s
825:	learn: 0.0601503	test: 0.0845198	best: 0.0843342 (623)	total: 4m 16s	remaining: 53.9s
826:	learn: 0.0601379	test: 0.0845203	best: 0.0843342 (623)	total: 4m 17s	remaining: 53.8s
827:	learn: 0.0601329	test: 0.0845214	best: 0.0843342 (623)	total: 4m 17s	remaining: 53.5s
828:	learn: 0.0601273	test: 0.0845159	best: 0.0843342 (623)	total: 4m 17s	remaining: 53.1s
829:	learn: 0.0601236	test: 0.0845171	best: 0.0843342 (623)	total: 4m 17s	remaining: 52.7s
830:	learn: 0.0601129	test: 0.0845155	best: 0.0843342 (623)	total: 4m 17s	remaining: 52.4s
831:	learn: 0.0600880	test: 0.0845173	best: 0.0843342 (623)	total: 4m 18s	remaining: 52.1s
832:	learn: 0.0600826	test: 0.0845133	best: 0.0843342 (623)	total: 4m 18s	remaining: 51.8s
833:	learn: 0.0600484	test: 0.0845087	best: 0.0843342 (623)	total: 4m 19s	remaining: 51.6s
834:	learn: 0.0600186	test: 0.0845099	best: 0.0843342 (623)	total: 4m 19s	remaining: 51.4s
835:	learn: 0.0600110	test: 0.0845142	best: 0.0843342 (623)	total: 4m 20s	remaining: 51.1s
836:	learn: 0.0599892	test: 0.0845151	best: 0.0843342 (623)	total: 4m 21s	remaining: 50.9s
837:	learn: 0.0598872	test: 0.0845165	best: 0.0843342 (623)	total: 4m 22s	remaining: 50.7s
838:	learn: 0.0598595	test: 0.0845247	best: 0.0843342 (623)	total: 4m 22s	remaining: 50.4s
839:	learn: 0.0598471	test: 0.0845273	best: 0.0843342 (623)	total: 4m 23s	remaining: 50.2s
840:	learn: 0.0598150	test: 0.0845277	best: 0.0843342 (623)	total: 4m 24s	remaining: 50s
841:	learn: 0.0598146	test: 0.0845258	best: 0.0843342 (623)	total: 4m 24s	remaining: 49.7s
842:	learn: 0.0597603	test: 0.0845251	best: 0.0843342 (623)	total: 4m 25s	remaining: 49.4s
843:	learn: 0.0597544	test: 0.0845253	best: 0.0843342 (623)	total: 4m 25s	remaining: 49.1s
844:	learn: 0.0597302	test: 0.0845207	best: 0.0843342 (623)	total: 4m 26s	remaining: 48.9s
845:	learn: 0.0597296	test: 0.0845202	best: 0.0843342 (623)	total: 4m 26s	remaining: 48.6s
846:	learn: 0.0597270	test: 0.0845216	best: 0.0843342 (623)	total: 4m 26s	remaining: 48.2s
847:	learn: 0.0597269	test: 0.0845204	best: 0.0843342 (623)	total: 4m 26s	remaining: 47.9s
848:	learn: 0.0597123	test: 0.0845240	best: 0.0843342 (623)	total: 4m 27s	remaining: 47.7s
849:	learn: 0.0597110	test: 0.0845227	best: 0.0843342 (623)	total: 4m 28s	remaining: 47.3s
850:	learn: 0.0596357	test: 0.0845197	best: 0.0843342 (623)	total: 4m 28s	remaining: 47.1s
851:	learn: 0.0596318	test: 0.0845166	best: 0.0843342 (623)	total: 4m 29s	remaining: 46.8s
852:	learn: 0.0595769	test: 0.0845164	best: 0.0843342 (623)	total: 4m 30s	remaining: 46.6s
853:	learn: 0.0595582	test: 0.0845210	best: 0.0843342 (623)	total: 4m 30s	remaining: 46.2s
854:	learn: 0.0595306	test: 0.0845205	best: 0.0843342 (623)	total: 4m 31s	remaining: 46s
855:	learn: 0.0594976	test: 0.0845326	best: 0.0843342 (623)	total: 4m 32s	remaining: 45.8s
856:	learn: 0.0594005	test: 0.0845377	best: 0.0843342 (623)	total: 4m 32s	remaining: 45.5s
857:	learn: 0.0593744	test: 0.0845426	best: 0.0843342 (623)	total: 4m 33s	remaining: 45.3s
858:	learn: 0.0593630	test: 0.0845452	best: 0.0843342 (623)	total: 4m 34s	remaining: 45.1s
859:	learn: 0.0593176	test: 0.0845510	best: 0.0843342 (623)	total: 4m 35s	remaining: 44.9s
860:	learn: 0.0593123	test: 0.0845486	best: 0.0843342 (623)	total: 4m 35s	remaining: 44.5s
861:	learn: 0.0593067	test: 0.0845479	best: 0.0843342 (623)	total: 4m 36s	remaining: 44.2s
862:	learn: 0.0593019	test: 0.0845523	best: 0.0843342 (623)	total: 4m 36s	remaining: 43.8s
863:	learn: 0.0592340	test: 0.0845513	best: 0.0843342 (623)	total: 4m 37s	remaining: 43.6s
864:	learn: 0.0592090	test: 0.0845527	best: 0.0843342 (623)	total: 4m 37s	remaining: 43.4s
865:	learn: 0.0592063	test: 0.0845540	best: 0.0843342 (623)	total: 4m 37s	remaining: 43s
866:	learn: 0.0591815	test: 0.0845546	best: 0.0843342 (623)	total: 4m 38s	remaining: 42.8s
867:	learn: 0.0591204	test: 0.0845679	best: 0.0843342 (623)	total: 4m 39s	remaining: 42.5s
868:	learn: 0.0591185	test: 0.0845656	best: 0.0843342 (623)	total: 4m 39s	remaining: 42.2s
869:	learn: 0.0590900	test: 0.0845748	best: 0.0843342 (623)	total: 4m 40s	remaining: 41.9s
870:	learn: 0.0590568	test: 0.0845685	best: 0.0843342 (623)	total: 4m 41s	remaining: 41.6s
871:	learn: 0.0590520	test: 0.0845715	best: 0.0843342 (623)	total: 4m 41s	remaining: 41.3s
872:	learn: 0.0590336	test: 0.0845682	best: 0.0843342 (623)	total: 4m 41s	remaining: 41s
873:	learn: 0.0590027	test: 0.0845834	best: 0.0843342 (623)	total: 4m 42s	remaining: 40.7s
874:	learn: 0.0589911	test: 0.0845757	best: 0.0843342 (623)	total: 4m 42s	remaining: 40.4s
875:	learn: 0.0589585	test: 0.0845737	best: 0.0843342 (623)	total: 4m 43s	remaining: 40.1s
876:	learn: 0.0588854	test: 0.0845936	best: 0.0843342 (623)	total: 4m 44s	remaining: 39.8s
877:	learn: 0.0588340	test: 0.0846009	best: 0.0843342 (623)	total: 4m 44s	remaining: 39.6s
878:	learn: 0.0588223	test: 0.0845993	best: 0.0843342 (623)	total: 4m 45s	remaining: 39.3s
879:	learn: 0.0588170	test: 0.0846022	best: 0.0843342 (623)	total: 4m 45s	remaining: 39s
880:	learn: 0.0587740	test: 0.0845934	best: 0.0843342 (623)	total: 4m 46s	remaining: 38.7s
881:	learn: 0.0587455	test: 0.0845948	best: 0.0843342 (623)	total: 4m 47s	remaining: 38.5s
882:	learn: 0.0587222	test: 0.0845970	best: 0.0843342 (623)	total: 4m 48s	remaining: 38.2s
883:	learn: 0.0587128	test: 0.0845956	best: 0.0843342 (623)	total: 4m 49s	remaining: 38s
884:	learn: 0.0587042	test: 0.0845945	best: 0.0843342 (623)	total: 4m 50s	remaining: 37.7s
885:	learn: 0.0586771	test: 0.0845927	best: 0.0843342 (623)	total: 4m 51s	remaining: 37.5s
886:	learn: 0.0586444	test: 0.0846047	best: 0.0843342 (623)	total: 4m 52s	remaining: 37.2s
887:	learn: 0.0586245	test: 0.0845999	best: 0.0843342 (623)	total: 4m 52s	remaining: 36.9s
888:	learn: 0.0586054	test: 0.0845989	best: 0.0843342 (623)	total: 4m 52s	remaining: 36.5s
889:	learn: 0.0585661	test: 0.0846031	best: 0.0843342 (623)	total: 4m 53s	remaining: 36.3s
890:	learn: 0.0585596	test: 0.0846029	best: 0.0843342 (623)	total: 4m 53s	remaining: 35.9s
891:	learn: 0.0585448	test: 0.0845957	best: 0.0843342 (623)	total: 4m 53s	remaining: 35.6s
892:	learn: 0.0585118	test: 0.0846045	best: 0.0843342 (623)	total: 4m 53s	remaining: 35.2s
893:	learn: 0.0584936	test: 0.0846100	best: 0.0843342 (623)	total: 4m 54s	remaining: 34.9s
894:	learn: 0.0584734	test: 0.0846051	best: 0.0843342 (623)	total: 4m 54s	remaining: 34.6s
895:	learn: 0.0584602	test: 0.0846031	best: 0.0843342 (623)	total: 4m 55s	remaining: 34.3s
896:	learn: 0.0584434	test: 0.0846011	best: 0.0843342 (623)	total: 4m 56s	remaining: 34s
897:	learn: 0.0584174	test: 0.0846019	best: 0.0843342 (623)	total: 4m 57s	remaining: 33.7s
898:	learn: 0.0583841	test: 0.0846008	best: 0.0843342 (623)	total: 4m 57s	remaining: 33.4s
899:	learn: 0.0583541	test: 0.0846044	best: 0.0843342 (623)	total: 4m 58s	remaining: 33.1s
900:	learn: 0.0583476	test: 0.0846046	best: 0.0843342 (623)	total: 4m 59s	remaining: 32.9s
901:	learn: 0.0583208	test: 0.0846045	best: 0.0843342 (623)	total: 4m 59s	remaining: 32.6s
902:	learn: 0.0583061	test: 0.0846093	best: 0.0843342 (623)	total: 5m	remaining: 32.2s
903:	learn: 0.0582901	test: 0.0846177	best: 0.0843342 (623)	total: 5m	remaining: 32s
904:	learn: 0.0582581	test: 0.0846143	best: 0.0843342 (623)	total: 5m 1s	remaining: 31.7s
905:	learn: 0.0581851	test: 0.0846174	best: 0.0843342 (623)	total: 5m 2s	remaining: 31.4s
906:	learn: 0.0581305	test: 0.0846165	best: 0.0843342 (623)	total: 5m 3s	remaining: 31.1s
907:	learn: 0.0581302	test: 0.0846145	best: 0.0843342 (623)	total: 5m 3s	remaining: 30.7s
908:	learn: 0.0581258	test: 0.0846140	best: 0.0843342 (623)	total: 5m 3s	remaining: 30.4s
909:	learn: 0.0581076	test: 0.0846252	best: 0.0843342 (623)	total: 5m 4s	remaining: 30.1s
910:	learn: 0.0580889	test: 0.0846346	best: 0.0843342 (623)	total: 5m 5s	remaining: 29.8s
911:	learn: 0.0580885	test: 0.0846327	best: 0.0843342 (623)	total: 5m 5s	remaining: 29.5s
912:	learn: 0.0580702	test: 0.0846321	best: 0.0843342 (623)	total: 5m 6s	remaining: 29.2s
913:	learn: 0.0579818	test: 0.0846403	best: 0.0843342 (623)	total: 5m 6s	remaining: 28.9s
914:	learn: 0.0579680	test: 0.0846397	best: 0.0843342 (623)	total: 5m 7s	remaining: 28.6s
915:	learn: 0.0579128	test: 0.0846373	best: 0.0843342 (623)	total: 5m 8s	remaining: 28.3s
916:	learn: 0.0579070	test: 0.0846358	best: 0.0843342 (623)	total: 5m 8s	remaining: 28s
917:	learn: 0.0578692	test: 0.0846316	best: 0.0843342 (623)	total: 5m 9s	remaining: 27.7s
918:	learn: 0.0578489	test: 0.0846226	best: 0.0843342 (623)	total: 5m 10s	remaining: 27.4s
919:	learn: 0.0578298	test: 0.0846341	best: 0.0843342 (623)	total: 5m 11s	remaining: 27.1s
920:	learn: 0.0577740	test: 0.0846395	best: 0.0843342 (623)	total: 5m 12s	remaining: 26.8s
921:	learn: 0.0577712	test: 0.0846350	best: 0.0843342 (623)	total: 5m 12s	remaining: 26.4s
922:	learn: 0.0577396	test: 0.0846439	best: 0.0843342 (623)	total: 5m 13s	remaining: 26.1s
923:	learn: 0.0576966	test: 0.0846430	best: 0.0843342 (623)	total: 5m 14s	remaining: 25.8s
924:	learn: 0.0576958	test: 0.0846418	best: 0.0843342 (623)	total: 5m 14s	remaining: 25.5s
925:	learn: 0.0576434	test: 0.0846417	best: 0.0843342 (623)	total: 5m 15s	remaining: 25.2s
926:	learn: 0.0575905	test: 0.0846579	best: 0.0843342 (623)	total: 5m 15s	remaining: 24.9s
927:	learn: 0.0575492	test: 0.0846639	best: 0.0843342 (623)	total: 5m 16s	remaining: 24.6s
928:	learn: 0.0575292	test: 0.0846673	best: 0.0843342 (623)	total: 5m 17s	remaining: 24.3s
929:	learn: 0.0574906	test: 0.0846611	best: 0.0843342 (623)	total: 5m 18s	remaining: 24s
930:	learn: 0.0574389	test: 0.0846625	best: 0.0843342 (623)	total: 5m 19s	remaining: 23.7s
931:	learn: 0.0574364	test: 0.0846616	best: 0.0843342 (623)	total: 5m 19s	remaining: 23.3s
932:	learn: 0.0574055	test: 0.0846725	best: 0.0843342 (623)	total: 5m 20s	remaining: 23s
933:	learn: 0.0573707	test: 0.0846697	best: 0.0843342 (623)	total: 5m 21s	remaining: 22.7s
934:	learn: 0.0573702	test: 0.0846686	best: 0.0843342 (623)	total: 5m 21s	remaining: 22.3s
935:	learn: 0.0573548	test: 0.0846664	best: 0.0843342 (623)	total: 5m 21s	remaining: 22s
936:	learn: 0.0573255	test: 0.0846590	best: 0.0843342 (623)	total: 5m 22s	remaining: 21.7s
937:	learn: 0.0572998	test: 0.0846550	best: 0.0843342 (623)	total: 5m 22s	remaining: 21.3s
938:	learn: 0.0572775	test: 0.0846582	best: 0.0843342 (623)	total: 5m 23s	remaining: 21s
939:	learn: 0.0572166	test: 0.0846640	best: 0.0843342 (623)	total: 5m 24s	remaining: 20.7s
940:	learn: 0.0572152	test: 0.0846615	best: 0.0843342 (623)	total: 5m 24s	remaining: 20.4s
941:	learn: 0.0571910	test: 0.0846760	best: 0.0843342 (623)	total: 5m 25s	remaining: 20s
942:	learn: 0.0571359	test: 0.0846718	best: 0.0843342 (623)	total: 5m 26s	remaining: 19.7s
943:	learn: 0.0571016	test: 0.0846733	best: 0.0843342 (623)	total: 5m 27s	remaining: 19.4s
944:	learn: 0.0570999	test: 0.0846724	best: 0.0843342 (623)	total: 5m 27s	remaining: 19s
945:	learn: 0.0570811	test: 0.0846723	best: 0.0843342 (623)	total: 5m 28s	remaining: 18.7s
946:	learn: 0.0570096	test: 0.0846664	best: 0.0843342 (623)	total: 5m 29s	remaining: 18.4s
947:	learn: 0.0569851	test: 0.0846709	best: 0.0843342 (623)	total: 5m 29s	remaining: 18.1s
948:	learn: 0.0569804	test: 0.0846760	best: 0.0843342 (623)	total: 5m 29s	remaining: 17.7s
949:	learn: 0.0569622	test: 0.0846726	best: 0.0843342 (623)	total: 5m 30s	remaining: 17.4s
950:	learn: 0.0569597	test: 0.0846703	best: 0.0843342 (623)	total: 5m 31s	remaining: 17.1s
951:	learn: 0.0569516	test: 0.0846693	best: 0.0843342 (623)	total: 5m 31s	remaining: 16.7s
952:	learn: 0.0569418	test: 0.0846743	best: 0.0843342 (623)	total: 5m 32s	remaining: 16.4s
953:	learn: 0.0568861	test: 0.0846802	best: 0.0843342 (623)	total: 5m 32s	remaining: 16s
954:	learn: 0.0568739	test: 0.0846792	best: 0.0843342 (623)	total: 5m 33s	remaining: 15.7s
955:	learn: 0.0568736	test: 0.0846772	best: 0.0843342 (623)	total: 5m 33s	remaining: 15.3s
956:	learn: 0.0568019	test: 0.0846782	best: 0.0843342 (623)	total: 5m 34s	remaining: 15s
957:	learn: 0.0567904	test: 0.0846778	best: 0.0843342 (623)	total: 5m 35s	remaining: 14.7s
958:	learn: 0.0567507	test: 0.0846751	best: 0.0843342 (623)	total: 5m 35s	remaining: 14.4s
959:	learn: 0.0567019	test: 0.0846855	best: 0.0843342 (623)	total: 5m 36s	remaining: 14s
960:	learn: 0.0566775	test: 0.0846860	best: 0.0843342 (623)	total: 5m 37s	remaining: 13.7s
961:	learn: 0.0566523	test: 0.0846850	best: 0.0843342 (623)	total: 5m 38s	remaining: 13.4s
962:	learn: 0.0566386	test: 0.0846805	best: 0.0843342 (623)	total: 5m 39s	remaining: 13.1s
963:	learn: 0.0565817	test: 0.0846925	best: 0.0843342 (623)	total: 5m 40s	remaining: 12.7s
964:	learn: 0.0565513	test: 0.0846911	best: 0.0843342 (623)	total: 5m 41s	remaining: 12.4s
965:	learn: 0.0565365	test: 0.0846904	best: 0.0843342 (623)	total: 5m 41s	remaining: 12s
966:	learn: 0.0565343	test: 0.0846866	best: 0.0843342 (623)	total: 5m 41s	remaining: 11.7s
967:	learn: 0.0565207	test: 0.0846914	best: 0.0843342 (623)	total: 5m 42s	remaining: 11.3s
968:	learn: 0.0565175	test: 0.0846885	best: 0.0843342 (623)	total: 5m 42s	remaining: 10.9s
969:	learn: 0.0565019	test: 0.0846948	best: 0.0843342 (623)	total: 5m 43s	remaining: 10.6s
970:	learn: 0.0564537	test: 0.0846854	best: 0.0843342 (623)	total: 5m 43s	remaining: 10.3s
971:	learn: 0.0564531	test: 0.0846841	best: 0.0843342 (623)	total: 5m 43s	remaining: 9.91s
972:	learn: 0.0564300	test: 0.0846922	best: 0.0843342 (623)	total: 5m 44s	remaining: 9.57s
973:	learn: 0.0563722	test: 0.0847023	best: 0.0843342 (623)	total: 5m 45s	remaining: 9.23s
974:	learn: 0.0563480	test: 0.0847042	best: 0.0843342 (623)	total: 5m 46s	remaining: 8.88s
975:	learn: 0.0563312	test: 0.0847027	best: 0.0843342 (623)	total: 5m 47s	remaining: 8.54s
976:	learn: 0.0562616	test: 0.0847109	best: 0.0843342 (623)	total: 5m 48s	remaining: 8.2s
977:	learn: 0.0562301	test: 0.0847097	best: 0.0843342 (623)	total: 5m 48s	remaining: 7.84s
978:	learn: 0.0562041	test: 0.0847082	best: 0.0843342 (623)	total: 5m 49s	remaining: 7.49s
979:	learn: 0.0562005	test: 0.0847044	best: 0.0843342 (623)	total: 5m 49s	remaining: 7.13s
980:	learn: 0.0561221	test: 0.0847014	best: 0.0843342 (623)	total: 5m 50s	remaining: 6.78s
981:	learn: 0.0561194	test: 0.0847043	best: 0.0843342 (623)	total: 5m 50s	remaining: 6.42s
982:	learn: 0.0561013	test: 0.0847036	best: 0.0843342 (623)	total: 5m 51s	remaining: 6.08s
983:	learn: 0.0560881	test: 0.0847015	best: 0.0843342 (623)	total: 5m 52s	remaining: 5.73s
984:	learn: 0.0560330	test: 0.0847000	best: 0.0843342 (623)	total: 5m 53s	remaining: 5.38s
985:	learn: 0.0560007	test: 0.0847016	best: 0.0843342 (623)	total: 5m 53s	remaining: 5.03s
986:	learn: 0.0559899	test: 0.0847048	best: 0.0843342 (623)	total: 5m 54s	remaining: 4.67s
987:	learn: 0.0559726	test: 0.0847057	best: 0.0843342 (623)	total: 5m 55s	remaining: 4.32s
988:	learn: 0.0559697	test: 0.0847049	best: 0.0843342 (623)	total: 5m 55s	remaining: 3.96s
989:	learn: 0.0559500	test: 0.0846995	best: 0.0843342 (623)	total: 5m 56s	remaining: 3.6s
990:	learn: 0.0559330	test: 0.0846934	best: 0.0843342 (623)	total: 5m 57s	remaining: 3.24s
991:	learn: 0.0558610	test: 0.0846918	best: 0.0843342 (623)	total: 5m 57s	remaining: 2.89s
992:	learn: 0.0558331	test: 0.0846849	best: 0.0843342 (623)	total: 5m 58s	remaining: 2.52s
993:	learn: 0.0558072	test: 0.0846818	best: 0.0843342 (623)	total: 5m 59s	remaining: 2.17s
994:	learn: 0.0557914	test: 0.0846777	best: 0.0843342 (623)	total: 5m 59s	remaining: 1.8s
995:	learn: 0.0557015	test: 0.0846766	best: 0.0843342 (623)	total: 6m	remaining: 1.45s
996:	learn: 0.0556839	test: 0.0846808	best: 0.0843342 (623)	total: 6m 1s	remaining: 1.09s
997:	learn: 0.0556741	test: 0.0846867	best: 0.0843342 (623)	total: 6m 2s	remaining: 725ms
998:	learn: 0.0556003	test: 0.0846985	best: 0.0843342 (623)	total: 6m 2s	remaining: 363ms
999:	learn: 0.0555611	test: 0.0847033	best: 0.0843342 (623)	total: 6m 3s	remaining: 0us

bestTest = 0.08433424656
bestIteration = 623

Out[188]:
<catboost.core.CatBoostClassifier at 0x17c464626a0>

In [189]:
df_test.fillna(method='ffill', inplace=True)

In [190]:
prediction_proba = model.predict_proba(df_test)

In [191]:
prediction_proba[:,1]


Out[191]:
array([ 0.0757 ,  0.12079,  0.00022, ...,  0.08743,  0.00652,  0.00109])

In [33]:
def make_submission(probs):
    sample = pd.read_csv(f'{PATH}\\AV_Mckin\\sample_submission_1.csv')
    submit = sample.copy()
    submit['stroke'] = probs
    return submit

In [34]:
sample = pd.read_csv(f'{PATH}\\AV_Mckin\\sample_submission_1.csv')

In [ ]:
submit = make_submission(preds_xgb)

In [ ]:
submit.head(2)

In [ ]:
submit.to_csv(f'{PATH}\\AV_Mckin\\xgb.csv', index=False)

In [66]:
sns.set()
feature_list = ['hypertension','heart_disease','ever_married','work_type','Residence_type','smoking_status'] 
for  column_name in feature_list: 
    fig , (ax1,ax2) = plt.subplots(1,2,figsize = ( 15 , 6 )) 
    fig.suptitle(column_name,fontsize=16) 
    sns.countplot(df_raw[column_name],ax=ax1)
    ax1.set_title("Train distribution") 
    for tick in ax1.get_xticklabels(): 
        tick.set_rotation(45)
    sns.countplot(df_test[column_name],ax=ax2,) 
    ax2.set_title("Test distribution")
    for tick in ax2.get_xticklabels(): 
        tick.set_rotation(45)



In [88]:
df_raw['y'] = y

In [150]:
df_raw['is_age>40'] = np.where(df_raw['age']>=40,1,0)
df_test['is_age>40'] = np.where(df_test['age']>=40,1,0)

df_raw['healthy'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('bmi>=18.5 & bmi<=25').index
df_raw.iloc[my_query, -1] = 1

df_raw['under_weight'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('bmi<=18.5').index
df_raw.iloc[my_query, -1] = 1

df_raw['over_weight'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('bmi>25. & bmi<=29.9').index
df_raw.iloc[my_query, -1] = 1

df_raw['obsese'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('bmi>=30').index
df_raw.iloc[my_query, -1] = 1

df_raw['normal_glucose'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('avg_glucose_level<=140').index
df_raw.iloc[my_query, -1] = 1

df_raw['pre_diabetes'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('avg_glucose_level>140 & avg_glucose_level<=199.').index
df_raw.iloc[my_query, -1] = 1

df_raw['diabetes'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('avg_glucose_level>=200').index
df_raw.iloc[my_query, -1] = 1

df_test['normal_glucose'] = np.zeros(df_test.shape[0])
my_query = df_test.query('avg_glucose_level<=140').index
df_test.iloc[my_query, -1] = 1

df_test['pre_diabetes'] = np.zeros(df_test.shape[0])
my_query = df_test.query('avg_glucose_level>140 & avg_glucose_level<=199.').index
df_test.iloc[my_query, -1] = 1

df_test['diabetes'] = np.zeros(df_test.shape[0])
my_query = df_test.query('avg_glucose_level>=200').index
df_test.iloc[my_query, -1] = 1

df_test['healthy'] = np.zeros(df_test.shape[0])
my_query = df_test.query('bmi>=18.5 & bmi<=25').index
df_test.iloc[my_query, -1] = 1

df_test['under_weight'] = np.zeros(df_test.shape[0])
my_query = df_test.query('bmi<=18.5').index
df_test.iloc[my_query, -1] = 1

df_test['over_weight'] = np.zeros(df_test.shape[0])
my_query = df_test.query('bmi>25. & bmi<=29.9').index
df_test.iloc[my_query, -1] = 1

df_test['obsese'] = np.zeros(df_test.shape[0])
my_query = df_test.query('bmi>=30').index
df_test.iloc[my_query, -1] = 1

In [115]:
df_train['y'] = y
corr = df_train.corr()

# Create a mask to hide the upper triangle of the correlation matrix (which is symmetric)
mask = np.zeros_like(corr, dtype=np.bool)
mask[np.triu_indices_from(mask)] = True

f, ax = plt.subplots(figsize=(20, 20))

sns.heatmap(corr, mask=mask, vmax=1, center=0, annot=True, fmt='.1f',
            square=True, linewidths=.5, cbar_kws={"shrink": .5});

df_train.drop('y',axis=1,inplace=True)



In [119]:
df_uniques = pd.melt(frame=df_raw, value_vars=['gender','ever_married', 
                                           'work_type', 'Residence_type', 'smoking_status'])
df_uniques = pd.DataFrame(df_uniques.groupby(['variable', 
                                              'value'])['value'].count()) \
    .sort_index(level=[0, 1]) \
    .rename(columns={'value': 'count'}) \
    .reset_index()

sns.factorplot(x='variable', y='count', hue='value', 
               data=df_uniques, kind='bar',size=8);



In [121]:
df_uniques = pd.melt(frame=df_raw, value_vars=['gender','ever_married', 
                                           'work_type', 'Residence_type', 'smoking_status'], id_vars=['y'])
df_uniques = pd.DataFrame(df_uniques.groupby(['variable', 
                                              'value', 'y'])['value'].count()) \
    .sort_index(level=[0, 1]) \
    .rename(columns={'value': 'count'}) \
    .reset_index()

sns.factorplot(x='variable', y='count', hue='value', 
               col= 'y', data=df_uniques, kind='bar',size=12);



In [109]:
plt.figure(figsize=(15,15))
sns.lmplot(x='age', y='bmi', hue='work_type', data=df_raw);


<matplotlib.figure.Figure at 0x17c400395f8>

In [111]:
plt.figure(figsize=(20,20))
sns.lmplot(x='age', y='avg_glucose_level', hue='work_type', data=df_raw);


<matplotlib.figure.Figure at 0x17c400a3978>

In [89]:
sns.lmplot(x='age', y='bmi', hue='y', data=df_raw,)


Out[89]:
<seaborn.axisgrid.FacetGrid at 0x17c19979400>

In [102]:
sns.lmplot(x='age', y='avg_glucose_level', hue='y', data=df_raw,)


Out[102]:
<seaborn.axisgrid.FacetGrid at 0x17c3fd8cda0>

gbm


In [67]:
from sklearn.ensemble import GradientBoostingClassifier  #GBM algorithm
from sklearn import cross_validation, metrics   #Additional scklearn functions
from sklearn.grid_search import GridSearchCV   #Perforing grid search


C:\ProgramData\Anaconda3\lib\site-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.
  "This module will be removed in 0.20.", DeprecationWarning)
C:\ProgramData\Anaconda3\lib\site-packages\sklearn\grid_search.py:42: 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. This module will be removed in 0.20.
  DeprecationWarning)

In [77]:
train_cats(df_raw)
train_cats(df_test)
df_raw['y'] = target
df_test['y'] = target[:18601]
df_raw1, y, nas = proc_df(df_raw, 'y', max_n_cat=10,)
df_test1, _, _ = proc_df(df_test, 'y', na_dict=nas)
df_raw.drop('y', axis=1, inplace=True)
df_test.drop('y', axis=1, inplace=True)

In [79]:
def modelfit(alg, dtrain, predictors, performCV=True, printFeatureImportance=True, cv_folds=5):
    #Fit the algorithm on the data
    alg.fit(dtrain[predictors], target)
        
    #Predict training set:
    dtrain_predictions = alg.predict(dtrain[predictors])
    dtrain_predprob = alg.predict_proba(dtrain[predictors])[:,1]
    
    #Perform cross-validation:
    if performCV:
        cv_score = cross_validation.cross_val_score(alg, dtrain[predictors], target, cv=cv_folds, scoring='roc_auc')
    
    #Print model report:
    print ("\nModel Report")
    print ("Accuracy : %.4g" % metrics.accuracy_score(target , dtrain_predictions))
    print ("AUC Score (Train): %f" % metrics.roc_auc_score(target , dtrain_predprob))
    
    if performCV:
        print ("CV Score : Mean - %.7g | Std - %.7g | Min - %.7g | Max - %.7g" % (np.mean(cv_score),np.std(cv_score),np.min(cv_score),np.max(cv_score)))
        
    #Print Feature Importance:
    if printFeatureImportance:
        feat_imp = pd.Series(alg.feature_importances_, predictors).sort_values(ascending=False)
        plt.figure(figsize=(20,20))
        feat_imp.plot(kind='bar', title='Feature Importances')
        plt.ylabel('Feature Importance Score')

In [80]:
#Choose all predictors except target & IDcols
predictors = df_raw1.columns
gbm0 = GradientBoostingClassifier(random_state=10)
modelfit(gbm0, df_raw1, predictors)


Model Report
Accuracy : 0.9825
AUC Score (Train): 0.888989
CV Score : Mean - 0.8425214 | Std - 0.01152719 | Min - 0.8319186 | Max - 0.8631636

In [81]:
param_test1 = {'n_estimators':[20, 30, 40, 50, 60, 70, 80, 90]}
gsearch1 = GridSearchCV(estimator = GradientBoostingClassifier(learning_rate=0.05, min_samples_split=500,
                        min_samples_leaf=50,max_depth=8,max_features='sqrt',subsample=0.8,random_state=10), 
                        param_grid = param_test1, scoring='roc_auc',n_jobs=-1,iid=False, cv=5)
gsearch1.fit(df_raw1[predictors], y)


Out[81]:
GridSearchCV(cv=5, error_score='raise',
       estimator=GradientBoostingClassifier(criterion='friedman_mse', init=None,
              learning_rate=0.05, loss='deviance', max_depth=8,
              max_features='sqrt', max_leaf_nodes=None,
              min_impurity_decrease=0.0, min_impurity_split=None,
              min_samples_leaf=50, min_samples_split=500,
              min_weight_fraction_leaf=0.0, n_estimators=100,
              presort='auto', random_state=10, subsample=0.8, verbose=0,
              warm_start=False),
       fit_params={}, iid=False, n_jobs=-1,
       param_grid={'n_estimators': [20, 30, 40, 50, 60, 70, 80, 90]},
       pre_dispatch='2*n_jobs', refit=True, scoring='roc_auc', verbose=0)

In [82]:
gsearch1.grid_scores_, gsearch1.best_params_, gsearch1.best_score_


Out[82]:
([mean: 0.83732, std: 0.01340, params: {'n_estimators': 20},
  mean: 0.83928, std: 0.01163, params: {'n_estimators': 30},
  mean: 0.83849, std: 0.01136, params: {'n_estimators': 40},
  mean: 0.83853, std: 0.01185, params: {'n_estimators': 50},
  mean: 0.83919, std: 0.01194, params: {'n_estimators': 60},
  mean: 0.83960, std: 0.01208, params: {'n_estimators': 70},
  mean: 0.83813, std: 0.01249, params: {'n_estimators': 80},
  mean: 0.83776, std: 0.01266, params: {'n_estimators': 90}],
 {'n_estimators': 70},
 0.8395959015215009)

In [83]:
## Test 2
param_test2 = {'max_depth':[5, 7, 9, 11, 13, 15] ,'min_samples_split': [200, 400, 600, 800, 1000]}
gsearch2 = GridSearchCV(estimator = GradientBoostingClassifier(learning_rate=0.05, n_estimators=70, max_features='sqrt', subsample=0.8, random_state=10), 
param_grid = param_test2, scoring='roc_auc',n_jobs=4,iid=False, cv=5)

gsearch2.fit(df_raw1[predictors], y)
gsearch2.grid_scores_, gsearch2.best_params_, gsearch2.best_score_


Out[83]:
([mean: 0.83997, std: 0.01458, params: {'max_depth': 5, 'min_samples_split': 200},
  mean: 0.84058, std: 0.01308, params: {'max_depth': 5, 'min_samples_split': 400},
  mean: 0.84120, std: 0.01390, params: {'max_depth': 5, 'min_samples_split': 600},
  mean: 0.84177, std: 0.01324, params: {'max_depth': 5, 'min_samples_split': 800},
  mean: 0.84167, std: 0.01295, params: {'max_depth': 5, 'min_samples_split': 1000},
  mean: 0.83777, std: 0.01338, params: {'max_depth': 7, 'min_samples_split': 200},
  mean: 0.84019, std: 0.01100, params: {'max_depth': 7, 'min_samples_split': 400},
  mean: 0.83926, std: 0.01416, params: {'max_depth': 7, 'min_samples_split': 600},
  mean: 0.84049, std: 0.01288, params: {'max_depth': 7, 'min_samples_split': 800},
  mean: 0.84180, std: 0.01486, params: {'max_depth': 7, 'min_samples_split': 1000},
  mean: 0.83253, std: 0.01122, params: {'max_depth': 9, 'min_samples_split': 200},
  mean: 0.83926, std: 0.01171, params: {'max_depth': 9, 'min_samples_split': 400},
  mean: 0.83576, std: 0.01214, params: {'max_depth': 9, 'min_samples_split': 600},
  mean: 0.83816, std: 0.01226, params: {'max_depth': 9, 'min_samples_split': 800},
  mean: 0.84073, std: 0.01321, params: {'max_depth': 9, 'min_samples_split': 1000},
  mean: 0.83132, std: 0.01130, params: {'max_depth': 11, 'min_samples_split': 200},
  mean: 0.83620, std: 0.01257, params: {'max_depth': 11, 'min_samples_split': 400},
  mean: 0.83666, std: 0.01425, params: {'max_depth': 11, 'min_samples_split': 600},
  mean: 0.83813, std: 0.01385, params: {'max_depth': 11, 'min_samples_split': 800},
  mean: 0.83791, std: 0.01242, params: {'max_depth': 11, 'min_samples_split': 1000},
  mean: 0.82927, std: 0.00921, params: {'max_depth': 13, 'min_samples_split': 200},
  mean: 0.83395, std: 0.01051, params: {'max_depth': 13, 'min_samples_split': 400},
  mean: 0.83668, std: 0.01159, params: {'max_depth': 13, 'min_samples_split': 600},
  mean: 0.83627, std: 0.01283, params: {'max_depth': 13, 'min_samples_split': 800},
  mean: 0.83737, std: 0.01213, params: {'max_depth': 13, 'min_samples_split': 1000},
  mean: 0.82735, std: 0.00855, params: {'max_depth': 15, 'min_samples_split': 200},
  mean: 0.83356, std: 0.01162, params: {'max_depth': 15, 'min_samples_split': 400},
  mean: 0.83653, std: 0.01123, params: {'max_depth': 15, 'min_samples_split': 600},
  mean: 0.83690, std: 0.01126, params: {'max_depth': 15, 'min_samples_split': 800},
  mean: 0.83730, std: 0.01309, params: {'max_depth': 15, 'min_samples_split': 1000}],
 {'max_depth': 7, 'min_samples_split': 1000},
 0.8417952192271543)

In [84]:
#test 3
param_test3 = {'min_samples_split': [800, 1000, 1200, 1600] , 'min_samples_leaf': [30, 40, 70]}
gsearch3 = GridSearchCV(estimator = GradientBoostingClassifier(learning_rate=0.05, n_estimators=70,\
                                    max_depth=7,max_features='sqrt', subsample=0.8, random_state=10), 
param_grid = param_test3, scoring='roc_auc',n_jobs=4,iid=False, cv=5)

In [85]:
gsearch3.fit(df_raw1[predictors], y)


Out[85]:
GridSearchCV(cv=5, error_score='raise',
       estimator=GradientBoostingClassifier(criterion='friedman_mse', init=None,
              learning_rate=0.05, loss='deviance', max_depth=7,
              max_features='sqrt', max_leaf_nodes=None,
              min_impurity_decrease=0.0, min_impurity_split=None,
              min_samples_leaf=1, min_samples_split=2,
              min_weight_fraction_leaf=0.0, n_estimators=70,
              presort='auto', random_state=10, subsample=0.8, verbose=0,
              warm_start=False),
       fit_params={}, iid=False, n_jobs=4,
       param_grid={'min_samples_split': [800, 1000, 1200, 1600], 'min_samples_leaf': [30, 40, 70]},
       pre_dispatch='2*n_jobs', refit=True, scoring='roc_auc', verbose=0)

In [ ]:


In [ ]:

fast.ai RF


In [197]:
def display_all(df):
    with pd.option_context("display.max_rows", 1000, "display.max_columns", 1000): 
        display(df)

In [29]:
m = RandomForestRegressor(n_jobs=-1)
m.fit(df_raw.drop('stroke', axis=1), df_raw.stroke)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-29-2d6a9f2ee827> in <module>()
      1 m = RandomForestRegressor(n_jobs=-1)
----> 2 m.fit(df_raw.drop('stroke', axis=1), df_raw.stroke)

C:\ProgramData\Anaconda3\lib\site-packages\sklearn\ensemble\forest.py in fit(self, X, y, sample_weight)
    245         """
    246         # Validate or convert input data
--> 247         X = check_array(X, accept_sparse="csc", dtype=DTYPE)
    248         y = check_array(y, accept_sparse='csc', ensure_2d=False, dtype=None)
    249         if sample_weight is not None:

C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\validation.py in check_array(array, accept_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, warn_on_dtype, estimator)
    431                                       force_all_finite)
    432     else:
--> 433         array = np.array(array, dtype=dtype, order=order, copy=copy)
    434 
    435         if ensure_2d:

ValueError: could not convert string to float: 'never smoked'

In [199]:
train_cats(df_raw)

In [10]:
display_all(df_raw.isnull().sum().sort_index()/len(df_raw))


Residence_type       0.000000
age                  0.000000
avg_glucose_level    0.000000
bmi                  0.033687
ever_married         0.000000
gender               0.000000
heart_disease        0.000000
hypertension         0.000000
id                   0.000000
smoking_status       0.306267
stroke               0.000000
work_type            0.000000
dtype: float64

In [201]:
df_raw['stroke'] = y

In [202]:
df, y, nas = proc_df(df_raw, 'stroke', max_n_cat= 20,)

In [203]:
m = RandomForestRegressor(n_jobs=-1)
m.fit(df, y)
m.score(df,y)


Out[203]:
0.8028024180806016

In [37]:
def split_vals(a,n): return a[:n].copy(), a[n:].copy()

n_valid = 18601  # same as Kaggle's test set size
n_trn = len(df)-n_valid
raw_train, raw_valid = split_vals(df_raw, n_trn)
X_train, X_valid = split_vals(df, n_trn)
y_train, y_valid = split_vals(y, n_trn)

X_train.shape, y_train.shape, X_valid.shape


Out[37]:
((24799, 27), (24799,), (18601, 27))

In [38]:
def rmse(x,y): return math.sqrt(((x-y)**2).mean())

def print_score(m):
    res = [rmse(m.predict(X_train), y_train), rmse(m.predict(X_valid), y_valid),
                m.score(X_train, y_train), m.score(X_valid, y_valid)]
    if hasattr(m, 'oob_score_'): res.append(m.oob_score_)
    print(res)

In [39]:
m = RandomForestRegressor(n_jobs=-1)
%time m.fit(X_train, y_train)
print_score(m)


Wall time: 391 ms
[0.05957292526588625, 0.14113786444375237, 0.79313164863241237, -0.078959044122826505]

In [40]:
m = RandomForestRegressor(n_estimators=1, max_depth=3, bootstrap=False, n_jobs=-1)
m.fit(X_train, y_train)
print_score(m)


[0.12734843467992937, 0.1332539907026114, 0.05467003736538123, 0.038214280483870766]

In [43]:
draw_tree(m.estimators_[0], df, precision=3)


Tree 0 age ≤ 67.5 mse = 0.017 samples = 24799 value = 0.017 1 bmi_na ≤ 0.5 mse = 0.008 samples = 21007 value = 0.008 0->1 True 8 bmi_na ≤ 0.5 mse = 0.064 samples = 3792 value = 0.068 0->8 False 2 age ≤ 44.5 mse = 0.007 samples = 20416 value = 0.007 1->2 5 id ≤ 61626.0 mse = 0.056 samples = 591 value = 0.059 1->5 3 mse = 0.001 samples = 12410 value = 0.001 2->3 4 mse = 0.015 samples = 8006 value = 0.015 2->4 6 mse = 0.042 samples = 553 value = 0.043 5->6 7 mse = 0.206 samples = 38 value = 0.289 5->7 9 avg_glucose_level ≤ 129.975 mse = 0.057 samples = 3542 value = 0.061 8->9 12 avg_glucose_level ≤ 62.725 mse = 0.145 samples = 250 value = 0.176 8->12 10 mse = 0.045 samples = 2514 value = 0.047 9->10 11 mse = 0.085 samples = 1028 value = 0.094 9->11 13 mse = 0.222 samples = 9 value = 0.667 12->13 14 mse = 0.133 samples = 241 value = 0.158 12->14

In [44]:
m = RandomForestRegressor(n_estimators=1, bootstrap=False, n_jobs=-1)
m.fit(X_train, y_train)
print_score(m)


[0.0, 0.19021264545741703, 1.0, -0.95973183465485201]

In [45]:
preds = np.stack([t.predict(X_valid) for t in m.estimators_])
preds[:,0], np.mean(preds[:,0]), y_valid[0]


Out[45]:
(array([ 0.]), 0.0, 0)

In [46]:
preds.shape


Out[46]:
(1, 18601)

In [47]:
plt.plot([metrics.r2_score(y_valid, np.mean(preds[:i+1], axis=0)) for i in range(10)]);



In [48]:
m = RandomForestRegressor(n_estimators=20, n_jobs=-1)
m.fit(X_train, y_train)
print_score(m)


[0.053935037458556316, 0.13877986749122004, 0.83043423624976986, -0.043207769828658593]

In [49]:
m = RandomForestRegressor(n_estimators=40, n_jobs=-1)
m.fit(X_train, y_train)
print_score(m)


[0.05065202509550886, 0.13635991787486, 0.85044882563614643, -0.0071434625891337866]

In [50]:
m = RandomForestRegressor(n_estimators=80, n_jobs=-1)
m.fit(X_train, y_train)
print_score(m)


[0.04932920584416187, 0.13539700042187303, 0.85815812991186269, 0.007030377983202718]

In [51]:
m = RandomForestRegressor(n_estimators=40, n_jobs=-1, oob_score=True)
m.fit(X_train, y_train)
print_score(m)


[0.05060473443008853, 0.13678234821922905, 0.85072794865313206, -0.013393201742370131, -0.079651728043367287]

In [55]:
m = RandomForestRegressor(n_estimators=80, n_jobs=-1, oob_score=True)
m.fit(X_train, y_train)
print_score(m)


[0.04962648806914854, 0.13554113664542275, 0.85644335969303942, 0.0049151306533107286, -0.042433661957432145]

In [56]:
fi = rf_feat_importance(m, df); fi[:10]


Out[56]:
cols imp
4 avg_glucose_level 0.264270
0 id 0.248352
5 bmi 0.150956
1 age 0.117366
2 hypertension 0.024076
3 heart_disease 0.016805
26 smoking_status_nan 0.015793
25 smoking_status_smokes 0.015731
24 smoking_status_never smoked 0.015676
23 smoking_status_formerly smoked 0.014448

In [57]:
fi.plot('cols', 'imp', figsize=(10,6), legend=False);



In [60]:
def plot_fi(fi): return fi.plot('cols', 'imp', 'barh', figsize=(12,7), legend=False)

In [61]:
plot_fi(fi[:30]);



In [62]:
to_keep = fi[fi.imp>0.005].cols; len(to_keep)


Out[62]:
20

In [63]:
df_keep = df[to_keep].copy()
X_train, X_valid = split_vals(df_keep, n_trn)

In [66]:
m = RandomForestRegressor(n_estimators=1000, max_features=0.5,
                          n_jobs=-1, oob_score=True)
m.fit(X_train, y_train)
print_score(m)


[0.04797940755508207, 0.1334750619871137, 0.86581438436078428, 0.035020386228543643, 0.012721465229392992]

In [67]:
fi = rf_feat_importance(m, df_keep)
plot_fi(fi);



In [68]:
from scipy.cluster import hierarchy as hc

In [69]:
corr = np.round(scipy.stats.spearmanr(df_keep).correlation, 4)
corr_condensed = hc.distance.squareform(1-corr)
z = hc.linkage(corr_condensed, method='average')
fig = plt.figure(figsize=(16,10))
dendrogram = hc.dendrogram(z, labels=df_keep.columns, orientation='left', leaf_font_size=16)
plt.show()



In [70]:
def get_oob(df):
    m = RandomForestRegressor(n_estimators=1000, min_samples_leaf=5, max_features=0.6, n_jobs=-1, oob_score=True)
    x, _ = split_vals(df, n_trn)
    m.fit(x, y_train)
    return m.oob_score_

In [71]:
get_oob(df_keep)


Out[71]:
0.039819363310610978

In [204]:
apply_cats(df_test,df_raw)

In [205]:
df_test.shape


Out[205]:
(18601, 24)

In [206]:
df.columns


Out[206]:
Index(['id', 'age', 'hypertension', 'heart_disease', 'avg_glucose_level',
       'bmi', 'impact_encoded_gender', 'impact_encoded_ever_married',
       'impact_encoded_work_type', 'impact_encoded_Residence_type',
       'impact_encoded_smoking_status', 'is_age>40', 'healthy', 'under_weight',
       'over_weight', 'obsese', 'normal_glucose', 'pre_diabetes', 'diabetes',
       'gender_Female', 'gender_Male', 'gender_Other', 'gender_nan',
       'ever_married_No', 'ever_married_Yes', 'ever_married_nan',
       'work_type_Govt_job', 'work_type_Never_worked', 'work_type_Private',
       'work_type_Self-employed', 'work_type_children', 'work_type_nan',
       'Residence_type_Rural', 'Residence_type_Urban', 'Residence_type_nan',
       'smoking_status_formerly smoked', 'smoking_status_never smoked',
       'smoking_status_smokes', 'smoking_status_nan'],
      dtype='object')

In [207]:
y_test = y[:18601]

In [208]:
df_test['y'] = y_test

In [209]:
df_test_1, _, _ = proc_df(df_test,'y',na_dict=nas,max_n_cat=20)

In [210]:
df_raw.head(2)


Out[210]:
id gender age hypertension heart_disease ever_married work_type Residence_type avg_glucose_level bmi ... impact_encoded_smoking_status is_age>40 healthy under_weight over_weight obsese normal_glucose pre_diabetes diabetes stroke
0 30669 Male 3.0 0 0 No children Rural 95.12 18.0 ... 0.018041 0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0
1 30468 Male 58.0 1 0 Yes Private Urban 87.96 39.2 ... 0.017344 1 0.0 0.0 0.0 1.0 1.0 0.0 0.0 0

2 rows × 25 columns


In [92]:
df_raw.groupby('gender')['bmi'].mean()


Out[92]:
gender
Female    28.745909
Male      28.398452
Other     27.900000
Name: bmi, dtype: float64

In [211]:
# Calculate the correlation matrix

corr = df.corr(method='pearson')

# Create a mask to hide the upper triangle of the correlation matrix (which is symmetric)
mask = np.zeros_like(corr, dtype=np.bool)
mask[np.triu_indices_from(mask)] = True

f, ax = plt.subplots(figsize=(12, 9))

sns.heatmap(corr, mask=mask, vmax=1, center=0, annot=True, fmt='.1f',
            square=True, linewidths=.5, cbar_kws={"shrink": .5});



In [102]:
df_raw.groupby(['work_type','gender'])['age'].describe()


Out[102]:
count mean std min 25% 50% 75% max
work_type gender
Govt_job Female 3312.0 48.769324 15.261100 13.00 38.00 49.0 60.00 82.0
Male 2126.0 49.611947 15.464584 14.00 39.00 50.0 61.00 82.0
Other 2.0 46.000000 9.899495 39.00 42.50 46.0 49.50 53.0
Never_worked Female 101.0 17.514851 5.832005 13.00 15.00 16.0 18.00 64.0
Male 76.0 18.078947 7.477545 13.00 14.00 16.0 18.00 59.0
Private Female 15235.0 44.350574 18.247299 8.00 29.00 43.0 58.00 82.0
Male 9592.0 46.075063 18.498372 13.00 31.00 46.0 60.00 82.0
Other 7.0 38.714286 14.150551 19.00 26.50 46.0 50.00 53.0
Self-employed Female 4040.0 58.968564 16.953317 13.00 47.00 61.0 74.00 82.0
Male 2753.0 59.805667 16.539473 7.00 49.00 63.0 73.00 82.0
children Female 2977.0 6.602674 4.511298 0.08 2.00 6.0 10.00 16.0
Male 3177.0 6.787359 4.504071 0.08 2.00 7.0 11.00 16.0
Other 2.0 10.500000 0.707107 10.00 10.25 10.5 10.75 11.0

In [113]:
m


Out[113]:
RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,
           max_features=0.5, max_leaf_nodes=None,
           min_impurity_decrease=0.0, min_impurity_split=None,
           min_samples_leaf=1, min_samples_split=2,
           min_weight_fraction_leaf=0.0, n_estimators=1000, n_jobs=-1,
           oob_score=True, random_state=None, verbose=0, warm_start=False)

In [122]:
m = RandomForestRegressor(n_estimators=1000,
                          n_jobs=-1, oob_score=True)
m.fit(df, y)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-122-9dc8457d6d10> in <module>()
      2                           n_jobs=-1, oob_score=True)
      3 m.fit(df, y)
----> 4 print_score(m)

<ipython-input-38-284f16c2cedf> in print_score(m)
      2 
      3 def print_score(m):
----> 4     res = [rmse(m.predict(X_train), y_train), rmse(m.predict(X_valid), y_valid),
      5                 m.score(X_train, y_train), m.score(X_valid, y_valid)]
      6     if hasattr(m, 'oob_score_'): res.append(m.oob_score_)

C:\ProgramData\Anaconda3\lib\site-packages\sklearn\ensemble\forest.py in predict(self, X)
    679         check_is_fitted(self, 'estimators_')
    680         # Check data
--> 681         X = self._validate_X_predict(X)
    682 
    683         # Assign chunk of trees to jobs

C:\ProgramData\Anaconda3\lib\site-packages\sklearn\ensemble\forest.py in _validate_X_predict(self, X)
    355                                  "call `fit` before exploiting the model.")
    356 
--> 357         return self.estimators_[0]._validate_X_predict(X, check_input=True)
    358 
    359     @property

C:\ProgramData\Anaconda3\lib\site-packages\sklearn\tree\tree.py in _validate_X_predict(self, X, check_input)
    382                              "match the input. Model n_features is %s and "
    383                              "input n_features is %s "
--> 384                              % (self.n_features_, n_features))
    385 
    386         return X

ValueError: Number of features of the model must match the input. Model n_features is 27 and input n_features is 20 

In [125]:
preds = m.predict(df_test_1)

In [130]:
categorical_features_indices = []

In [ ]:
#importing library and building model
from catboost import CatBoostClassifier
model=CatBoostClassifier(iterations=1000, depth=10, learning_rate=0.01, loss_function='CrossEntropy',\
                         )
model.fit(X_train, y_train,cat_features=categorical_features_indices,eval_set=(X_validation, y_validation))

In [214]:
preds=m.predict(df_test_1)

xgb


In [5]:
df_raw.head(3)


Out[5]:
id gender age hypertension heart_disease ever_married work_type Residence_type avg_glucose_level bmi ... impact_encoded_smoking_status y is_age>40 healthy under_weight over_weight obsese normal_glucose pre_diabetes diabetes
0 30669 Male 3.0 0 0 No children Rural 95.12 18.0 ... 0.018041 0 0 0.0 0.0 0.0 0.0 1.0 0.0 0.0
1 30468 Male 58.0 1 0 Yes Private Urban 87.96 39.2 ... 0.017344 0 1 0.0 0.0 0.0 1.0 1.0 0.0 0.0
2 16523 Female 8.0 0 0 No Private Urban 110.89 17.6 ... 0.018041 0 0 0.0 0.0 0.0 0.0 1.0 0.0 0.0

3 rows × 25 columns


In [6]:
df_test.head(3)


Out[6]:
id gender age hypertension heart_disease ever_married work_type Residence_type avg_glucose_level bmi ... impact_encoded_Residence_type impact_encoded_smoking_status is_age>40 healthy under_weight over_weight obsese normal_glucose pre_diabetes diabetes
0 36306 Male 80.0 0 0 Yes Private Urban 83.84 21.1 ... 0.017739 0.028568 1 0.0 0.0 0.0 0.0 1.0 0.0 0.0
1 61829 Female 74.0 0 1 Yes Self-employed Rural 179.50 26.0 ... 0.017643 0.028568 1 0.0 0.0 0.0 0.0 0.0 1.0 0.0
2 14152 Female 14.0 0 0 No children Rural 95.16 21.2 ... 0.017643 0.018041 0 0.0 0.0 0.0 0.0 1.0 0.0 0.0

3 rows × 24 columns


In [12]:
features = df_raw.columns
numeric_features = []
categorical_features = []

for dtype, feature in zip(df_raw.dtypes, df_raw.columns):
    if dtype == object:
        #print(column)
        #print(train_data[column].describe())
        categorical_features.append(feature)
    else:
        numeric_features.append(feature)
categorical_features


Out[12]:
['gender', 'ever_married', 'work_type', 'Residence_type', 'smoking_status']

In [44]:
(43400-783)/783


Out[44]:
54.427841634738186

In [42]:
np.count_nonzero(y)


Out[42]:
783

In [118]:
import xgboost as xgb
from sklearn.metrics import mean_squared_error
from sklearn.metrics import  roc_auc_score

def runXGB(train_X, train_y, test_X, test_y=None, seed_val=1, depth = 10):
    
        params = {}
        params["objective"] = "binary:logistic"
        params['eval_metric'] = 'logloss'
        params["eta"] = 0.01 #0.00334
        params["subsample"] = 0.9
        params["silent"] = 0
        params["max_depth"] = depth
        params["seed"] = seed_val
        params["max_delta_step"] = 4
        params['scale_pos_weight'] = 54.427841634738186 
        #params["gamma"] = 0.5
        num_rounds = 5000 #3600

        plst = list(params.items())
        xgtrain = xgb.DMatrix(train_X, label=train_y)

        if test_y is not None:
                xgtest = xgb.DMatrix(test_X, label=test_y)
                watchlist = [ (xgtrain,'train'), (xgtest, 'test') ]
                model = xgb.train(plst, xgtrain, num_rounds, watchlist, early_stopping_rounds= 500)
        else:
                xgtest = xgb.DMatrix(test_X)
                #xgtest1 = xgb.DMatrix(test_X1)
                model = xgb.train(plst, xgtrain, num_rounds)

        pred_test_y = model.predict(xgtest)
        
        return pred_test_y, model

In [119]:
df_raw['y'] = y
y = df_raw.y.values;
df_raw.drop('y',axis=1,inplace=True)
train_cats(df_raw);
apply_cats(df_test, df_raw)
df_raw['y'] = y
df_test['y'] =  y[:18601]
df_train , y, nas = proc_df(df_raw, 'y', max_n_cat=20)
df_test , _ , _  = proc_df(df_test, 'y', max_n_cat=20, na_dict= nas)
df_raw.drop('y',axis=1,inplace=True)

In [ ]:
%time preds_xgb, model = runXGB(df_train, y, df_test)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<timed exec> in <module>()

<ipython-input-118-d69e18e7452e> in runXGB(train_X, train_y, test_X, test_y, seed_val, depth)
     30                 model = xgb.train(plst, xgtrain, num_rounds)
     31 
---> 32         pred_test_y = model.predict(xgtest)
     33 
     34         return pred_test_y, model

C:\ProgramData\Anaconda3\lib\site-packages\xgboost\core.py in predict(self, data, output_margin, ntree_limit, pred_leaf, pred_contribs, approx_contribs)
   1042             option_mask |= 0x08
   1043 
-> 1044         self._validate_features(data)
   1045 
   1046         length = c_bst_ulong()

C:\ProgramData\Anaconda3\lib\site-packages\xgboost\core.py in _validate_features(self, data)
   1286 
   1287                 raise ValueError(msg.format(self.feature_names,
-> 1288                                             data.feature_names))
   1289 
   1290     def get_split_value_histogram(self, feature, fmap='', bins=None, as_pandas=True):

ValueError: feature_names mismatch: ['id', 'age', 'hypertension', 'heart_disease', 'avg_glucose_level', 'bmi', 'impact_encoded_gender', 'impact_encoded_ever_married', 'impact_encoded_work_type', 'impact_encoded_Residence_type', 'impact_encoded_smoking_status', 'is_age>40', 'healthy', 'under_weight', 'over_weight', 'obsese', 'normal_glucose', 'pre_diabetes', 'diabetes', 'is_age>60', 'is_age>80', 'is_age20&40', 'is_ageless20', 'gender_Female', 'gender_Male', 'gender_Other', 'gender_nan', 'ever_married_No', 'ever_married_Yes', 'ever_married_nan', 'work_type_Govt_job', 'work_type_Never_worked', 'work_type_Private', 'work_type_Self-employed', 'work_type_children', 'work_type_nan', 'Residence_type_Rural', 'Residence_type_Urban', 'Residence_type_nan', 'smoking_status_formerly smoked', 'smoking_status_never smoked', 'smoking_status_smokes', 'smoking_status_nan'] ['id', 'age', 'hypertension', 'heart_disease', 'avg_glucose_level', 'bmi', 'impact_encoded_gender', 'impact_encoded_ever_married', 'impact_encoded_work_type', 'impact_encoded_Residence_type', 'impact_encoded_smoking_status', 'is_age>40', 'healthy', 'under_weight', 'over_weight', 'obsese', 'normal_glucose', 'pre_diabetes', 'diabetes', 'gender_Female', 'gender_Male', 'gender_Other', 'gender_nan', 'ever_married_No', 'ever_married_Yes', 'ever_married_nan', 'work_type_Govt_job', 'work_type_Never_worked', 'work_type_Private', 'work_type_Self-employed', 'work_type_children', 'work_type_nan', 'Residence_type_Rural', 'Residence_type_Urban', 'Residence_type_nan', 'smoking_status_formerly smoked', 'smoking_status_never smoked', 'smoking_status_smokes', 'smoking_status_nan', 'is_age>60', 'is_age>80', 'is_age20&40', 'is_ageless20']

In [ ]:
xgb.plot_importance(model,max_num_features=20,importance_type='gain')

In [ ]:
len(df_train.columns)

In [ ]:
len(df_test.columns)

In [95]:
df_raw['is_age>60'] = np.where(df_raw['age']>=60,1,0)
df_raw['is_age>80'] = np.where(df_raw['age']>=80,1,0)

df_raw['is_age20&40'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('age>=20 & age<=40').index
df_raw.iloc[my_query, -1] = 1

df_raw['is_ageless20'] = np.zeros(df_raw.shape[0])
my_query = df_raw.query('age<20').index
df_raw.iloc[my_query, -1] = 1

df_test['is_age20&40'] = np.zeros(df_test.shape[0])
my_query = df_test.query('age>=20 & age<=40').index
df_test.iloc[my_query, -1] = 1

df_test['is_ageless20'] = np.zeros(df_test.shape[0])
my_query = df_test.query('age<20').index
df_test.iloc[my_query, -1] = 1

In [108]:
df_test['is_age20&40'] = np.zeros(df_test.shape[0])
my_query = df_test.query('age>=20 & age<=40').index
df_test.iloc[my_query, -1] = 1

df_test['is_ageless20'] = np.zeros(df_test.shape[0])
my_query = df_test.query('age<20').index
df_test.iloc[my_query, -1] = 1