irspack.dataset.MovieLens20MDataManager

class irspack.dataset.MovieLens20MDataManager(zippath=None, force_download=False)[source]

Bases: BaseMovieLenstDataLoader

Parameters:
  • zippath (Optional[Union[Path, str]]) –

  • force_download (bool) –

__init__(zippath=None, force_download=False)

Specify the zip path for dataset. If that path does not exist, try downloading the relevant data from online resources.

Parameters:
  • zippath (Optional[Union[Path, str]], optional) – _description_. Defaults to None.

  • force_download (bool, optional) – _description_. Defaults to False.

Raises:

RuntimeError – _description_

Methods

__init__([zippath, force_download])

Specify the zip path for dataset.

read_interaction()

Reads the entire user/movie/rating/timestamp interaction data.

Attributes

DEFAULT_PATH

DOWNLOAD_URL

INTERACTION_PATH

read_interaction()[source]

Reads the entire user/movie/rating/timestamp interaction data.

Returns:

The interaction pd.DataFrame, whose columns are [“userId”, “movieId”, “rating”, “timestamp”].

Return type:

DataFrame