lenskit.data.types#

Basic data types used in data representations.

Attributes#

FeedbackType

Types of feedback supported.

NPID

NumPy entity identifier types.

ID

Allowable identifier types.

IDArray

NumPy arrays of identifiers.

IDSequence

Sequences of identifiers.

NPMatrix

NPVector

DF_FORMAT

MAT_FORMAT

LAYOUT

Classes#

AliasedColumn

A data frame column with possible aliases.

UIPair

A user-item pair of values.

Extent

Representation of a range with a start and end.

Module Contents#

type lenskit.data.types.FeedbackType = Literal['explicit', 'implicit']#

Types of feedback supported.

type lenskit.data.types.NPID = np.integer[Any] | np.str_ | np.bytes_ | np.object_#

NumPy entity identifier types.

type lenskit.data.types.ID = CoreID | NPID#

Allowable identifier types.

type lenskit.data.types.IDArray = np.ndarray[tuple[int], np.dtype[NPID]]#

NumPy arrays of identifiers.

type lenskit.data.types.IDSequence = '\n    Sequence[ID]\n    | IDArray\n    | pa.StringArray\n    | pa.IntegerArray[Any]\n    | pa.ChunkedArray[Any]\n    | pd.Series[CoreID]\n    '#

Sequences of identifiers.

type lenskit.data.types.NPMatrix = np.ndarray[tuple[int, int], np.dtype[V]]#
type lenskit.data.types.NPVector = np.ndarray[tuple[int], np.dtype[V]]#
type lenskit.data.types.DF_FORMAT = Literal['numpy', 'pandas', 'torch']#
type lenskit.data.types.MAT_FORMAT = Literal['scipy', 'torch', 'pandas', 'structure']#
type lenskit.data.types.LAYOUT = Literal['csr', 'coo']#