Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Jan 21, 2016
1 parent 403a95f commit 8b67548
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/SparseMatrixRecommender.R
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,10 @@ Recommendations <- function( x, historyItems, historyRatings, nrecs, removeHisto

#' @description Specialization of Recommendations for SMR objects.
Recommendations.SMR <- function( x, historyItems, historyRatings, nrecs, removeHistory = TRUE, ... ) {
res <- SMRRecommendations( smr = x, userHistoryItems = historyItems, userRatings = historyRatings, nrecs = nrecs, removeHistory = removeHistory, ... )
setNames( res[, c(1,3)], c("Score", "Item") )
## Needs handling of the argument tuningParametes.
res <- SMRRecommendations( smr = x, userHistoryItems = historyItems, userRatings = historyRatings,
nrecs = nrecs, removeHistory = removeHistory )
setNames( res[, c(1,3)], c("Score", "Item") )
}

#' @description The generic function for calculating recommendations by profile.
Expand All @@ -710,6 +712,7 @@ RecommendationsByProfile <- function( x, profileTags, profileTagScores, nrecs, .

#' @description Specialization of RecommendationsByProfile for SMR objects.
RecommendationsByProfile.SMR <- function ( x, profileTags, profileTagScores, nrecs, ... ) {
## Needs handling of the argument tuningParametes.
res <- SMRRecommendationsByProfileDF( smr = x,
profile = data.frame( Score = profileTagScores, Tag = profileTags, stringsAsFactors=FALSE),
nrecs = nrecs )
Expand Down

0 comments on commit 8b67548

Please sign in to comment.