mlx_graphs.datasets.MovieLens100K

mlx_graphs.datasets.MovieLens100K#

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

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)

__init__(base_dir: str, transform: Callable | None = None, pre_transform: Callable | None = None)[source]#

Methods

__init__(base_dir[, transform, pre_transform])

download()

Download the dataset at self.raw_path.

load()

Load the processed dataset

process()

Process the dataset and store data in self.data

save()

Save the processed dataset

Attributes

file_id

name

Name of the dataset

num_edge_classes

Returns a dictionary of the number of edge classes for each edge type.

num_edge_features

Returns a dictionary of the number of edge features for each edge type.

num_edges

Returns a dictionary of the number of edges for each edge type.

num_graph_features

Returns the number of graph features.

num_items

Returns the number of items in the dataset.

num_node_classes

Returns a dictionary of the number of node classes for each node type.

num_node_features

Returns a dictionary of the number of node features for each node type.

num_nodes

Returns a dictionary of the number of nodes for each node type.

processed_path

The path where processed files are stored.

raw_file_names

raw_path

The path where raw files are stored.