topN: Rank top-N highest-predicted items for an existing user

Description Usage Arguments Value See Also

Description

Rank top-N highest-predicted items for an existing user

Usage

1
topN(model, user, n = 10, include = NULL, exclude = NULL, output_score = FALSE)

Arguments

model

A Poisson factorization model as returned by 'poismf'.

user

User for which to rank the items. If 'X' passed to 'poismf' was a 'data.frame', must match with the entries in its first column, otherwise should match with the rows of 'X' (numeration starting at 1).

n

Number of top-N highest-predicted results to output.

include

List of items which will be ranked. If passing this, will only make a ranking among these items. If 'X' passed to 'poismf' was a 'data.frame', must match with the entries in its second column, otherwise should match with the columns of 'X' (numeration starting at 1). Can only pass one of 'include' or 'exclude.' Must not contain duplicated entries.

exclude

List of items to exclude from the ranking. If passing this, will rank all the items except for these. If 'X' passed to 'poismf' was a 'data.frame', must match with the entries in its second column, otherwise should match with the columns of 'X' (numeration starting at 1). Can only pass one of 'include' or 'exclude'. Must not contain duplicated entries.

output_score

Whether to output the scores in addition to the IDs. If passing 'FALSE', will return a single array with the item IDs, otherwise will return a list with the item IDs and the scores.

Value

See Also

topN.new predict.poismf factors.single


poismf documentation built on Jan. 13, 2021, 6:46 a.m.

Related to topN in poismf...