Learn R Programming

CFilt (version 0.3.0)

estimaterating: Recommendation Functions

Description

Function that provide an estimate of the user's rating for the item.

Usage

estimaterating(
  CF,
  Id_u,
  Id_i,
  type = "user",
  neighbors = ifelse(type == "user", nrow(CF$MU) - 1, ncol(CF$MU) - 1)
)

Arguments

CF

A CF object

Id_u

the user Id

Id_i

the item Id

type

"user" or "item"

neighbors

number of neighbors in the calculation.

Author

Jessica Kubrusly

Examples

Run this code
objectCF_r <- CFbuilder(Data = movies[1:500,], Datatype = "ratings", 
similarity = "cosine")
estimaterating(CF=objectCF_r,Id_u="35",Id_i="Despicable Me 2")
estimaterating(CF=objectCF_r,Id_u="35",Id_i="Her")

Run the code above in your browser using DataLab