From 2d4d67126588b838e1f9d859e59d2f9d2d459258 Mon Sep 17 00:00:00 2001 From: david-cortes Date: Sat, 9 Dec 2023 18:58:46 +0100 Subject: [PATCH] fix incorrect attribute being checked for side info --- DESCRIPTION | 2 +- R/factors_single.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 879e034..e77724b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: cmfrec Type: Package Title: Collective Matrix Factorization for Recommender Systems -Version: 3.5.1-2 +Version: 3.5.1-3 Authors@R: c( person(given="David", family="Cortes", role=c("aut", "cre", "cph"), email="david.cortes.rivera@gmail.com"), diff --git a/R/factors_single.R b/R/factors_single.R index 4e9c6a6..7cff511 100644 --- a/R/factors_single.R +++ b/R/factors_single.R @@ -92,7 +92,7 @@ process.data.factors.single <- function(model, obj, exact <- check.bool(exact) if (!is.null(U_bin) && !NCOL(obj$matrices$Cb)) stop("Model was not fit to binary side information.") - if ((!is.null(U) || !is.null(U_col) || !is.null(U_val)) && !NCOL(obj$C)) + if ((!is.null(U) || !is.null(U_col) || !is.null(U_val)) && !NCOL(obj$matrices$C)) stop("Model was not fit to 'U' data.") if (is.null(X_col) != is.null(X_val)) stop("'X_col' and 'X_val' must be passed in conjunction.")