mlx_graphs.datasets.MovieLens100K

Contents

mlx_graphs.datasets.MovieLens100K#

class mlx_graphs.datasets.MovieLens100K(base_dir: str, transform: Callable | None = None, pre_transform: Callable | None = None)[source]#

Bases: Dataset

The MovieLens 100K heterogeneous rating dataset, assembled by GroupLens Research from the MovieLens web site, consisting of movies (1,682 nodes) and users (943 nodes) with 100K ratings between them. User ratings for movies are available as ground truth labels. Features of users and movies are encoded according to the “Inductive Matrix Completion Based on Graph Neural Networks” paper.

Parameters:
  • base_dir (str) – Directory where to store dataset files.

  • transform (callable, optional) – A function/transform that takes in an HeteroGraphData object and returns a transformed version. The data object will be transformed before every access. (default: None)

  • pre_transform (callable, optional) – A function/transform that takes in an HeteroGraphData object and returns a transformed version. The data object will be transformed before being saved to disk. (default: None)