Hi Matt,
Is there a way to do the following in data.table:
(select avg(rating) from data x
where x.itemid=a.itemid and x.userid!=a.userid
and
exists (select 1 from (select * from data y where y.userid=x.userid) y, (select
* from data z where z.userid=a.userid) z where y.itemid=z.itemid
and y.itemid!=a.itemid
and abs(y.rating-z.rating)>=4 )
) pred_rating_disimilar
from data1 a')
This is based on movielens movie data of (userid, itemid, rating and timestamp).
its finding average rating on movie by all users who rated a movie differently
from the current user in the row.
thanks
Dhruv
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help