Skip to content

Instantly share code, notes, and snippets.

@gabriel19913
Created November 30, 2019 17:41
Show Gist options
  • Save gabriel19913/f1140350a950e426982a4681450b8120 to your computer and use it in GitHub Desktop.
Save gabriel19913/f1140350a950e426982a4681450b8120 to your computer and use it in GitHub Desktop.
y_pred_bra_2019 = xgb_reg.predict(pca_X_bra_2019)
y_pred_bra_2019 = pd.DataFrame(np.round(y_pred_bra_2019,0))
pred_table = pd.concat([teams_df.reset_index(), y_pred_bra_2019.reset_index()], axis=1).drop(['index'], axis=1).sort_values(0, ascending=False).reset_index()
pred_table['index'] = np.arange(1,21)
pred_table.columns = ['pos', 'team', 'points']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment