lenskit.pipeline.topn_pipeline#
- lenskit.pipeline.topn_pipeline(scorer, *, predicts_ratings=False)#
Create a pipeline that produces top-N recommendations using the specified scorer. The scorer should have the following call signature:
def scorer(user: UserHistory, items: ItemList) -> pd.Series: ...
- Parameters:
scorer (Callable[[...], Series]) – The scorer to use in the pipeline (it will added with the component name
score
, see Component Names).predicts_ratings (bool) – If
True
, makepredict-ratings
an alias forscore
so that evaluation components know this pipeline can predict ratings.
- Return type: