Learn R Programming

rDppDiversity (version 0.0.2)

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

Description

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

Usage

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab