lenskit.pipeline.RecPipelineBuilder =================================== .. py:class:: lenskit.pipeline.RecPipelineBuilder :canonical: lenskit.pipeline._common.RecPipelineBuilder Builder to help assemble common pipeline patterns. This is a convenience class; you can always directly assemble a :class:`Pipeline` if this class's behavior is inadquate. :Stability: Caller .. py:attribute:: is_predictor :type: bool :value: False .. py:method:: scorer(score, config = None) Specify the scoring model. .. py:method:: ranker(rank = None, config = None, *, n = None) Specify the ranker to use. If ``None``, sets up a :class:`TopNRanker` with ``n=n``. .. py:method:: candidate_selector(sel, config = None) Specify the candidate selector component. The component should accept a query as its input and return an item list. .. py:method:: predicts_ratings(*, transform = None, fallback = None) Specify that this pipeline will predict ratings, optionally providing a rating transformer and fallback scorer for the rating predictions. :param transform: A component to transform scores prior to returning them. If supplied, it will be applied to both primary scores and fallback scores. :param fallback: A fallback scorer to use when the primary scorer cannot score an item. The fallback should accept ``query`` and ``items`` inputs, and return an item list. .. py:method:: build(name = None) Build the specified pipeline. .. py:method:: reranker(reranker, config = None) Specify a reranker to add to the pipeline. :param reranker: The reranker to use in the pipeline. :param config: Configuration parameters to initialize the reranker if a reranker is specified.