bestSubset: Given item set, item representation vector, and item ratings,...

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Given item set, item representation vector, and item ratings, find a subset with better relevance-diversity trade-off.

Usage

1
bestSubset(item_representations, ratings, n)

Arguments

item_representations

matrix with nrow = num_items and ncol = feature_dim

ratings

matrix with nrow = num_items and ncol = 1

n

int. subset size

Value

dataframe with 2 columns: id & gain

Examples

1
2
library(rDppDiversity)
bestSubset(matrix(c(-0.1, -0.15, 0.2, 0.3, -0.2, -0.3), nrow=3, ncol=2, byrow=TRUE), c(1, 2, 3), 3)

rDppDiversity documentation built on June 1, 2021, 5:09 p.m.