<jupyter_start><jupyter_text>Weighting<jupyter_code>w_soft = 0.275   #0.58
w_sig = 0.5   #0.609
w_crop = 0.05   #0.55
w_pred2 = 0.1    #0.562
w_pred3 = 0.075   #0.5

softmax['0'] = w_soft*softmax['0'] + w_crop*soft_crop['0'] + w_sig*sigmoid['0'] + w_pred2*pred_2['0'] + w_pred3*pred_3['0']
softmax['1'] = w_soft*softmax['1'] + w_crop*soft_crop['1'] + w_sig*sigmoid['1'] + w_pred2*pred_2['1'] + w_pred3*pred_3['1']
softmax.head()
softmax['Predicted'] = np.where(softmax['1']>0.95, 1, 0)
softmax.head(10)
pred = softmax[['Id', 'Predicted']]
pred.head(10)
pred.to_csv('Ensemble.csv', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22632423756019263, 'fraction_numerical': 0.10112359550561797, 'mean_word_length': 6.341176470588235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '518712', 'license': 'MIT', 'n_tokens_mistral': 332, 'n_tokens_neox': 309, 'n_words': 39, 'path': 'Ensemble.ipynb', 'repo_name': 'namanjaswani27/Deep-Learning-for-Healthcare', 'size': '623'}