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
), usingscorer
with a fallback ofBiasScorer
; if"raw"
, usescorer
directly with no fallback.n (int) – The recommendation list length to configure in the pipeline.
name (str | None) – The pipeline name.
- Return type: