# In[13]: with Timer() as t_train: xgb_hist_clf_pipeline = xgb.train(params, dtrain, num_boost_round=num_rounds) with Timer() as t_test: y_prob_xgb_hist = xgb_hist_clf_pipeline.predict(dtest) # In[14]: y_pred_xgb_hist = binarize_prediction(y_prob_xgb_hist) # In[15]: report_xgb_hist = classification_metrics_binary(y_test, y_pred_xgb_hist) report2_xgb_hist = classification_metrics_binary_prob(y_test, y_prob_xgb_hist) report_xgb_hist.update(report2_xgb_hist) # In[16]: results_dict['xgb_hist']={ 'train_time': t_train.interval,
results_dict['xgb_hist']={ 'train_time': t_train } # In[22]: y_prob_xgb_hist, t_test = test_xgboost(xgb_hist_clf_pipeline, X_test, y_test) # In[23]: y_pred_xgb_hist = binarize_prediction(y_prob_xgb_hist) # In[24]: results_dict['xgb_hist']['test_time'] = t_test # In[25]: del xgb_hist_clf_pipeline # Training LightGBM model