lenskit.data.amazon#

Load Amazon ratings data from Julian McAuley’s group.

Functions#

load_amazon_ratings(*files)

Load an Amazon ratings CSV file into a dataset. Files may be compressed by

open_az_2023(input)

open_az_2014(input)

open_az_2018(input)

Module Contents#

lenskit.data.amazon.load_amazon_ratings(*files)#

Load an Amazon ratings CSV file into a dataset. Files may be compressed by any compressor supported by xopen and PyArrow.

The era of data (2014, 2018, or 2023) is auto-detected from file content.

Parameters:

files (pathlib.Path | str | os.PathLike[str]) – The source rating files. Each one will be appeded in turn to the loader.

Return type:

lenskit.data._dataset.Dataset

lenskit.data.amazon.open_az_2023(input)#
Parameters:

input (BinaryIO)

Return type:

collections.abc.Generator[pyarrow.Table]

lenskit.data.amazon.open_az_2014(input)#
Parameters:

input (BinaryIO)

Return type:

collections.abc.Generator[pyarrow.Table]

lenskit.data.amazon.open_az_2018(input)#
Parameters:

input (BinaryIO)

Return type:

collections.abc.Generator[pyarrow.Table]

Exported Aliases#

lenskit.data.amazon.get_logger()#

Re-exported alias for lenskit.logging.get_logger().

class lenskit.data.amazon.DatasetBuilder#

Re-exported alias for lenskit.data._builder.DatasetBuilder.

class lenskit.data.amazon.Dataset#

Re-exported alias for lenskit.data._dataset.Dataset.