def read_reddit_result_data(output_folder, method_name_list):
    reddit_mse = dict()
    reddit_jaccard = dict()
    feature_names = dict()
    reddit_k_list = None

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "mean"

    METHOD = "Baseline Mean"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "median"

    METHOD = "Baseline Median"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "comments"

    METHOD = "Baseline Comments"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "users"

    METHOD = "Baseline Users"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "comments_users"

    METHOD = "Baseline Comments + Users"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "simple graph"

    METHOD = "Simple Graph"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = True
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "Temporal"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = True
    CONFIGURATION_DICT["add_usergraph_features"] = True
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "Comment Tree + User Graph"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = True
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "Comment Tree"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = True
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "User Graph"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users", "score_wilson", "controversiality_wilson"]
    CONFIGURATION_DICT["osn_name_focus"] = "reddit"
    CONFIGURATION_DICT["target_osn_name"] = "reddit"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["reddit"]
    CONFIGURATION_DICT["add_branching_features"] = True
    CONFIGURATION_DICT["add_usergraph_features"] = True
    CONFIGURATION_DICT["add_temporal_features"] = True
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "All"

    if METHOD in method_name_list:
        reddit_k_list = add_results(mse_results=reddit_mse,
                                    jaccard_results=reddit_jaccard,
                                    feature_names=feature_names,
                                    feature_name_offset=7,
                                    method=METHOD,
                                    target_name_list=CONFIGURATION_DICT["target_name_list"],
                                    results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    return reddit_mse, reddit_jaccard, reddit_k_list
def read_barrapunto_result_data(output_folder, method_name_list):
    barrapunto_mse = dict()
    barrapunto_jaccard = dict()
    feature_names = dict()
    barrapunto_k_list = None

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "mean"

    METHOD = "Baseline Mean"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "median"

    METHOD = "Baseline Median"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "comments"

    METHOD = "Baseline Comments"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "users"

    METHOD = "Baseline Users"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "comments_users"

    METHOD = "Baseline Comments + Users"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    CONFIGURATION_DICT["baseline"] = "simple graph"

    METHOD = "Simple Graph"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = True
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "Temporal"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = True
    CONFIGURATION_DICT["add_usergraph_features"] = True
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "Comment Tree + User Graph"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = True
    CONFIGURATION_DICT["add_usergraph_features"] = False
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "Comment Tree"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = False
    CONFIGURATION_DICT["add_usergraph_features"] = True
    CONFIGURATION_DICT["add_temporal_features"] = False
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "User Graph"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    CONFIGURATION_DICT = dict()
    CONFIGURATION_DICT["target_name_list"] = ["comments", "users"]
    CONFIGURATION_DICT["osn_name_focus"] = "barrapunto"
    CONFIGURATION_DICT["target_osn_name"] = "slashdot"
    CONFIGURATION_DICT["feature_osn_name_list"] = ["slashdot"]
    CONFIGURATION_DICT["add_branching_features"] = True
    CONFIGURATION_DICT["add_usergraph_features"] = True
    CONFIGURATION_DICT["add_temporal_features"] = True
    CONFIGURATION_DICT["add_author_features"] = False

    METHOD = "All"

    if METHOD in method_name_list:
        barrapunto_k_list = add_results(mse_results=barrapunto_mse,
                                        jaccard_results=barrapunto_jaccard,
                                        feature_names=feature_names,
                                        feature_name_offset=9,
                                        method=METHOD,
                                        target_name_list=CONFIGURATION_DICT["target_name_list"],
                                        results_file_paths=get_results_file_paths(output_folder, CONFIGURATION_DICT))

    return barrapunto_mse, barrapunto_jaccard, barrapunto_k_list