<jupyter_start><jupyter_text>Prepare submission for the test sampleRead the sample submission<jupyter_code>submission = pd.read_csv('~/.kaggle/competitions/titanic/gender_submission.csv')

# config of inputs
out_dir = 'data'
out_version = 'v0'
opt_features = 'raw_StandardScaler'
opt_model = 'XGB_opt'
# the actual predictions
preds = pickle.load(open( "{}/pred_{}_{}.pickle".format(out_dir, opt_features, opt_model), "rb" ))
submission['Survived'] = preds
fout = '{}/subm_{}_{}.csv'.format(out_dir, opt_features, opt_model)
submission.to_csv(fout, index=False)
print('!kaggle competitions submit -c titanic -f {}  -m {}'.format(fout, opt_model))
!kaggle competitions submit -c titanic -f data/subm_raw_StandardScaler_XGB_opt.csv  -m XGB_opt<jupyter_output>Successfully submitted to Titanic: Machine Learning from Disaster
{'fraction_non_alphanumeric': 0.13138686131386862, 'fraction_numerical': 0.0012165450121654502, 'mean_word_length': 7.068627450980392, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '214345', 'license': 'MIT', 'n_tokens_mistral': 298, 'n_tokens_neox': 293, 'n_words': 63, 'path': 'Prepare_Submission.ipynb', 'repo_name': 'mlisovyi/TitanicSurvivalGuide', 'size': '822'}