lenskit.batch.BatchResults#

class lenskit.batch.BatchResults(key)#

Bases: object

Results from a batch recommendation run. Results consist of the outputs of various pipeline components for each of the test users. Results may be None, if the pipeline produced no output for that user.

Parameters:

key (type[tuple] | Sequence[str])

__init__(key)#

Construct a new set of batch results.

Parameters:

key (type[tuple] | Sequence[str])

Methods

__init__(key)

Construct a new set of batch results.

add_result(name, key, result)

Add a single result for one of the outputs.

output(name)

Get the item lists for a particular output component.

Attributes

outputs

Get the list of output names in these results.

property outputs: list[str]#

Get the list of output names in these results.

output(name)#

Get the item lists for a particular output component.

Parameters:

name (str) – The output name. This may or may not be the same as the component name.

Return type:

ItemListCollection[tuple[int | str | bytes | integer[Any] | str_ | bytes_ | object_, …]]

add_result(name, key, result)#

Add a single result for one of the outputs.

Parameters: