Skip to content

Commit

Permalink
fix incorrect attribute being checked for side info
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes committed Dec 9, 2023
1 parent a7ffd0e commit 2d4d671
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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="[email protected]"),
Expand Down
2 changes: 1 addition & 1 deletion R/factors_single.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit 2d4d671

Please sign in to comment.