<jupyter_start><jupyter_text>RandomForest (For MS)<jupyter_code>from sklearn.ensemble import RandomForestClassifier
df=df[df.degreeCoded==0]
df=df[['countryCoded','engCoded', 'fieldGroup','fund','gpaBachelors','gre', 'highLevelBachUni', 'paper']]
df.head()
clf= RandomForestClassifier(n_estimators=10,random_state=99)
clf=clf.fit(df.iloc[:, (df.columns != 'fund')],df.fund)
df.iloc[:, (df.columns != 'fund')].columns
# Check it fit on itself
clf.predict(df.ix[range(6,10)][['countryCoded', 'engCoded', 'fieldGroup', 'gpaBachelors', 'gre','highLevelBachUni','paper']])<jupyter_output><empty_output><jupyter_text>check my situation<jupyter_code>me=[1, 2, 0, 2.5, False,False,0]
clf.predict([me])
clf.predict_proba([me])
clf.classes_
me=[1, 2, 0, 2.5, False,False,1]
clf.predict([me])
clf.predict_proba([me])
me=[1, 2, 0, 2.5, False,False,0.5]
clf.predict([me])
clf.predict_proba([me])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20942982456140352, 'fraction_numerical': 0.029605263157894735, 'mean_word_length': 10.556962025316455, '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': '142968', 'license': 'MIT', 'n_tokens_mistral': 402, 'n_tokens_neox': 390, 'n_words': 53, 'path': '06_DM_UseAppliedUni/04_Forest/forest.ipynb', 'repo_name': 'yazdipour/DM17', 'size': '912'}