focusGrp: Find Focus Group

View source: R/FocusGrp.R

focusGrpR Documentation

Find Focus Group

Description

Finds "representative" users, i.e. the users whose ratings correlate the highest with the average ratings of the items they rate.

Usage

focusGrp(ydotsObj, ratingsIn, k = 10, minn = 50) 

Arguments

ydotsObj

Object of type 'ydotsMM' or ydotsMLE.

ratingsIn

Input data frame, training set. Within-row format is (UserID, ItemID, rating).

k

Desired size of the focus group.

minn

Minimum number of ratings for a user to be considered for the group.

Details

For each user i, vectors u and v will be formed; u will be the vector of ratings set by user i; For v[j], the code will find the item ID m of the j-th component of u, then set v[j] to the average rating of all users for item ID m. Then the mean abolute error will be computed, using u to predict v; this will be done for each user, and the k users with the lowest MAEs will be chosen.

Author(s)

Pooja Rajkumar and Norm Matloff

Examples

ivl <- InstEval 
ivl$s <- as.numeric(ivl$s) 
ivl$d <- as.numeric(ivl$d) 
ivl3 <- ivl[,c(1,2,7)]
ydo <- trainMM(ivl3)
focusGrp(ydo,ivl3)  # users 90, 118, 231, ... are chosen

matloff/rectools documentation built on March 31, 2022, 12:09 p.m.