Skip to content

Instantly share code, notes, and snippets.

@Wann-Jiun
Created January 20, 2017 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wann-Jiun/67b39c77e8bbb6f37926877f51b56328 to your computer and use it in GitHub Desktop.
Save Wann-Jiun/67b39c77e8bbb6f37926877f51b56328 to your computer and use it in GitHub Desktop.
y_final = (1*np.ravel(y_test_pred_xgb) + 1*np.ravel(y_test_pred_kridge) + 1*np.ravel(y_test_pred_lasso))/3
y_final.shape
y_pred = np.exp(y_final)
# Final Conversion.
output_file = 'xgboost_lasso_kridge_weights_1_1_1'
final_file = '0108_'+ output_file +'.csv'
pred_df = pd.DataFrame(y_pred, index=test_df["Id"], columns=["SalePrice"])
pred_df.shape
pred_df.to_csv(path+final_file, header=True, index_label='Id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment