Type: | Package |
Title: | A Statistical Method for Multi-Item Rating and Recommendation Problems |
Imports: | Rcpp (≥ 1.0.14) |
Version: | 1.0.0 |
Maintainer: | Sjoerd Hermes <sjoerd.hermes@wur.nl> |
Description: | Implements the methodological developments found in Hermes (2025) <doi:10.48550/arXiv.2503.02786>, and allows for the statistical modeling of data consisting of multiple users that provide an ordinal rating for one or multiple items. |
License: | GPL-3 |
Encoding: | UTF-8 |
LinkingTo: | Rcpp, RcppArmadillo |
NeedsCompilation: | yes |
Packaged: | 2025-03-17 08:55:04 UTC; sjoerd |
Author: | Sjoerd Hermes [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2025-03-18 15:10:13 UTC |
model
Description
This function applies the proposed method of Hermes (2025) on a given set of ratings, user covariates and item covariates. This implementation allows for the same flexibility as in the Hermes (2025) paper, namely linear and bilinear predictors, sparsity and latent factors. Returns posterior samples for the parameter estimates and posterior predictive samples for the missing ratings.
Usage
model(X, Y, R, k, l, method, sparse, mcmc_samples, burnin, verbose)
Arguments
X |
A |
Y |
A |
R |
A |
k |
Integer value indicating the maximum rating that a user can provide. |
l |
Number of latent factors. |
method |
Method choice, either |
sparse |
Boolean value indicating whether sparsity should be imposed on |
mcmc_samples |
Total number of Gibbs samples. |
burnin |
Number of Gibbs samples that are used as burnin. |
verbose |
Boolean value indicating whether parameter estimation progress is returned ( |
Value
B_hat |
A |
U_hat |
A |
V_hat |
A |
R_hat |
A |
Author(s)
Sjoerd Hermes
Maintainer: Sjoerd Hermes sjoerd.hermes@wur.nl
References
1. Hermes, S. (2025). A Statistical Interpretation of Multi-Item Rating and Recommendation Problems. arXiv preprint, arXiv:2503.02786.
Examples
# Set parameters
n = m = 15
p = q = 3
method = "linear"
k = 5
l = 1
sparse = TRUE
# Generate some data
# this is completely random, and there is no relation between the ratings
# and the covariates or latent factors
set.seed(2025)
r = matrix(rbinom(n*m, k, 0.3), n, m)
X = matrix(rnorm(n * p), n, p)
Y = matrix(rnorm(m * q), m, q)
# Fit the model on the data
est = model(X, Y, r, k, l, method, sparse, mcmc_samples = 2000, burnin = 1000, TRUE)