@@ -48,14 +48,14 @@ def load_json(path):
4848 book_id_pages [book .strip ()] = list_pages
4949
5050# A queries map és on va lo de les LUT de pagines o de books en cas de que la response sigui amb les queries originals
51- map_at_k , recall_at_k = compute_map_recall_at_k (df_books , k = 10 , queries_map = None , evaluate_page = False , book_to_author_map = book_id_to_author , book_to_pages_map = book_id_pages )
51+ map_at_k , recall_at_k = compute_map_recall_at_k (df_books , k = 50 , queries_map = None , evaluate_page = False , book_to_author_map = book_id_to_author , book_to_pages_map = book_id_pages )
5252
5353print (' THe mean recall at k book level is: ' , recall_at_k )
5454print (' THe mean map at k book level is: ' , map_at_k )
5555
5656
5757# A queries map és on va lo de les LUT de pagines o de books en cas de que la response sigui amb les queries originals
58- map_at_k , recall_at_k = compute_map_recall_at_k (df_pages , k = 10 , queries_map = None , evaluate_page = True , book_to_author_map = book_id_to_author , book_to_pages_map = book_id_pages )
58+ map_at_k , recall_at_k = compute_map_recall_at_k (df_pages , k = 50 , queries_map = None , evaluate_page = True , book_to_author_map = book_id_to_author , book_to_pages_map = book_id_pages )
5959
6060print (' THe mean recall at k page level is: ' , recall_at_k )
6161print (' THe mean map at k page level is: ' , map_at_k )
@@ -68,10 +68,10 @@ def load_json(path):
6868ideal_rankings = load_json (IDEAL_RANKNGS )
6969ideal_rankings_books = load_json (IDEAL_RANKNGS_BOOKS )
7070
71- ndcg_at_k = compute_nDCG (df_pages , ideal_rankings , k = 10 , book_to_author = book_id_to_author , lut_full_catalog = lut_full_catalog , queries_map = lut_pages )
71+ ndcg_at_k = compute_nDCG (df_pages , ideal_rankings , k = 50 , book_to_author = book_id_to_author , lut_full_catalog = lut_full_catalog , queries_map = lut_pages )
7272
7373print (' THe mean nDCG at k page level is: ' , ndcg_at_k )
7474
75- ndcg_at_k = compute_nDCG (df_books , ideal_rankings_books , k = 10 , book_to_author = book_id_to_author , lut_full_catalog = lut_full_catalog , queries_map = lut_books )
75+ ndcg_at_k = compute_nDCG (df_books , ideal_rankings_books , k = 50 , book_to_author = book_id_to_author , lut_full_catalog = lut_full_catalog , queries_map = lut_books )
7676
7777print (' THe mean nDCG at k book level is: ' , ndcg_at_k )
0 commit comments