lenskit.pipeline.topn_pipeline#

lenskit.pipeline.topn_pipeline(scorer, *, predicts_ratings=False, n=-1, name=None)#

Create a pipeline that produces top-N recommendations using a scoring model.

Parameters:
  • scorer (Component) – The scorer to use in the pipeline (it will added with the component name scorer, see Component Names).

  • predicts_ratings (bool | Literal['raw']) – If True, make set up to predict ratings (rating-predictor), using scorer with a fallback of BiasScorer; if "raw", use scorer directly with no fallback.

  • n (int) – The recommendation list length to configure in the pipeline.

  • name (str | None) – The pipeline name.

Return type:

Pipeline