Skip to content

Week 13 and 14

AlvaroJoseLopes edited this page Oct 8, 2023 · 1 revision

TL;DR

Weeks 13 and 14, were dedicated to the report submodule of the framework and to add social links into the knowledge graph. I was able to:

  • Implement the report submodule of the framework, responsible for summarizing the experiment result into a .csv
  • Implement the Dataset method to convert social links into a standardized .csv (for LastFM) and add a directive to the framework to add these social links into the final knowledge graph.

Report Submodule

This submodule is responsible for reporting the final results of the experiment pipeline. This submodule will return a .csv file with all the metrics computed for each model with respect to the configured pipeline.

If the configured splitting technique was hold-out, then the report will have in each row an evaluated model, and the columns will be the metric values for each model in the test dataset. Otherwise, if the splitting technique chosen was K-Fold, then for each model will be reported all the metric values for each fold, together with the mean and standard deviation of all folds.

In the .yaml file, the report directive defines the experiment summarization.

experiment:
  # ...
  report:
    file: 'experiment_results/ml100k_enriched/run1.csv'

Where,

  • report: specifies the report metadata (mandatory)
    • file: .csv filename of the experiment report. (mandatory)

Check experiment_results/ for examples.

Adding social links

Some Recommender System datasets have social links between users, representing friendship, connections, or collaborations, which can be valuable for enhancing the performance of recommendations. These social links provide additional information beyond traditional user-item interactions, allowing recommender systems to leverage social network analysis and techniques.

Between the already supported datasets, LastFM is the only one that has user-user interactions, of type follows.

In order for the framework to be able to add social links to the network, it's necessary to convert the social links from the .dat file to a standardized .csv file. During the implementation, it's necessary to override the load_social_data() method of the class Dataset. The expected return is a pd.DataFrame with two columns of user IDs representing the social link. All this will be done in the Data Integration module.

At the framework end, with the standardized dataset, it's possible to add edges between two users that represent social links between them.

In the .yaml file, the social directive of experiment:dataset: defines the social link metadata.

experiment:
  dataset: 
    # ...
    social:
      path: datasets/lastfm/processed/social.csv 

Where,

  • social: specifies the social link metadata (mandatory)
    • path: .csv filename of the social link data extracted from the dataset. (mandatory)
Clone this wiki locally