The required model matrix has the same number of rows as your data, but the number of columns in it is approximately equal to the number of unique rows (factor levels)!
So, if you have 1000 films that will generate approximately 4x6x1000 matrix of doubles. This is approximately 32 GB ...
You can try to create the model matrix separately as follows:
# Sample of 100 rows, 10 users, 20 movies d <- data.frame(UserId = rep(paste('U', 10), each=10), MovieId=sample(paste('M', 1:20), 100, replace=T), Ratings=runif(100), Time=runif(100, 45, 180)) dim(d)
Tommy source share