Learn R Programming

poismf (version 0.4.0-4)

get.model.mappings: Extract user/row and item/column mappings from Poisson model.

Description

Will extract the mapping between IDs passed as `X` to function `poismf` and row/column positions in the latent factor matrices and prediction functions.

Such a mapping will only be generated if the `X` passed to `poismf` was a `data.frame`, otherwise they will not be re-mapped.

Usage

get.model.mappings(model)

Value

A list with row entries:

  • `rows`: a vector in which each user/row ID is placed at its ordinal position in the internal data structures. If there is no mapping (e.g. if `X` passed to `poismf` was a sparse matrix), will be `NULL`.

  • `columns`: a vector in which each item/column ID is placed at its ordinal position in the internal data structures. If there is no mapping (e.g. if `X` passed to `poismf` was a sparse matrix), will be `NULL`.

Arguments

model

A Poisson factorization model as returned by `poismf`.

See Also

get.factor.matrices