<jupyter_start><jupyter_text>Random Forest<jupyter_code>rf = RandomForestClassifier(n_estimators = 250, criterion='entropy', #max_samples=.75, #max_depth=16,  
                            class_weight='balanced_subsample', verbose=True)

with joblib.parallel_backend('dask'):
    rf.fit(train_X, train_y)
print(rf.score(test_X, test_y))
with joblib.parallel_backend('dask'):
    print(cross_val_score(rf, train_Xf, train_y, cv=5))<jupyter_output><empty_output><jupyter_text>Submission<jupyter_code>values = pd.read_csv('Source_data/trainset_values.csv')
submit_X = pd.read_csv('Source_data/testset_values.csv')
submit_Xf, cols, id_col = prep_submit(values, submit_X)
submit_Xf
submit_pred_rf = rf.predict(submit_Xf)
submit_pred_rf = pd.DataFrame(submit_pred_rf, columns=['status_group'])
submit_pred_rf.insert(0,value=id_col, column='id')
submit_pred_rf
#submit_pred_rf.to_csv(r'submissions/D/submission_E_rf', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13011542497376705, 'fraction_numerical': 0.00944386149003148, 'mean_word_length': 8.262135922330097, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '550594', 'license': 'MIT', 'n_tokens_mistral': 378, 'n_tokens_neox': 364, 'n_words': 40, 'path': 'Misc/2F Modeling-Submission-years.ipynb', 'repo_name': 'Bwils171/Pump-it-up', 'size': '953'}