baserec.utils package

Submodules

baserec.utils.assertions_on_data_for_experiments module

@author: Maurizio Ferrari Dacrema & Ceshine Lee

baserec.utils.assertions_on_data_for_experiments.assert_disjoint_matrices(URM_list)

Checks whether the URM in the list have an empty intersection, therefore there is no data point contained in more than one URM at a time :param URM_list: :return:

baserec.utils.assertions_on_data_for_experiments.assert_implicit_data(URM_list)

Checks whether the URM in the list only contain implicit data in the form 1 or 0 :param URM_list: :return:

baserec.utils.plot_popularity module

@author: Maurizio Ferrari Dacrema & Ceshine Lee

baserec.utils.plot_popularity.Gini_Index(x)
baserec.utils.plot_popularity.gini(array)

Calculate the Gini coefficient of a numpy array.

baserec.utils.plot_popularity.plot_popularity_bias(URM_object_list, URM_name_list, output_img_path, sort_on_all=False)
baserec.utils.plot_popularity.save_popularity_statistics(URM_object_list, URM_name_list, output_file_path)

baserec.utils.result_folder_loader module

@author: Maurizio Ferrari Dacrema & Ceshine Lee

class baserec.utils.result_folder_loader.ResultFolderLoader(folder_path, base_algorithm_list=None, other_algorithm_list=None, KNN_similarity_list=None, ICM_names_list=None, UCM_names_list=None)

Bases: object

generate_latex_results(output_file_path, metrics_list, cutoffs_list, n_decimals=4, table_title=None, highlight_best=True, collapse_multicolumn_if_needed=True)
generate_latex_time_statistics(output_file_path, n_decimals=2, n_evaluation_users=None, table_title=None)
get_hyperparameters_dataframe()
get_metadata()
get_results_dataframe(metrics_list, cutoffs_list)

Loads the metadata in a dataframe :param metrics_list: :param cutoffs_list: :return:

get_time_statistics_dataframe(n_decimals=2, n_evaluation_users=None)
baserec.utils.result_folder_loader.generate_latex_hyperparameters(result_folder_path, algorithm_name, experiment_subfolder_list, other_algorithm_list, file_name_suffix='', KNN_similarity_to_report_list=None, ICM_names_to_report_list=None, UCM_names_to_report_list=None, split_per_algorithm_type=False)

baserec.utils.seconds_to_biggest_unit module

@author: Maurizio Ferrari Dacrema & Ceshine Lee

baserec.utils.seconds_to_biggest_unit.seconds_to_biggest_unit(time_in_seconds, data_array=None)

Module contents