lenskit.pipeline#

LensKit pipeline abstraction.

Submodules#

components

Definition of the component interfaces.

config

Pydantic models for pipeline configuration and serialization support.

nodes

Node objects used to represent pipelines internally. It is very rare

Attributes#

Classes#

PipelineBuilder

Builder for LensKit recommendation pipelines. Pipelines

PipelineCache

A cache to share components between pipelines.

RecPipelineBuilder

Builder to help assemble common pipeline patterns.

ComponentInputHook

Inspect or process data as it passes to a component's input.

Pipeline

LensKit recommendation pipeline. This is the core abstraction for using

PipelineProfiler

Collect pipeline run statistics for profiling pipeline executions.

ProfileSink

Interface for creating recording pipeline run profiling information.

PipelineState

Full results of running a pipeline. A pipeline state is a dictionary

Functions#

predict_pipeline(scorer, *[, fallback, name])

Create a pipeline that predicts ratings, but does not include any

topn_pipeline(scorer[, config, predicts_ratings, n, name])

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:
Return type:

lenskit.pipeline._impl.Pipeline

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:
Return type:

lenskit.pipeline._impl.Pipeline

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.