<jupyter_start><jupyter_text>Find another group of best params using rmse<jupyter_code>regression_models = list(side_info_params.keys()) + ["surprise_SVD", "surprise_Baseline", "FMItem", "FMNone"]
rmse_model_with_params = []
for db_path in ["default_server.db", "new_server.db"]:
    summary = Summary(db_path="sqlite:///results/" + db_path)
    for model in regression_models:
        opt = summary.get_optimal_params(dataset_name="user_10_item_1_exp", model_name=model, metric="rmse")
        if not opt: continue
        params_dict = dict(eval(opt))

        rmse_model_with_params.append((model, params_dict))
rmse_list = []
for db_path in ["default_server.db", "new_server.db"]:
    summary = Summary(db_path="sqlite:///results/" + db_path)
    for model, opt_param in model_with_params:
        if model in regression_models:
            str_param = str(sorted(opt_param.items(), key=lambda x: x[0]))

            df = summary.get_result_for_params(dataset_name="user_10_item_1_exp", model_name=model, 
                                           hyper=str_param, metric="rmse", verbose=False)
            if len(df) == 0: continue
            df["is_rmse_opt"] = False
            rmse_list.append(df)
for db_path in ["default_server.db", "new_server.db"]:
    summary = Summary(db_path="sqlite:///results/" + db_path)
    for model, opt_param in rmse_model_with_params:
        str_param = str(sorted(opt_param.items(), key=lambda x: x[0]))

        df = summary.get_result_for_params(dataset_name="user_10_item_1_exp", model_name=model, 
                                       hyper=str_param, metric="rmse", verbose=False)
        if len(df) == 0: continue
        df["is_rmse_opt"] = True
        rmse_list.append(df)
rmse_results = pd.concat(rmse_list).reset_index(drop=True)
rmse_results
rmse_results.to_csv("./results/rmse_results.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.125531914893617, 'fraction_numerical': 0.006914893617021276, 'mean_word_length': 3.5107913669064748, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '38410', 'license': 'MIT', 'n_tokens_mistral': 641, 'n_tokens_neox': 623, 'n_words': 109, 'path': 'parse_results_with_visualization/Merge_TopK_results.ipynb', 'repo_name': 'HenryNebula/Personalization_Final_Project', 'size': '1880'}