API Reference#

These pages contain the reference documentation for the LensKit modules, classes, etc.

Core Abstractions#

lenskit

data

Data abstractions and data set access.

pipeline

LensKit pipeline abstraction.

diagnostics

Warning and error classes and general LensKit diagnostic code.

operations

Top-level LensKit functions for recommender operations.

training

Interfaces and support for model training.

state

Support code for managing model state.

config

LensKit general configuration

Components and Models#

These packages provide various recommendation components and models provided as first-party implementations by LensKit.

als

LensKit ALS implementations.

basic

Basic and baseline pipeline components.

flexmf

Flexible PyTorch matrix factorization models for LensKit.

funksvd

FunkSVD (biased MF).

knn

sklearn

Recommendation models using SciKit-Learn.

stochastic

Components for generating sochastic outputs in LensKit pipelines.

Batch Inference and Evaluation#

These package provide evaluation metrics and analysis and batch-inference support. The evaluation code is not directly linked to the rest of LensKit and can be used to evaluate the output of any recommender system implementation.

batch

Batch-run recommendation pipelines for evaluation.

metrics

Metrics for evaluating recommender outputs.

splitting

Splitting data for train-test evaluation.

tuning

Tune parameters using Ray Tune.

Add-On Components#

These packages contain component implementations that wrap other libraries.

implicit

Bridges to recommendation models from implicit.

hpf

Hierarchical Poisson factorization from hpfrec.

graphs

Implementation Helpers#

These modules provide various utilities and helpers used to implement LensKit, and may be useful in building new models and components for LensKit.

lazy

Types and functions for lazy values. These are used mostly for pipeline inputs.

logging

Logging, progress, and resource records.

math

Mathematical helper routines.

parallel

LensKit parallel computation support.

random

Utilities to manage randomness in LensKit and LensKit experiments.

stats

LensKit statistical computations.

testing

LensKit test harnesses and utilities.

torch

PyTorch utility functions.

_accel

Rust acceleration code.