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

get.model.mappingsR Documentation

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)

Arguments

model

A Poisson factorization model as returned by 'poismf'.

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'.

See Also

get.factor.matrices


poismf documentation built on March 18, 2022, 6:19 p.m.