irspack.dataset.MovieLens100KDataManager

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

Bases: BaseMovieLenstDataLoader

Manages MovieLens 100K dataset.

Parameters:
  • zippath (Optional[Union[Path, str]]) – Where the zipped data is located. If None, assumes the path to be ~/.ml-1m.zip. If the designated path does not exist, you will be prompted for the permission to download the data. Defaults to None.

  • force_download (bool) – If True, the class will not prompt for the permission and start downloading immediately.

__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.

read_item_info()

read_user_info()

Attributes

DEFAULT_PATH

DOWNLOAD_URL

GENRE_PATH

INTERACTION_PATH

ITEM_INFO_PATH

USER_INFO_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