Kaggle competition: IEEE-CIS Fraud Detection
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=42)
 model_XG = xgboost.XGBRegressor()
model_XG.fit(x_train,y_train)
 y_predict_rf = model_XG.predict(x_test)
 print(mean_squared_error(y_test, y_predict_rf)) 
<drop_column>
sub=pd.read_csv('.. /input/ieee-fraud-detection/sample_submission.csv' )
X_test=new_test.drop('revenue',axis=1)
 X_test=X_test.fillna(0 )<predict_on_test>
df0=pd.read_csv('.. /input/a-method-to-valid-offline-lb-9506/simple_ensemble6.csv')
 df1=pd.read_csv('.. /input/lgb-fe-0-9492-lb-newfeature-0-9496-lb/submission.csv')
 df2=pd.read_csv('.. /input/lightgbm-feature-engineering-eda-with-r/submission.csv')
 df3=pd.read_csv('.. /input/ieee-gb-2-make-amount-useful-again/submission.csv')
 df4=pd.read_csv('.. /input/lgb-single-model-lb-0-9419/ieee_cis_fraud_detection_v2.csv')
 df5=pd.read_csv('.. /input/feature-engineering-lightgbm/submission.csv')
 df6=pd.read_csv('.. /input/ieee-lgbm-with-groupkfold-cv/submission.csv')
 df7=pd.read_csv('.. /input/lightgbm-single-model-and-feature-engineering/submission.csv')
 df8=pd.read_csv('.. /input/is-it-really-fraud/submission.csv')
 df9=pd.read_csv('.. /input/cis-fraud-detection-visualize-feature-engineering/prediction.csv')
 df10=pd.read_csv('.. /input/ieee-simple-lgbm/submission.csv' )
ypred=model_XG.predict(X_test )<prepare_x_and_y>
blend1 = df0['isFraud']*0.7 + df1['isFraud']*0.06 + df2['isFraud']*0.06 + df3['isFraud']*0.06 + df4['isFraud']*0.06 + df5['isFraud']*0.06
dtrain = xgb.DMatrix(x, y)
 dtest = xgb.DMatrix(X_test )<train_on_grid>
sub['isFraud'] = blend1
df11 = sub
xgb_params = {
'eta': 0.08,
'max_depth': 15,
'subsample': 0.7,
'colsample_bytree': 0.7,
'objective': 'reg:linear',
'eval_metric': 'rmse',
'silent': 1
}
cv_output = xgb.cv(xgb_params, dtrain, num_boost_round=1000, early_stopping_rounds=400, verbose_eval=50, show_stdv=False)
 cv_output[['train-rmse-mean', 'test-rmse-mean']].plot()<predict_on_test>
blend2 = df11['isFraud']*0.5 + df6['isFraud']*0.1 + df7['isFraud']*0.1 + df8['isFraud']*0.1 + df9['isFraud']*0.1 + df10['isFraud']*0.1
y_predict1 = abs(model.predict(dtest))<prepare_x_and_y>
sub1 = pd.read_csv('.. /input/ieee-fraud-detection/sample_submission.csv' )
train=x
y_train=np.log1p(y)
 test=X_test
y=y_train<compute_train_metric>
sub1.to_csv('easy_blend4.csv',index=False )