Data Abstractions#
The lenskit.data
module provides the core data abstractions LensKit uses
to represent recommender system inputs and outputs.
Data Sets#
Representation of a data set for LensKit training, evaluation, etc. |
|
Representation of a set of entities from the dataset. |
|
Base class for attributes associated with entities. |
|
Representation for a set of relationship records. |
|
Two-entity relationships without duplicates, accessible in matrix form. |
|
Representation of the compressed sparse row structure of a sparse matrix, without any data values. |
Building Data Sets#
Construct data sets from data and tables. |
|
Create a dataset from a data frame of ratings or other user-item interactions. |
|
Load a MovieLens dataset. |
|
Load the ratings from a MovieLens dataset as a raw data frame. |
Item Data#
Representation of a (usually ordered) list of items, possibly with scores and other associated data; many components take and return item lists. |
|
A collection of item lists. |
|
Key type for user IDs. |
|
Built-in immutable sequence. |
Recommendation Queries#
Representation of a the data available for a recommendation query. |
|
Represent a PEP 604 union type |
Schemas and Identifiers#
Pydantic models for LensKit data schemas. |
|
Vocabularies of entity identifiers for the LensKit data model. |
See also:
lenskit.data.types.EntityId