<jupyter_start><jupyter_text>Best Model Selection<jupyter_code>import pickle
import pandas as pd
path_pickles = "Models/"

list_pickles = [
    "df_models_gbc.pickle",
    "df_models_lrc.pickle",
    "df_models_mnbc.pickle",
    "df_models_rfc.pickle",
    "df_models_svc.pickle"
#se adicionar ou trocar, mudar essa parte do código
]

df_summary = pd.DataFrame()

for pickle_ in list_pickles:
    
    path = path_pickles + pickle_
    
    with open(path, 'rb') as data:
        df = pickle.load(data)

    df_summary = df_summary.append(df)

df_summary = df_summary.reset_index().drop('index', axis=1)
df_summary
df_summary.sort_values('Test Set Accuracy', ascending=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10921985815602837, 'fraction_numerical': 0.0014184397163120568, 'mean_word_length': 4.515625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '258462', 'license': 'MIT', 'n_tokens_mistral': 276, 'n_tokens_neox': 269, 'n_words': 51, 'path': '3 - TreinamentoAlgoritmos/9. Best Model Selection.ipynb', 'repo_name': 'researchgroupsoma/VEM2021-Issues', 'size': '705'}