get.model.mappings {poismf} | R 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'.