Created
September 18, 2018 13:14
-
-
Save lgmoneda/e0875666f2b43f72879d9f7329a50909 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def build_submission(preds, | |
score, | |
score_name="auc", | |
file_title="sub", | |
sample_sub_file="../data/sample_submission.csv", | |
submissions_path="../submissions/"): | |
timestamp = int(time()) | |
submission = pd.read_csv(sample_sub_file) | |
submission[TARGET] = preds | |
submission.to_csv(submissions_path + "{}_" + score_name + "_{}_{:.4f}.csv.gz".format(timestamp, | |
file_title, | |
score), | |
index=False, | |
compression="gzip") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment