<jupyter_start><jupyter_text>train ratio<jupyter_code>((tr[key]==val)*1).value_counts(normalize=True)<jupyter_output><empty_output><jupyter_text>train auc<jupyter_code>roc_auc_score(y_train, ((tr[key]==val)*1))<jupyter_output><empty_output><jupyter_text>test ratio<jupyter_code>((te[key]==val)*1).value_counts(normalize=True)<jupyter_output><empty_output><jupyter_text>Adjust train to test<jupyter_code>((tr[key]==val)*1).sum()
x = 774099
(4316194 - x) / (8921483 - x)
ix = tr[tr[key]==val].head(x).index
tr_ = tr.drop(ix)
y_train_ = y_train.drop(ix)
print( ((tr_[key]==val)*1).value_counts(normalize=True) )
print( roc_auc_score(y_train_, ((tr_[key]==val)*1)) )<jupyter_output>0    0.565248
1    0.434752
Name: SmartScreen, dtype: float64
0.44057511196576676<jupyter_text>Noise<jupyter_code>li_ = []
for i,j,p in zip(y_train.tolist(), ((tr[key]==val)*1).tolist(), np.random.uniform(size=len(tr))):
    if j==1:
        if p<0.41:
            i = 1-i
    li_.append(i)

roc_auc_score(li_, ((tr[key]==val)*1))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1994219653179191, 'fraction_numerical': 0.06647398843930635, 'mean_word_length': 7.956896551724138, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 20, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '406297', 'license': 'MIT', 'n_tokens_mistral': 502, 'n_tokens_neox': 466, 'n_words': 49, 'path': 'jn/EDA_011 SmartScreen RequireAdmin.ipynb', 'repo_name': 'KazukiOnodera/Microsoft-Malware-Prediction', 'size': '1038'}