Data Abstractions#

The lenskit.data module provides the core data abstractions LensKit uses to represent recommender system inputs and outputs.

Data Sets#

Dataset

Representation of a data set for LensKit training, evaluation, etc.

from_interactions_df

Create a dataset from a data frame of ratings or other user-item interactions.

load_movielens

Load a MovieLens dataset.

load_movielens_df

Load the ratings from a MovieLens dataset as a raw data frame.

Item Data#

ItemList

Representation of a (usually ordered) list of items, possibly with scores and other associated data; many components take and return item lists.

ItemListCollection

A collection of item lists.

UserIDKey

Key type for user IDs.

GenericKey

Built-in immutable sequence.

Recommendation Queries#

RecQuery

Representation of a the data available for a recommendation query.

Terms and Identifiers#

Vocabulary

Vocabularies of terms, tags, entity IDs, etc.

See also:

  • lenskit.data.types.EntityId