Kaggle competition: Cloud Faculty Institute Workshop
<SOS> metric: meanfscore Kaggle data source: cloud-faculty-institute-workshop<feature_engineering>
%matplotlib inline
X_train['amnt_by_inq'] = X_train['loan_amnt']*X_train['inq_last_6mths']
X_test['amnt_by_inq'] = X_test['loan_amnt']*X_test['inq_last_6mths']<feature_engineering>
train = pd.read_csv('.. /input/train.csv')
 test = pd.read_csv('.. /input/test.csv' )
X_train['nan_cnt'] = X_train.isnull().sum(axis=1)
 X_test['nan_cnt'] = X_test.isnull().sum(axis=1 )<data_type_conversions>
train = pd.read_csv('.. /input/train.csv')
 test = pd.read_csv('.. /input/test.csv' )
X_train['issue_d'] = pd.to_datetime(X_train.issue_d, format="%b-%Y")
 X_test['issue_d'] = pd.to_datetime(X_test.issue_d, format="%b-%Y" )<data_type_conversions>
train.isnull().sum()
X_train['issue_d_month'] = X_train['issue_d'].dt.month.astype(str)
 X_test['issue_d_month'] = X_test['issue_d'].dt.month.astype(str )<data_type_conversions>
test.isnull().sum()
X_train['issue_d'] = X_train['issue_d'].astype(int)
 X_test['issue_d'] = X_test['issue_d'].astype(int )<data_type_conversions>
test.isnull().sum()
X_train['earliest_cr_line'] = pd.to_datetime(X_train.earliest_cr_line, format="%b-%Y")
 X_test['earliest_cr_line'] = pd.to_datetime(X_test.earliest_cr_line, format="%b-%Y" )<feature_engineering>
train.Outcome.value_counts()
X_train['earliest_cr_line_year'] = X_train['earliest_cr_line'].dt.year
X_test['earliest_cr_line_year'] = X_test['earliest_cr_line'].dt.year<data_type_conversions>
X = train.drop(['Outcome'], axis = 1)
 y = train.Outcome
X_train['earliest_cr_line_month'] = X_train['earliest_cr_line'].dt.month.astype(str)
 X_test['earliest_cr_line_month'] = X_test['earliest_cr_line'].dt.month.astype(str )<data_type_conversions>
clf = GradientBoostingClassifier(n_estimators = 105)
 clf.fit(X,y )
X_train['earliest_cr_line'] = X_train['earliest_cr_line'].astype(int)
 X_test['earliest_cr_line'] = X_test['earliest_cr_line'].astype(int )<feature_engineering>
predicted = clf.predict(test )
<feature_engineering><EOS> 
output = pd.DataFrame(predicted,columns = ['Outcome'])
 test = pd.read_csv('.. /input/test.csv')
 output['Id'] = test['Id']
output[['Id','Outcome']].to_csv('submission_cloudy10.csv', index = False)
 output.head()