lenskit.pipeline.predict_pipeline#

lenskit.pipeline.predict_pipeline(scorer, *, fallback=True, n=-1, name=None)#

Create a pipeline that predicts ratings, but does not include any ranking capabilities. Mostly userful for testing and historical purposes. The resulting pipeline must be called with an item list.

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

  • fallback (bool | Component) – Whether to use a fallback predictor when the scorer cannot score. When configured, the scorer node is the scorer, and the rating-predictor node applies the fallback.

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

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

Return type:

Pipeline