Beispiel #1
0
def main():
    info_dir = "/mnt/nfs/work3/youngwookim/job_man/ppnc_50_pers_val"
    #prediction_file = os.path.join(output_path, "ppnc_50_val_prediction")
    prediction_file = os.path.join(output_path, "ppnc_pred_100K")
    score_d = summarize_score(info_dir, prediction_file)
    map_score = eval_map("train", score_d)
    print(map_score)
Beispiel #2
0
def main():
    save_name = sys.argv[1]
    out_dir = os.path.join(output_path, "cppnc")
    exist_or_mkdir(out_dir)
    info_file_path = os.path.join(out_dir, sys.argv[2])
    pred_file_path = os.path.join(out_dir, save_name + ".score")
    score_d = summarize_score(info_file_path, pred_file_path)
    save_to_pickle(score_d, "score_d")
    print("Saved as 'score_d'")
Beispiel #3
0
def main():
    save_name = sys.argv[1]
    out_dir = os.path.join(output_path, "cppnc")
    exist_or_mkdir(out_dir)
    info_file_path = os.path.join(out_dir, save_name + ".info")
    pred_file_path = os.path.join(out_dir, save_name + ".score")
    score_d = summarize_score(info_file_path, pred_file_path)
    map_score = eval_map("dev", score_d, False)
    print(map_score)
Beispiel #4
0
def main():
    save_name = sys.argv[1]
    out_dir = os.path.join(output_path, "cppnc")
    exist_or_mkdir(out_dir)
    info_file_path = os.path.join(out_dir, save_name + ".info")
    pred_file_path = os.path.join(out_dir, save_name + ".score")
    score_d = summarize_score(info_file_path, pred_file_path)
    # load pre-computed perspectives
    split = "dev"
    ap_list, cids = get_ap_list_from_score_d(score_d, split)
    print_table(zip(cids, ap_list))
Beispiel #5
0
def main():
    save_name = sys.argv[1]
    out_dir = os.path.join(output_path, "cppnc")
    exist_or_mkdir(out_dir)
    info_file_path = os.path.join(out_dir, sys.argv[2])
    pred_file_path = os.path.join(out_dir, save_name + ".score")

    debug = False
    split = "dev"
    if len(sys.argv) > 3:
        if sys.argv[3] == "debug":
            debug = True
    if len(sys.argv) > 4:
        if sys.argv[4] == "train":
            split = "train"
    score_d = summarize_score(info_file_path, pred_file_path)
    map_score = eval_map(split, score_d, debug)
    print(map_score)
Beispiel #6
0
def main():
    info_dir = "/mnt/nfs/work3/youngwookim/job_man/cppnc_val_info"
    prediction_file = os.path.join(output_path, "cppnc_pred")
    score_d = summarize_score(info_dir, prediction_file)
    map_score = eval_map("train", score_d)
    print(map_score)