lenskit.pipeline#
LensKit pipeline abstraction.
Submodules#
Definition of the component interfaces. |
|
Pydantic models for pipeline configuration and serialization support. |
|
Node objects used to represent pipelines internally. It is very rare |
Attributes#
Classes#
Builder for LensKit recommendation pipelines. Pipelines |
|
A cache to share components between pipelines. |
|
Builder to help assemble common pipeline patterns. |
|
Inspect or process data as it passes to a component's input. |
|
LensKit recommendation pipeline. This is the core abstraction for using |
|
Collect pipeline run statistics for profiling pipeline executions. |
|
Interface for creating recording pipeline run profiling information. |
|
Full results of running a pipeline. A pipeline state is a dictionary |
Functions#
|
Create a pipeline that predicts ratings, but does not include any |
|
Create a pipeline that produces top-N recommendations using a scoring model. |
Package Contents#
- lenskit.pipeline.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 (see Stability Levels).
- Parameters:
scorer (lenskit.pipeline.components.Component) – The scorer to use in the pipeline (it will added with the component name
scorer, see Component Names).fallback (bool | lenskit.pipeline.components.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.
name (str | None) – The pipeline name.
- Return type:
- lenskit.pipeline.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 (see Stability Levels).
- Parameters:
scorer (lenskit.pipeline.components.Component | lenskit.pipeline.components.ComponentConstructor) – 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), usingscorerwith a fallback ofBiasScorer; if"raw", usescorerdirectly with no fallback.n (int | None) – The recommendation list length to configure in the pipeline.
name (str | None) – The pipeline name.
config (object | None)
- Return type:
- type lenskit.pipeline.CloneMethod = Literal['config', 'pipeline-config']#
Exported Aliases#
- exception lenskit.pipeline.PipelineError#
Re-exported alias for
lenskit.diagnostics.PipelineError.
- exception lenskit.pipeline.PipelineWarning#
Re-exported alias for
lenskit.diagnostics.PipelineWarning.
- class lenskit.pipeline.Lazy#
Re-exported alias for
lenskit.lazy.Lazy.
- class lenskit.pipeline.Component#
Re-exported alias for
lenskit.pipeline.components.Component.
- class lenskit.pipeline.ComponentConstructor#
Re-exported alias for
lenskit.pipeline.components.ComponentConstructor.
- lenskit.pipeline.PipelineFunction#
Re-exported alias for
lenskit.pipeline.components.PipelineFunction.
- class lenskit.pipeline.PipelineConfig#
Re-exported alias for
lenskit.pipeline.config.PipelineConfig.
- class lenskit.pipeline.Node#
Re-exported alias for
lenskit.pipeline.nodes.Node.