lenskit.data.schema.RelationshipSchema#

class lenskit.data.schema.RelationshipSchema#

Bases: pydantic.BaseModel

Relationship class definitions in the dataset schema.

entities: dict[Name, Name | None]#

Define the entity classes participating in the relationship. For aliased entity classes (necessary for self-relationships), the key is the alias, and the value is the original entity class name.

interaction: bool = False#

Whether this relationship class records interactions.

repeats: AllowableTroolean#

Whether this relationship supports repeated interactions.

attributes: dict[Name, ColumnSpec]#

Relationship attribute definitions.

property entity_class_names: list[str]#
Return type:

list[str]