lenskit.pipeline ================ .. py:module:: lenskit.pipeline .. autoapi-nested-parse:: LensKit pipeline abstraction. Submodules ---------- .. autoapisummary:: lenskit.pipeline.components lenskit.pipeline.config lenskit.pipeline.nodes .. toctree:: :hidden: :maxdepth: 1 /api/lenskit/pipeline/components/index /api/lenskit/pipeline/config/index /api/lenskit/pipeline/nodes/index Attributes ---------- .. autoapisummary:: lenskit.pipeline.CloneMethod Classes ------- .. toctree:: :hidden: /api/lenskit/pipeline/PipelineBuilder /api/lenskit/pipeline/PipelineCache /api/lenskit/pipeline/RecPipelineBuilder /api/lenskit/pipeline/ComponentInputHook /api/lenskit/pipeline/Pipeline /api/lenskit/pipeline/PipelineProfiler /api/lenskit/pipeline/ProfileSink /api/lenskit/pipeline/PipelineState .. autoapisummary:: lenskit.pipeline.PipelineBuilder lenskit.pipeline.PipelineCache lenskit.pipeline.RecPipelineBuilder lenskit.pipeline.ComponentInputHook lenskit.pipeline.Pipeline lenskit.pipeline.PipelineProfiler lenskit.pipeline.ProfileSink lenskit.pipeline.PipelineState Functions --------- .. autoapisummary:: lenskit.pipeline.predict_pipeline lenskit.pipeline.topn_pipeline Package Contents ---------------- .. py:function:: predict_pipeline(scorer, *, fallback = True, 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 :param scorer: The scorer to use in the pipeline (it will added with the component name ``scorer``, see :ref:`pipeline-names`). :param fallback: 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. :param name: The pipeline name. .. py:function:: topn_pipeline(scorer, config = None, *, predicts_ratings = False, n = None, name = None) Create a pipeline that produces top-N recommendations using a scoring model. :Stability: Caller :param scorer: The scorer to use in the pipeline (it will added with the component name ``scorer``, see :ref:`pipeline-names`). :param predicts_ratings: If ``True``, make set up to predict ratings (``rating-predictor``), using ``scorer`` with a fallback of :class:`BiasScorer`; if ``"raw"``, use ``scorer`` directly with no fallback. :param n: The recommendation list length to configure in the pipeline. :param name: The pipeline name. .. py:type:: CloneMethod :canonical: Literal['config', 'pipeline-config'] Exported Aliases ---------------- .. py:exception:: lenskit.pipeline.PipelineError Re-exported alias for :py:exc:`lenskit.diagnostics.PipelineError`. .. py:exception:: lenskit.pipeline.PipelineWarning Re-exported alias for :py:exc:`lenskit.diagnostics.PipelineWarning`. .. py:class:: lenskit.pipeline.Lazy Re-exported alias for :py:class:`lenskit.lazy.Lazy`. .. py:class:: lenskit.pipeline.Component Re-exported alias for :py:class:`lenskit.pipeline.components.Component`. .. py:class:: lenskit.pipeline.ComponentConstructor Re-exported alias for :py:class:`lenskit.pipeline.components.ComponentConstructor`. .. py:data:: lenskit.pipeline.PipelineFunction Re-exported alias for :py:data:`lenskit.pipeline.components.PipelineFunction`. .. py:class:: lenskit.pipeline.PipelineConfig Re-exported alias for :py:class:`lenskit.pipeline.config.PipelineConfig`. .. py:class:: lenskit.pipeline.Node Re-exported alias for :py:class:`lenskit.pipeline.nodes.Node`.